diff options
author | mms <michal@sapka.me> | 2023-11-29 11:39:18 +0100 |
---|---|---|
committer | mms <michal@sapka.me> | 2023-11-29 11:39:18 +0100 |
commit | c595e8349e47306668bf7abf84499f59ed23a2c0 (patch) | |
tree | ebd62d5a150aacfac7590812371187f90d361cd3 /layouts | |
parent | 946c12e6b1ee831120fbaf77c2d2ac0ca6433b79 (diff) |
feat: move topnav into header
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/_default/baseof.html | 7 | ||||
-rw-r--r-- | layouts/_default/single.html | 2 | ||||
-rw-r--r-- | layouts/partials/back_nav.html | 9 |
3 files changed, 11 insertions, 7 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index c05e72b..a1395ad 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -63,10 +63,8 @@ <div class="name"> <nav> - <h1>{{partial "site-name" . }}</h1> - {{ if not (in .Page.Params.category "msw") }} - <a href="/">Part of MSW</a> - {{ end }} + <h1>{{ .Page.Title }}</h1> + {{ partial "back_nav" . }} </nav> </div> </header> @@ -74,7 +72,6 @@ <main class="right-column"> - {{ partial "back_nav" . }} {{ block "main" . }} {{ end }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 53f7f35..5886803 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,6 +1,6 @@ {{ define "main" }} <article> - <h2>{{ .Page.Title }}</h2> + <br> {{- if not (eq .Page.Type "special") }} {{ if in .Page.Params.category "star-trek" }} Earthdate diff --git a/layouts/partials/back_nav.html b/layouts/partials/back_nav.html index d900a08..59698dd 100644 --- a/layouts/partials/back_nav.html +++ b/layouts/partials/back_nav.html @@ -1,6 +1,7 @@ +{{ if not .Page.Params.noback }} <nav class="back-link"> {{ if .Page.Params.hardback }} - <a href="/">← back to MSW</a> + <a href="/">← back to Homepage</a> {{ else if in .Page.Params.category "star-trek" }} <a href="/star-trek/">← back to Space Cadet Log</a> {{ else if in .Page.Params.Category "site-info" }} @@ -8,4 +9,10 @@ {{ else if in .Page.Params.Category "bsd" }} <a href="/bsd/">← Back to Demonic BSD Site</a> {{ end }} + +{{ if not .Page.Params.hardback }} + <br> + <a href="/">↞ back to Homepage</a> +{{ end }} </nav> +{{ end }} |