diff options
author | FChannel <> | 2022-06-04 15:12:24 -0700 |
---|---|---|
committer | FChannel <> | 2022-06-19 12:53:29 -0700 |
commit | 0b97866be3a15f64170673af9813b39cbc585db5 (patch) | |
tree | 0949491e1ccccb9d3861db2553c72a4794591903 /views/partials | |
parent | 60752f58ab0eade30e88c1e98ad530a4b151586e (diff) |
archive page works
Diffstat (limited to 'views/partials')
-rw-r--r-- | views/partials/post_nav.html | 12 | ||||
-rw-r--r-- | views/partials/top.html | 4 |
2 files changed, 8 insertions, 8 deletions
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 @@ -<!-- TODO: showArchive function needs to be fixed - \{\{ if showArchive }} - <li>[<a href="/{{ .Board.Name }}/archive">Archive</a>]</li> - \{\{ end }} - --> -<li>[<a href="#top" id="bottom">Top</a>]</li> +{{ if ne .ReturnTo "catalog" }} +<li>[<a href="/{{ .Board.Name }}/catalog">Catalog</a>]</li> +{{ end }} +{{ if and (ne .ReturnTo "archive") (showArchive .Board.Actor) }} +<li>[<a href="/{{ .Board.Name }}/archive">Archive</a>]</li> +{{ end }} <li>[<a href="javascript:location.reload()">Refresh</a>]</li> 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 @@ <p style="text-align: center;">{{ .Board.Summary }}</p> {{ $len := len .Posts }} {{ if eq $len 0 }} - {{ if .Board.InReplyTo }} + {{ if eq .PostType "reply" }} <h3 id="newpostbtn" state="0" style="display: none; margin-bottom:100px;">[<a href="javascript:startNewPost()">Post a Reply</a>]</h3> - {{ else }} + {{ else if eq .PostType "new" }} <h3 id="newpostbtn" state="0" style="display: none; margin-bottom:100px;">[<a href="javascript:startNewPost()">Start a New Thread</a>]</h3> {{ end }} <!-- end if inreplyto--> <div id="newpost"> |