fierj
PublicTiny personal git forge
{{template "head" .}}
{{define "title"}}threads - {{.Repo}} - fierj{{end}}
{{template "repo-header" .}}
{{template "repo-tabs" .}}
<div class="threads-header">
<div class="threads-state-toggle">
<a href="/{{.Repo}}/threads?state=open" {{if eq .State "open" }} class="active" {{end}}>
<svg class="icon" viewBox="0 0 16 16" fill="currentColor">
<path d="M8 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z" />
<path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Z" />
</svg>
{{.OpenCount}} Open
</a>
<a href="/{{.Repo}}/threads?state=closed" {{if eq .State "closed" }} class="active" {{end}}>
<svg class="icon" viewBox="0 0 16 16" fill="currentColor">
<path
d="M11.28 6.78a.75.75 0 0 0-1.06-1.06L7.25 8.69 5.78 7.22a.75.75 0 0 0-1.06 1.06l2 2a.75.75 0 0 0 1.06 0Z" />
<path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0Zm-1.5 0a6.5 6.5 0 1 0-13 0 6.5 6.5 0 0 0 13 0Z" />
</svg>
{{.ClosedCount}} Closed
</a>
</div>
<a href="/{{.Repo}}/threads/new" class="btn btn-primary">New thread</a>
</div>
{{if .APEnabled}}
<p class="participate-hint">๐ Follow <code>@{{.Repo}}@{{.Host}}</code> on Mastodon to get new threads in your feed
and reply from there.</p>
{{end}}
{{if .Threads}}
<div class="thread-list">
{{range .Threads}}
<div class="thread-list-item">
<svg class="icon thread-icon-{{.State}}" viewBox="0 0 16 16" fill="currentColor">
{{if eq .State "open"}}
<path d="M8 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z" />
<path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Z" />
{{else}}
<path
d="M11.28 6.78a.75.75 0 0 0-1.06-1.06L7.25 8.69 5.78 7.22a.75.75 0 0 0-1.06 1.06l2 2a.75.75 0 0 0 1.06 0Z" />
<path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0Zm-1.5 0a6.5 6.5 0 1 0-13 0 6.5 6.5 0 0 0 13 0Z" />{{end}}
</svg>
<div class="thread-list-content">
<a href="/{{$.Repo}}/threads/{{.ID}}" class="thread-title">{{.Title}}</a>
<span class="thread-meta">opened by {{.AuthorName}} ยท {{timeAgo .Updated}}</span>
</div>
{{if .Replies}}
<span class="thread-reply-count">
<svg class="icon" viewBox="0 0 16 16" fill="currentColor">
<path
d="M0 2.75C0 1.784.784 1 1.75 1h12.5c.966 0 1.75.784 1.75 1.75v8.5A1.75 1.75 0 0 1 14.25 13H8.06l-2.573 2.573A1.458 1.458 0 0 1 3 14.543V13H1.75A1.75 1.75 0 0 1 0 11.25Zm1.75-.25a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h6.5a.25.25 0 0 0 .25-.25v-8.5a.25.25 0 0 0-.25-.25Z" />
</svg>
{{len .Replies}}
</span>
{{end}}
</div>
{{end}}
</div>
{{else}}
<div class="empty-state">
<p>No {{.State}} threads yet.</p>
</div>
{{end}}
{{template "foot" .}}