aboutsummaryrefslogtreecommitdiff
path: root/views/archive.html
blob: 4df3a5744cd60c1c047d889406f8db74cce54b35 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
{{ template "partials/top" .page }}

{{ $board := .page.Board }}

<hr>
<ul id="navlinks">
  <li>[<a href="/{{ $board.Name }}">Return</a>]</li>
  {{ template "partials/post_nav" .page }}
  <li>[<a href="#bottom" id="top">Bottom</a>]</li>
</ul>
<hr>

{{ if .page.Posts }}
<table align="center" style="table-layout:fixed; width:90%;">
  <tr>
    {{ if eq $board.ModCred $board.Domain $board.Actor.Id }}
    <th style="width: 45px;"></th>
    {{ end }}
    <th style="width: 110px">No.</th>
    <th>Excerpt</th>
    <th style="width: 60px;"></th>
  </tr>
  {{ range $i, $e := .page.Posts }}
  {{ if mod $i 2 }}
  <tr class="box-alt">
    {{ if eq $board.ModCred $board.Domain $board.Actor.Id }}
    <td>[<a href="/poparchive?id={{ $e.Id }}&board={{ $board.Name }}">Pop</a>]</td>
    {{ end }}
    <td>{{ shortURL $board.Actor.Outbox $e.Id }}</td>
    <td style="overflow: hidden; word-wrap: break-word; text-overflow: ellipsis; padding-left: 5px;">{{ shortExcerpt $e }}</td>
    <td style="text-align: center;">[<a href="/{{ $board.Actor.Name }}/{{ shortURL $board.Actor.Outbox $e.Id }}">View</a>]</td>
  </tr>
  {{ else }}
  <tr class="box">
    {{ if eq $board.ModCred $board.Domain $board.Actor.Id }}
    <td>[<a href="/poparchive?id={{ $e.Id }}">Pop</a>]</td>
    {{ end }}
    <td>{{ shortURL $board.Actor.Outbox $e.Id }}</td>
    <td style="overflow: hidden; word-wrap: break-word; text-overflow: ellipsis; padding-left: 5px;">{{ shortExcerpt $e }}</td>
    <td style="text-align: center;">[<a href="/{{ $board.Actor.Name }}/{{ shortURL $board.Actor.Outbox $e.Id }}">View</a>]</td>
  </tr>
  {{ end }}
  {{ end }}
</table>
{{ end }}

<hr>

<ul id="navlinks">
  <li>[<a href="/{{ $board.Name }}">Return</a>]</li>
  {{ template "partials/post_nav" .page }}
  <li>[<a href="#top" id="bottom">Top</a>]</li>
</ul>

<hr>

{{ template "partials/bottom" .page }}
{{ template "partials/footer" .page }}
{{ template "partials/general_scripts" .page }}
{{ template "partials/post_scripts" .page }}