and more of course...

This commit is contained in:
Marcell Mars 2020-12-15 02:10:32 +01:00
parent 1c8bf451ef
commit 4135a7b057

View file

@ -1,20 +1,20 @@
{{ define "singlebody" }} {{ define "singlebody" }}
{{ $currentNode := . }} {{ $currentNode := . }}
{{ $currentDir := "" }} {{ $currentDir := "" }}
{{ with .File }} {{ with .File }}
{{ $currentDir = .Dir }} {{ $currentDir = .Dir }}
{{ end }} {{ end }}
{{ $currentFile := (printf "/%s" .File) }} {{ $currentFile := (printf "/%s" .File) }}
<div class="coretitle"><span class="supt">Sitemap{{ substr $.Site.Title 0 1 }}</span>{{ substr $.Site.Title 1 }} ({{ $currentDir }})</div> <div class="coretitle"><span class="supt">Sitemap{{ substr $.Site.Title 0 1 }}</span>{{ substr $.Site.Title 1 }} ({{ $currentDir }})</div>
{{ $s := partialCached "scratch.html" . }} {{ $s := partialCached "scratch.html" . }}
{{ $noTriad := (slice) }} {{ $noTriad := (slice) }}
{{ range $p := .Site.RegularPages }} {{ range $p := .Site.RegularPages }}
{{ $scratch := $s.Get (printf "/%s" $p.File) }} {{ $scratch := $s.Get (printf "/%s" $p.File) }}
{{ if eq $scratch.depth "core" }} {{ if eq $scratch.depth "core" }}
<div class="sitemap" ><div class="{{ with $p.File }}{{ if eq $currentDir .Dir }}highline{{ end }}{{ end }}"><a href="{{- $p.RelPermalink -}}{{- if eq hugo.Environment "offline" -}}index.html{{- end -}}"{{- with $p.Title}} title="{{- $p.Title -}}"{{- end -}}><span class="sup">{{- substr $p.File.Dir 0 -1 -}}</span>{{- $p.Title -}}</a></div> <div class="sitemap" ><div class="{{ with $p.File }}{{ if eq $currentDir .Dir }}highline{{ end }}{{ end }}"><a href="{{- $p.RelPermalink -}}{{- if eq hugo.Environment "offline" -}}index.html{{- end -}}"{{- with $p.Title}} title="{{- $p.Title -}}"{{- end -}}><span class="sup">{{- substr $p.File.Dir 0 -1 -}}</span>{{- $p.Title -}}</a></div>
{{ range $coreKid := $scratch.has_children }} {{ range $coreKid := $scratch.has_children }}
<div class="sitemap"><a href="{{- $coreKid.RelPermalink -}}{{- if eq hugo.Environment "offline" -}}index.html{{- end -}}"{{- with $coreKid.Title}} title="{{- $coreKid.Title -}}"{{- end -}}><div class="{{ with $coreKid.File }}{{ if eq $currentDir .Dir }}highline{{ end }}{{ end }}"><span class="sup">{{- substr $coreKid.File.Dir 0 -1 -}}</span>{{- $coreKid.Title -}}</a></div> <div class="sitemap"><a href="{{- $coreKid.RelPermalink -}}{{- if eq hugo.Environment "offline" -}}index.html{{- end -}}"{{- with $coreKid.Title}} title="{{- $coreKid.Title -}}"{{- end -}}><div class="{{ with $coreKid.File }}{{ if eq $currentDir .Dir }}highline{{ end }}{{ end }}"><span class="sup">{{- substr $coreKid.File.Dir 0 -1 -}}</span>{{- $coreKid.Title -}}</a></div>
{{ $scratchCKid := $s.Get (printf "/%s" $coreKid.File) }} {{ $scratchCKid := $s.Get (printf "/%s" $coreKid.File) }}