#nav: fix arrow nav for unlisted pages #184 #185

This commit is contained in:
Sören Weber 2022-02-18 02:13:35 +01:00
parent 0363998519
commit a856400626
No known key found for this signature in database
GPG key ID: 07D17FF580AE7589
7 changed files with 13 additions and 16 deletions

View file

@ -27,7 +27,7 @@ title = "Hugo Relearn Documentation"
# settings specific to this theme's features; choose to your likings and
# consult this documentation for explaination
[params]
editURL = "https://github.com/McShelby/hugo-theme-relearn/edit/main/exampleSite/content/"
editURL = "https://github.com/McShelby/hugo-theme-relearn/edit/main/exampleSite/content"
description = "Documentation for Hugo Relearn Theme"
author = "Sören Weber"
showVisitedLinks = true
@ -105,7 +105,7 @@ title = "Hugo Relearn Documentation"
[[Languages.en.menu.shortcuts]]
name = "<i class='fas fa-fw fa-bullhorn'></i> Credits"
url = "credits/"
url = "more/credits/"
weight = 30
[[Languages.en.menu.shortcuts]]
@ -145,7 +145,7 @@ title = "Hugo Relearn Documentation"
[[Languages.pir.menu.shortcuts]]
name = "<i class='fas fa-fw fa-bullhorn'></i> Crrredits"
url = "credits/"
url = "more/credits/"
weight = 30
[[Languages.pir.menu.shortcuts]]

View file

@ -31,7 +31,7 @@ weight = 20
[[menu.shortcuts]]
name = "<i class='fas fa-fw fa-bullhorn'></i> Credits"
url = "credits/"
url = "more/credits/"
weight = 30
[[menu.shortcuts]]
@ -86,7 +86,7 @@ Example from the current website:
[[Languages.en.menu.shortcuts]]
name = "<i class='fas fa-fw fa-bullhorn'></i> Credits"
url = "credits/"
url = "more/credits/"
weight = 30
[[Languages.en.menu.shortcuts]]
@ -120,7 +120,7 @@ Example from the current website:
[[Languages.pir.menu.shortcuts]]
name = "<i class='fas fa-fw fa-bullhorn'></i> Crrredits"
url = "credits/"
url = "more/credits/"
weight = 30
[[Languages.pir.menu.shortcuts]]

View file

@ -1,10 +1,6 @@
+++
disableToc = true
title = "Showcase"
[_build]
render = "always"
list = "never"
publishResources = true
+++
## [GoboLinux Wiki](https://wiki.gobolinux.org/) by GoboLinux.org

View file

@ -1,9 +1,5 @@
+++
disableToc = true
title = "Showcase"
[_build]
render = "always"
list = "never"
publishResources = true
+++
{{< piratify >}}

View file

@ -32,8 +32,13 @@
<div id="top-bar"><div>
{{- $showPrevNext := (and (not .Params.disableNextPrev) (not .Site.Params.disableNextPrev)) }}
{{- if $showPrevNext }}
{{- $parent := .Parent }}
{{- $ispublished := true }}
{{- if $parent }}
{{- $ispublished = gt (int (len $parent.Permalink)) 0 }}
{{- end }}
<div class="navigation">
{{- if ($.Scratch.Get "relearnNextPage") }}
{{- if and $ispublished ($.Scratch.Get "relearnNextPage") }}
{{- with ($.Scratch.Get "relearnNextPage") }}
<a class="nav nav-next" href="{{.RelPermalink}}" title="{{.Title}}"><i class="fas fa-chevron-right fa-fw"></i></a>
{{- end }}
@ -42,7 +47,7 @@
{{- end }}
</div>
<div class="navigation">
{{- if ($.Scratch.Get "relearnPrevPage") }}
{{- if and $ispublished ($.Scratch.Get "relearnPrevPage") }}
{{- with ($.Scratch.Get "relearnPrevPage") }}
<a class="nav nav-prev" href="{{.RelPermalink}}" title="{{.Title}}"><i class="fas fa-chevron-left fa-fw"></i></a>
{{- end}}