You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

46 lines
2.3 KiB

  1. {{ $currentSession := . }}
  2. {{ $_ := newScratch }}
  3. {{- range $k, $v := .Page.Site.Data.sandpointsnamegraph -}}
  4. {{ if eq $currentSession.File.Dir (printf "%s/" $k) }}
  5. {{ $_.Add "depth" (index $v "depth") }}
  6. {{ if eq (index $v "depth") "mantle" }}
  7. {{ $_.Add "home" (index $v "in" 0) }}
  8. {{ end }}
  9. {{ if eq (index $v "depth") "crust" }}
  10. {{ $_.Add "home" (index (index $currentSession.Site.Data.sandpointsnamegraph (index $v "in" 0)) "in" 0) }}
  11. {{ $_.Add "mantle" (index $v "in" 0) }}
  12. {{ $_.Add "mantle_has" (index (index $currentSession.Site.Data.sandpointsnamegraph (index $v "in" 0)) "has" 1) }}
  13. {{ end }}
  14. {{ end }}
  15. {{- end -}}
  16. <div class="header">
  17. <a title="{{ $.Site.Home.Title }}'s Bibliotheke" href="/library/BROWSE_LIBRARY.html" class="bibliotheke" target="_blank">
  18. <img src="/images/bibliotheke.svg" />
  19. </a>
  20. <div class="breadcrumbs">
  21. {{ if ne ($_.Get "depth") "core" }}
  22. <a href="{{ with $currentSession.Site.GetPage (printf "/%s/index.md" ($_.Get "home")) }}{{ .RelPermalink }}{{ end }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}"><span class="sup">{{ with $currentSession.Site.GetPage (printf "/%s/index.md" ($_.Get "home")) }}{{ substr .Title 0 1 }}</span><i>{{ substr .Title 1 }}</i></a>{{ end }}
  23. {{ end }}
  24. {{ if eq ($_.Get "depth") "mantle" }}
  25. <span class="mantlebar"><i> » <a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ .Title }}</a></i></span>
  26. {{ end }}
  27. {{ if eq ($_.Get "depth") "crust" }}
  28. {{ $.Scratch.Set "counter" 0 }}
  29. {{ range where $.Site.RegularPages ".Section" ($_.Get "mantle") }}
  30. {{ if in (index .Params (printf "has_%s" ($_.Get "mantle_has"))) $currentSession.File.LogicalName }}
  31. {{ $.Scratch.Set "counter" (add ($.Scratch.Get "counter") 1) }}
  32. {{ if lt ($.Scratch.Get "counter") 2 }}
  33. <span><i> » <a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ .Title }}</a></i></span>
  34. {{ end }}
  35. {{ end }}
  36. {{ end }}
  37. <span class="mantlebar"><i> » <a href="{{ $currentSession.RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ $currentSession.Title }}</a></i></span>
  38. {{ end }}
  39. </div>
  40. </div>