blob: 2296df5eeab325d5494a6303aae0866a6e698d52 (
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
|
{{ define "header" }}
<script src="/static/js/posts.js"></script>
{{ end }}
{{ define "content" }}
{{ $board := .Board }}
<hr>
<ul style="margin: 0; padding: 0; display: inline">
<li style="display: inline"><a href="/{{ $board.Name }}/catalog">[Catalog]</a></li>
<li style="display: inline"><a href="#bottom">[Bottom]</a></li>
<li style="display: inline"><a href="javascript:location.reload()">[Refresh]</a></li>
</ul>
{{ template "posts" . }}
<hr>
<ul style="margin: 0; padding: 0; display: inline">
<li style="display: inline"><a href="/{{ $board.Name }}/catalog">[Catalog]</a></li>
<li style="display: inline"><a id="bottom" href="#top">[Top]</a></li>
<li style="display: inline"><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"><button onclick="previous('{{$board.Name }}', '{{ $page }}')">Previous</button></li>
{{ end }}
{{ range $i, $e := .Pages }}
{{ if eq $i $page}}
<li style="display: inline"><a href="/{{ $board.Name }}/{{ $i }}"><b>[{{ $i }}]</b></a></li>
{{ else }}
<li style="display: inline"><a href="/{{ $board.Name }}/{{ $i }}">[{{ $i }}]</a></li>
{{ end }}
{{ end }}
{{ if lt .CurrentPage .TotalPage }}
<li style="display: inline"><button onclick="next('{{ $board.Name }}','{{ $totalPage }}' ,'{{ $page }}')">next</button></li>
{{ end }}
</ul>
{{ end }}
{{ end }}
{{ define "script" }}
<script src="/static/js/footerscript.js"></script>
<script>
viewLink("{{ .Board.Name }}", "{{ .Board.Actor }}")
</script>
{{ end }}
|