aboutsummaryrefslogtreecommitdiff
path: root/static/nposts.html
blob: 336edb666c104ea92f8336abfc096aaa85590d05 (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
61
62
63
64
65
{{ define "header" }}
<title>{{ .Title }}</title>
<meta name="description" content="{{ .Board.Summary }}">
<meta property="og:url" content="{{ .Board.Actor.Id }}">
<meta property="og:site_name" content="{{ .Instance.PreferredUsername }}" />

<meta property="og:title" content="{{ .Title }}">
<meta property="og:description" content="{{ .Board.Summary }}">

<meta name="twitter:title" content="{{ .Title }}">
<meta name="twitter:description" content="{{ .Board.Summary }}">
<meta name="twitter:card" content="summary_large_image">
{{ end }}

{{ define "content" }}
{{ $board := .Board }}
<hr>
<ul id="navlinks">
  <li>[<a href="/{{ $board.Name }}/catalog">Catalog</a>]</li>
  {{ if showArchive }}
  <li>[<a href="/{{ $board.Name }}/archive">Archive</a>]</li>
  {{ end }}
  <li>[<a href="#bottom">Bottom</a>]</li>
  <li>[<a href="javascript:location.reload()">Refresh</a>]</li>
</ul>

{{ template "posts" . }}

<hr>

<ul id="navlinks">
  <li>[<a href="/{{ $board.Name }}/catalog">Catalog</a>]</li>
  {{ if showArchive }}
  <li>[<a href="/{{ $board.Name }}/archive">Archive</a>]</li>
  {{ end }}
  <li>[<a href="#top" id="bottom">Top</a>]</li>
  <li>[<a href="javascript:location.reload()">Refresh</a>]</li>
</ul>

<hr>
{{ if gt .TotalPage 0 }}
{{ $totalPage := .TotalPage }}
<ul style="float: right; margin: 0; padding: 0; display: inline">
  {{ $page := .CurrentPage }}
  {{ if gt $page 0 }}
  <li style="display: inline">[<a href="/{{ $board.Name }}?page={{ sub $page 1 }}">&lt;</a>]</li>
  {{ end }}
  {{ range $i, $e := .Pages }}
  {{ if eq $i $page}}
  <li style="display: inline">[<a href="/{{ $board.Name }}?page={{ $i }}"><b>{{ $i }}</b></a>]</li>
  {{ else }}
  <li style="display: inline">[<a href="/{{ $board.Name }}?page={{ $i }}">{{ $i }}</a>]</li>
  {{ end }}
  {{ end }}
  {{ if lt .CurrentPage .TotalPage }}
  <li style="display: inline">[<a href="/{{ $board.Name }}?page={{ add $page 1 }}">&gt;</a>]</li>
  {{ end }}
</ul>
{{ end }}
{{ end }}

{{ define "script" }}
<script src="/static/js/posts.js"></script>
<script src="/static/js/footerscript.js"></script>
{{ end }}