From 0b97866be3a15f64170673af9813b39cbc585db5 Mon Sep 17 00:00:00 2001 From: FChannel <> Date: Sat, 4 Jun 2022 15:12:24 -0700 Subject: archive page works --- views/archive.html | 60 ++++++++++++++++++++++++++++++++++++++++++++ views/catalog.html | 2 ++ views/npost.html | 4 +-- views/nposts.html | 4 +-- views/partials/post_nav.html | 12 ++++----- views/partials/top.html | 4 +-- 6 files changed, 74 insertions(+), 12 deletions(-) create mode 100644 views/archive.html (limited to 'views') 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 }} + +
+ +
+ +{{ if .page.Posts }} + + + {{ if eq $board.ModCred $board.Domain $board.Actor.Id }} + + {{ end }} + + + + + {{ range $i, $e := .page.Posts }} + {{ if mod $i 2 }} + + {{ if eq $board.ModCred $board.Domain $board.Actor.Id }} + + {{ end }} + + + + + {{ else }} + + {{ if eq $board.ModCred $board.Domain $board.Actor.Id }} + + {{ end }} + + + + + {{ end }} + {{ end }} +
No.Excerpt
[Pop]{{ shortURL $board.Actor.Outbox $e.Id }}{{ shortExcerpt $e }}[View]
[Pop]{{ shortURL $board.Actor.Outbox $e.Id }}{{ shortExcerpt $e }}[View]
+{{ end }} + +
+ + + +
+ +{{ template "partials/bottom" .page }} +{{ template "partials/footer" .page }} +{{ template "partials/general_scripts" .page }} +{{ template "partials/post_scripts" .page }} diff --git a/views/catalog.html b/views/catalog.html index d4ec009..6a99d8f 100644 --- a/views/catalog.html +++ b/views/catalog.html @@ -6,6 +6,7 @@
@@ -81,6 +82,7 @@
diff --git a/views/npost.html b/views/npost.html index 07de021..7c22b9b 100644 --- a/views/npost.html +++ b/views/npost.html @@ -4,8 +4,8 @@
@@ -19,8 +19,8 @@ diff --git a/views/nposts.html b/views/nposts.html index 567b945..9ce120b 100644 --- a/views/nposts.html +++ b/views/nposts.html @@ -4,8 +4,8 @@
{{ template "partials/posts" .page }} @@ -14,8 +14,8 @@
diff --git a/views/partials/post_nav.html b/views/partials/post_nav.html index eab52d1..d999c35 100644 --- a/views/partials/post_nav.html +++ b/views/partials/post_nav.html @@ -1,7 +1,7 @@ - -
  • [Top]
  • +{{ if ne .ReturnTo "catalog" }} +
  • [Catalog]
  • +{{ end }} +{{ if and (ne .ReturnTo "archive") (showArchive .Board.Actor) }} +
  • [Archive]
  • +{{ end }}
  • [Refresh]
  • diff --git a/views/partials/top.html b/views/partials/top.html index 6e3bc4b..dddb206 100644 --- a/views/partials/top.html +++ b/views/partials/top.html @@ -3,9 +3,9 @@

    {{ .Board.Summary }}

    {{ $len := len .Posts }} {{ if eq $len 0 }} - {{ if .Board.InReplyTo }} + {{ if eq .PostType "reply" }} - {{ else }} + {{ else if eq .PostType "new" }} {{ end }}
    -- cgit v1.2.3