51 lines
1.5 KiB
HTML
51 lines
1.5 KiB
HTML
{{ template "base.html" . }}
|
|
|
|
{{ define "content" }}
|
|
<div class="content-block">
|
|
{{ range .Subforums }}
|
|
<div class="mv3">
|
|
<h2 class="ma0 ph3 pb2">
|
|
<a href="{{ .Url }}">
|
|
{{ .Name }} »<br/>
|
|
</a>
|
|
</h2>
|
|
{{ range .Threads }}
|
|
{{ template "thread_list_item.html" . }}
|
|
{{ end }}
|
|
{{ $more := sub .TotalThreads 3 }}
|
|
{{ if gt $more 0 }}
|
|
<div class="ph3 pv1">
|
|
<a class="title" href="{{ .Url }}">{{ $more }} more »</a>
|
|
</div>
|
|
{{ end }}
|
|
</div>
|
|
{{ end }}
|
|
<div class="optionbar">
|
|
{{ template "subforum_options" . }}
|
|
</div>
|
|
{{ range .Threads }}
|
|
{{ template "thread_list_item.html" . }}
|
|
{{ end }}
|
|
<div class="optionbar bottom">
|
|
{{ template "subforum_options" . }}
|
|
</div>
|
|
</div>
|
|
{{ end }}
|
|
|
|
{{ define "subforum_options" }}
|
|
<div class="options">
|
|
{{ if .User }}
|
|
<a class="button new-thread" href="{{ .NewThreadUrl }}"><span class="big pr1">+</span> New Thread</a>
|
|
<form method="POST" action="{{ .MarkReadUrl }}">
|
|
{{ csrftoken .Session }}
|
|
<button type="submit"><span class="big pr1">✓</span> Mark threads here as read</button>
|
|
</form>
|
|
{{ else }}
|
|
<a class="button" href="{{ .LoginPageUrl }}">Log in to post a new thread</a>
|
|
{{ end }}
|
|
</div>
|
|
<div class="options">
|
|
{{ template "pagination.html" .Pagination }}
|
|
</div>
|
|
{{ end }}
|