aboutsummaryrefslogtreecommitdiff
path: root/static/archive.html
blob: aa37c9417fd79e61e2d4e6b2cece4017bf1bda4a (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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
{{ define "header" }}
<title>/{{ .Board.Name }}/ - Archive</title>
<meta name="description" content="{{ (index .Posts 0).Content }}">
<meta property="og:url" content="{{ (index .Posts 0).Id }}">
<meta property="og:site_name" content="{{ .Instance.PreferredUsername }}" />

<meta property="og:title" content="{{ (index .Posts 0).Name }}">
<meta property="og:description" content="{{ (index .Posts 0).Content }}">

<meta name="twitter:title" content="{{ (index .Posts 0).Name }}">
<meta name="twitter:description" content="{{ (index .Posts 0).Content }}">
<meta name="twitter:card" content="summary_large_image">

{{ if (index .Posts 0).Preview }}
<meta property="og:image" content="{{ (index .Posts 0).Preview.Href }}" />
<meta name="twitter:image" content="{{ (index .Posts 0).Preview.Href }}" />
{{ end }}

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

{{ define "top" }}
<h1 style="text-align: center; color: #af0a0f;">/{{ .Board.Name }}/ - {{ .Board.PrefName }}</h1>
<p style="text-align: center;">{{ .Board.Summary }}</p>
<h1 style="text-align: center;">Archived Posts</h1>
{{ end }}

{{ define "content" }}
{{ $board := .Board }}

<hr>
<ul style="margin: 0; padding: 0; display: inline;">
  <li style="display: inline"><a href="/{{ $board.Name }}">[Return]</a></li>
  <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>
<hr>

<table align="center" style="width: 900px;">
  <tr>
    {{ if eq $board.ModCred $board.Domain $board.Actor.Id }}
    <td></td>
    {{ end }}
    <th style="width: 100px">No.</th>
    <th>Excerpt</th>
    <th style="width: 100px;"></th>
  </tr>
  {{ range $i, $e := .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>{{ short $board.Actor.Outbox $e.Id }}</td>
    <td>{{ shortExcerpt $e }}</td>
    <td style="text-align: center;"><a href="/{{ $board.Actor.Name }}/{{ short $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>{{ short $board.Actor.Outbox $e.Id }}</td>
    <td>{{ shortExcerpt $e }}</td>
    <td style="text-align: center;"><a href="/{{ $board.Actor.Name }}/{{ short $board.Actor.Outbox $e.Id }}">[View]</a></td>
  </tr>
  {{ end }}
  {{ end }}
</table>

<hr>
<div style="height: 22px;">
     <ul style="position: absolute; left: 5px;  margin: 0; padding: 0; display: inline;">
       <li style="display: inline"><a href="/{{ $board.Name }}">[Return]</a></li>
       <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>
</div>
<hr>

{{ end }}

{{ define "script" }}
<script src="/static/js/footerscript.js"></script>
<script>
  viewLink("{{ .Board.Name }}", "{{ .Board.Actor.Id }}")
</script>
{{ end }}