lessmore/templates/meta/forum.html

40 lines
1.2 KiB
HTML

{{ define "forum" }}
<div class="container">
<div class="row container-fluid">
<table class="table table-sm border-0 dynamic-bg dynamic-post-title dynamic-post dynamic-opacity-95 rounded">
<caption class="dynamic-bg dynamic-opacity-95 rounded">
{{ $prevPage := (.Dec) }}
{{ $nextPage := (.Inc) }}
{{ if (gt .PageNum 1) }}
<a href="{{ $prevPage }}">prev</a>
{{ end }}
<a href="{{ $nextPage }}">next</a>
</caption>
<thead>
<th scope="col">echo</th>
<th scope="col">thread</th>
<th scope="col">latest</th>
<th scope="col">address</th>
<th scope="col">date</th>
<!-- <th scope="col">comments</th> -->
</thead>
<tbody>
{{ $page := . }}
{{ range .Posts }}
<tr>
<td><a class="text-white-50" href="/echo/{{ .Echo }}/page/1">{{ .Echo }}</a></td>
<td><strong><a href="/thread/{{ .TopicID }}">{{ .Subg }}</a></strong></td>
<td>{{ .Author }}</td>
<td>{{ .Address }}</td>
<td>{{ ($page.GetDate .Date) }}</td>
</tr>
{{ end }}
</tbody>
</table>
</div>
</div>
{{ end }}