From 5b52d269faa2ce2014d0feba603a2122361cf4eb Mon Sep 17 00:00:00 2001 From: FChannel <> Date: Fri, 29 Apr 2022 10:36:43 -0700 Subject: general layout organization --- views/catalog.html | 39 +++++------------- views/index.html | 6 +-- views/layouts/main.html | 26 +++++++++--- views/npost.html | 80 ++++++++++++++----------------------- views/nposts.html | 43 +++++--------------- views/partials/general_scripts.html | 1 + views/partials/post_nav.html | 7 ++++ views/partials/post_scripts.html | 2 + views/partials/postscripts.html | 3 -- views/partials/top.html | 2 +- 10 files changed, 84 insertions(+), 125 deletions(-) create mode 100644 views/partials/general_scripts.html create mode 100644 views/partials/post_nav.html create mode 100644 views/partials/post_scripts.html delete mode 100644 views/partials/postscripts.html (limited to 'views') diff --git a/views/catalog.html b/views/catalog.html index c70471e..d4ec009 100644 --- a/views/catalog.html +++ b/views/catalog.html @@ -1,30 +1,11 @@ -{{ define "header" }} -/{{ .page.Board.Name }}/ - catalog - - - - - - - - - - - - -{{ end }} +{{ template "partials/top" .page }} {{ $board := .page.Board }}

@@ -94,16 +75,16 @@ {{ end }} +

+ +{{ template "partials/footer" .page }} +{{ template "partials/general_scripts" .page }} +{{ template "partials/post_scripts" .page }} diff --git a/views/index.html b/views/index.html index e928ace..2bfed28 100644 --- a/views/index.html +++ b/views/index.html @@ -1,6 +1,3 @@ -{{ define "header" }} -{{ .page.Title }} -{{ end }}

{{ .page.Title }}

{{ .page.PreferredUsername }} is a federated image board based on ActivityPub. The current version of the code running on the server is still a work-in-progress product, expect a bumpy ride for the time being. Get the server code here: https://github.com/FChannel0.

@@ -54,3 +51,6 @@
+ +{{ template "partials/footer" .page }} +{{ template "partials/general_scripts" .page }} diff --git a/views/layouts/main.html b/views/layouts/main.html index 41e3412..74b86e4 100644 --- a/views/layouts/main.html +++ b/views/layouts/main.html @@ -1,12 +1,32 @@ + {{ .page.Title }} + + + + + + + + + + + + + + {{ if not (eq .page.Meta.Preview "") }} + + + {{ end }} + + {{ if gt (len .page.ThemeCookie) 0 }} {{ else }} @@ -15,8 +35,6 @@ {{ range .page.Themes }} {{ end }} - - {{ template "header" .page }}