aboutsummaryrefslogtreecommitdiff
path: root/views/archive.html
diff options
context:
space:
mode:
authorFChannel <>2022-06-04 15:12:24 -0700
committerFChannel <>2022-06-19 12:53:29 -0700
commit0b97866be3a15f64170673af9813b39cbc585db5 (patch)
tree0949491e1ccccb9d3861db2553c72a4794591903 /views/archive.html
parent60752f58ab0eade30e88c1e98ad530a4b151586e (diff)
archive page works
Diffstat (limited to 'views/archive.html')
-rw-r--r--views/archive.html60
1 files changed, 60 insertions, 0 deletions
diff --git a/views/archive.html b/views/archive.html
new file mode 100644
index 0000000..a5184a4
--- /dev/null
+++ b/views/archive.html
@@ -0,0 +1,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;">{{ 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;">{{ 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 }}