scripts/
static/
templates/
commit.html
2.0 KiB
discussion.html
1.7 KiB
discussion_new.html
801 B
discussions.html
959 B
error.html
266 B
home.html
2.8 KiB
index.html
506 B
layout.html
3.4 KiB
log.html
1.4 KiB
login.html
1.7 KiB
refs.html
1.2 KiB
.gitignore
30 B
.gitsigners
112 B
AGENTS.md
7.5 KiB
LICENSE
89 B
README.md
1.9 KiB
deploy
723 B
discuss.go
16.7 KiB
git.go
3.5 KiB
git_cli.go
16.0 KiB
git_http.go
1.9 KiB
go.mod
572 B
go.sum
1.9 KiB
handler.go
11.3 KiB
handler_test.go
69.0 KiB
main.go
5.2 KiB
template.go
8.9 KiB
watch
272 B
templates/discussion.html
raw
| 1 | {{define "content"}} |
| 2 | {{$dpath := discussionPath .BaseURL .Repo}} |
| 3 | <h2 class="topic-title">{{.Data.Discussion.Title}}</h2> |
| 4 | |
| 5 | <div class="discussion-comment"> |
| 6 | <div class="discussion-comment-header"> |
| 7 | <span class="discussion-comment-author">{{if .Data.Discussion.Avatar}}<img class="avatar" src="{{.Data.Discussion.Avatar}}" alt="" width="20" height="20"> {{end}}<a href="https://bsky.app/profile/{{.Data.Discussion.Author}}">{{.Data.Discussion.Author}}</a> <span class="discussion-comment-date">{{timeAgo .Data.Discussion.CreatedAt}} ago</span></span> |
| 8 | </div> |
| 9 | {{if .Data.Discussion.Body}}<div class="post-body">{{formatBody .Data.Discussion.Body}}</div>{{end}} |
| 10 | </div> |
| 11 | |
| 12 | {{range .Data.Replies}} |
| 13 | <div class="discussion-comment" id="reply-{{.ID}}"> |
| 14 | <div class="discussion-comment-header"> |
| 15 | <span class="discussion-comment-author">{{if .Avatar}}<img class="avatar" src="{{.Avatar}}" alt="" width="20" height="20"> {{end}}<a href="https://bsky.app/profile/{{.Author}}">{{.Author}}</a> <span class="discussion-comment-date">{{timeAgo .CreatedAt}} ago</span></span> |
| 16 | </div> |
| 17 | <div class="post-body">{{formatBody .Body}}</div> |
| 18 | </div> |
| 19 | {{end}} |
| 20 | |
| 21 | {{if .Handle}} |
| 22 | <div class="discussion-form"> |
| 23 | <form method="POST" action="{{$dpath}}/{{.Data.Discussion.ID}}" novalidate> |
| 24 | <label for="body">Reply as <strong>{{.Handle}}</strong></label> |
| 25 | <textarea id="body" name="body" rows="4" placeholder="Write a reply…" required></textarea> |
| 26 | <div class="form-actions"> |
| 27 | <button type="submit" class="btn">Post reply</button> |
| 28 | {{if .Data.Error}}<span class="form-error">{{.Data.Error}}</span>{{end}} |
| 29 | </div> |
| 30 | </form> |
| 31 | </div> |
| 32 | {{else}} |
| 33 | <p class="sign-in-prompt"><a href="{{.BaseURL}}/login?return={{$dpath}}/{{.Data.Discussion.ID}}">Sign in</a> to reply.</p> |
| 34 | {{end}} |
| 35 | {{end}} |