Dotawo/_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/layouts/_default/list.html

36 lines
2.4 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{{ define "singlebody" }}
{{ $currentNode := . }}
{{ $currentDir := "" }}
{{ with .File }}
{{ $currentDir = .Dir }}
{{ end }}
{{ $currentFile := (printf "/%s" .File) }}
<div class="coretitle"><span class="supt">Sitemap{{ substr $.Site.Title 0 1 }}</span>{{ substr $.Site.Title 1 }} {{with $currentDir}}({{ . }}){{ end }}</div>
{{ $s := partialCached "scratch.html" . }}
{{ $noTriad := (slice) }}
{{ range $p := .Site.RegularPages }}
{{ $scratch := $s.Get (printf "/%s" $p.File) }}
{{ 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>
{{ 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>
{{ $scratchCKid := $s.Get (printf "/%s" $coreKid.File) }}
{{ range $mantleKid := $scratchCKid.has_children }}
<div class="sitemap"><div class="{{ with $mantleKid.File }}{{ if eq $currentDir .Dir }} highline{{ end }}{{ end }}"><a href="{{- $mantleKid.RelPermalink -}}{{- if eq hugo.Environment "offline" -}}index.html{{- end -}}"{{- with $mantleKid.Title}} title="{{- $mantleKid.Title -}}"{{- end -}}><span class="sup">{{ with $mantleKid.File }}{{substr .Dir 0 -1 -}}{{ end }}</span>{{- $mantleKid.Title -}}</a></div></div>
{{ end }}
</div>
{{ end }}
{{ else if not (in (slice "core" "mantle" "crust") $scratch.depth)}}
{{ $noTriad = $noTriad | append $p }}
{{ else }}
</div>
{{ end }}
{{ end }}
{{ range $noTriad }}
<div class="sitemap {{ with .File }}{{ if eq $currentDir .Dir }} highline{{ end }}{{ end }}"><a href="{{- .RelPermalink -}}{{- if eq hugo.Environment "offline" -}}index.html{{- end -}}"{{- with .Title }} title="{{- . -}}"{{- end -}}><span class="sup">{{- substr .File.Dir 0 -1 -}}</span>{{- .Title -}}</a></div>
{{ end }}
{{ end }}