adds predefined link to "home" for non triad pages

master
Marcell Mars 1 year ago
parent 5239392dd5
commit f9e26cc524

@ -52,6 +52,9 @@
<img src="/images/bibliotheke.svg" /> <img src="/images/bibliotheke.svg" />
</a> </a>
<div class="breadcrumbs"> <div class="breadcrumbs">
{{ if and (not $scratch.depth) $.Site.Params.sandpointsHome }}
<a href="{{ with $.GetPage $.Site.Params.sandpointsHome }}{{ .RelPermalink }}{{ end }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}"><span class="supt">{{ with $.GetPage $.Site.Params.sandpointsHome }}{{ substr .Title 0 1 }}</span><i>{{ substr .Title 1 }}</i></a>{{ end }}
{{ end }}
{{ if eq $scratch.depth "mantle" }} {{ if eq $scratch.depth "mantle" }}
{{ with gt (len $scratch.is_in) 1 }} {{ with gt (len $scratch.is_in) 1 }}
<div class="ddmenu"> <div class="ddmenu">

@ -12,6 +12,10 @@ disableKinds = ["RSS", "sitemap"]
[params] [params]
description = "This is an example description in Sandpoints Theme's example config file." description = "This is an example description in Sandpoints Theme's example config file."
## sandpointsHome renders link to predefined home if page not in triad
#
# sandpointsHome = section/page.md
## sandpointsGiteaUrl is used in layouts/partials/header.html to generate links in admin ui bar ## sandpointsGiteaUrl is used in layouts/partials/header.html to generate links in admin ui bar
# #
# sandpointsGiteaUrl = "https://git.sandpoints.org/Drawwell/SimpleSandpoints" # sandpointsGiteaUrl = "https://git.sandpoints.org/Drawwell/SimpleSandpoints"

@ -53,6 +53,9 @@
<img src="/images/bibliotheke.svg" /> <img src="/images/bibliotheke.svg" />
</a> </a>
<div class="breadcrumbs"> <div class="breadcrumbs">
{{ if and (not $scratch.depth) $.Site.Params.sandpointsHome }}
<a href="{{ with $.GetPage $.Site.Params.sandpointsHome }}{{ .RelPermalink }}{{ end }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}"><span class="supt">{{ with $.GetPage $.Site.Params.sandpointsHome }}{{ substr .Title 0 1 }}</span><i>{{ substr .Title 1 }}</i></a>{{ end }}
{{ end }}
{{ if eq $scratch.depth "mantle" }} {{ if eq $scratch.depth "mantle" }}
{{ with gt (len $scratch.is_in) 1 }} {{ with gt (len $scratch.is_in) 1 }}
<div class="ddmenu"> <div class="ddmenu">

Loading…
Cancel
Save