templates/discussions.html 959 B raw
1
{{define "content"}}
2
{{$dpath := discussionPath .BaseURL .Repo}}
3
{{if .Handle}}
4
<div class="discussions-header">
5
  <div class="discussions-actions">
6
    <a href="{{$dpath}}/new" class="btn">New discussion</a>
7
  </div>
8
</div>
9
{{end}}
10
11
{{if .Data.IsEmpty}}
12
<p class="empty">No discussions yet.</p>
13
{{else}}
14
<table class="discussion-list">
15
<thead>
16
  <tr>
17
    <th>Topic</th>
18
    <th class="desktop">Author</th>
19
    <th class="desktop">Replies</th>
20
    <th>Active</th>
21
  </tr>
22
</thead>
23
<tbody>
24
{{range .Data.Discussions}}
25
  <tr>
26
    <td class="discussion-title"><a href="{{$dpath}}/{{.ID}}">{{.Title}}</a></td>
27
    <td class="author desktop">{{if .Avatar}}<img class="avatar" src="{{.Avatar}}" alt="" width="16" height="16"> {{end}}<a href="https://bsky.app/profile/{{.Author}}">{{.Author}}</a></td>
28
    <td class="discussion-replies desktop">{{.ReplyCount}}</td>
29
    <td class="date">{{timeAgo .LastActive}}</td>
30
  </tr>
31
{{end}}
32
</tbody>
33
</table>
34
{{end}}
35
{{end}}