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.

102 lines
5.5 KiB

  1. {{ $s := partialCached "scratch.html" . }}
  2. {{ $currentDir := "" }}
  3. {{ with .File }}
  4. {{ $currentDir = .Dir }}
  5. {{ end }}
  6. {{ $currentFile := (printf "/%s" .File) }}
  7. {{ $scratch := $s.Get $currentFile }}
  8. {{ $is_in_ := newScratch }}
  9. {{ with eq $scratch.depth "crust" }}
  10. {{ range $scratch.is_in }}
  11. {{ range $k,$v := $s.Get (printf "/%s" .File) }}
  12. {{ if eq $k "is_in" }}
  13. {{ range $v }}
  14. {{ $is_in_.Set (printf "/%s" .File) (printf "/%s" .File) }}
  15. {{ end }}
  16. {{ end }}
  17. {{ end }}
  18. {{ end }}
  19. {{ end }}
  20. {{ $is_in_is_in := (slice) }}
  21. {{ range $is_in_.Values }}
  22. {{ $is_in_is_in = $is_in_is_in | append ($.GetPage .) }}
  23. {{ end }}
  24. {{ if eq hugo.Environment "gitea" }}
  25. <div class="headiter" id="preview">
  26. <a class="edit-button" target="_blank" href="{{ $.Site.Params.sandpointsGiteaUrl }}/_edit/master/content/{{ .File }}">EDIT_THIS</a>
  27. {{ with $scratch.core }}<a class="edit-button" target="_blank" href="{{ $.Site.Params.sandpointsGiteaUrl }}/_new/master/content/{{ index . 0 }}/">ADD_{{ index . 0 | upper }}</a>{{ end }}
  28. {{ with $scratch.mantle }}<a class="edit-button" target="_blank" href="{{ $.Site.Params.sandpointsGiteaUrl }}/_new/master/content/{{ index . 0 }}/">ADD_{{ index . 0 | upper }}</a>{{ end }}
  29. {{ with $scratch.crust }}<a class="edit-button" target="_blank" href="{{ $.Site.Params.sandpointsGiteaUrl }}/_new/master/content/{{ index . 0 }}/">ADD_{{ index . 0 | upper }}</a>{{ end }}
  30. {{ if not $scratch.core }}<a class="edit-button" target="_blank" href="{{ $.Site.Params.sandpointsGiteaUrl }}/_new/master/content/{{ $currentDir }}">ADD_{{ substr $currentDir 0 -1 | upper }}</a>{{ end }}
  31. <a class="edit-button" target="_blank" href="{{ $.Site.Params.sandpointsGiteaUrl }}/_edit/master/PUBLISH.trigger.md">PUBLISH</a>
  32. <a class="edit-button" target="_blank" href="{{ $.Site.Params.sandpointsGiteaUrl }}"> ? </a>
  33. </div>
  34. {{ end }}
  35. <div class="header">
  36. <a title="{{ $.Site.Home.Title }}'s Bibliotheke" href="/library/BROWSE_LIBRARY.html" class="bibliotheke" target="_blank">
  37. <img src="/images/bibliotheke.svg" />
  38. </a>
  39. <div class="breadcrumbs">
  40. {{ if eq $scratch.depth "mantle" }}
  41. {{ with gt (len $scratch.is_in) 1 }}
  42. <div class="ddmenu">
  43. <input id="toggly0" type="checkbox">
  44. <label for="toggly0" tabindex="1"><span class="sup">cf.&nbsp;</span><a href="{{ with (index $scratch.is_in 0) }}{{ .RelPermalink }}{{ end }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ with index $scratch.is_in 0 }}<i>{{ .Title }}</i></a>&nbsp;{{ end }}</label>
  45. <div class="hiddendiv">
  46. <ul class="mt-4">
  47. {{ range after 1 $scratch.is_in }}
  48. <li><a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}"><i>{{ .Title }}</i></a></li>
  49. {{ end }}
  50. </ul>
  51. </div>
  52. </div>
  53. {{ else }}
  54. <a href="{{ with (index $scratch.is_in 0) }}{{ .RelPermalink }}{{ end }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}"><span class="supt">{{ with (index $scratch.is_in 0) }}{{ substr .Title 0 1 }}</span><i>{{ substr .Title 1 }}</i></a>{{ end }}
  55. {{ end }}
  56. <span class="mantlebar"><i> » <a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ .Title }}</a></i></span>
  57. {{ end }}
  58. {{ if eq $scratch.depth "crust" }}
  59. {{ with gt (len $is_in_is_in) 1 }}
  60. <div class="ddmenu">
  61. <input id="toggly1" type="checkbox">
  62. <label for="toggly1" tabindex="1"><span class="sup">cf.&nbsp;</span><a href="{{ with (index $is_in_is_in 0) }}{{ .RelPermalink }}{{ end }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ with (index $is_in_is_in 0) }}<i>{{ .Title }}</i></a>&nbsp;{{ end }}</label>
  63. <div class="hiddendiv">
  64. <ul class="mt-4">
  65. {{ range after 1 $is_in_is_in }}
  66. <li><a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}"><i>{{ .Title }}</i></a></li>
  67. {{ end }}
  68. </ul>
  69. </div>
  70. </div>
  71. {{ else }}
  72. {{ $home := index $is_in_is_in 0 }}
  73. <a href="{{ $home.RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}"><span class="supt">{{ substr $home.Title 0 1 }}</span><i>{{ substr $home.Title 1 }}</i></a>
  74. {{ end }}
  75. {{ with gt (len $scratch.is_in) 1 }}
  76. »&nbsp;
  77. <div class="ddmenu">
  78. <input id="toggly" type="checkbox">
  79. <label for="toggly" tabindex="1"><span class="sup">cf.&nbsp;</span><a href="{{ with (index $scratch.is_in 0) }}{{ .RelPermalink }}{{ end }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ with (index $scratch.is_in 0) }}<i>{{ .Title }}</i></a>&nbsp;{{ end }}</label>
  80. <div class="hiddendiv">
  81. <ul class="mt-4">
  82. {{ range after 1 $scratch.is_in }}
  83. <li><a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}"><i>{{ .Title }}</i></a></li>
  84. {{ end }}
  85. </ul>
  86. </div>
  87. </div>
  88. {{ else }}»&nbsp;<a href="{{ with (index $scratch.is_in 0) }}{{ .RelPermalink }}{{ end }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ with (index $scratch.is_in 0) }}<i>{{ .Title }}</i></a>{{ end }}
  89. {{ end }}
  90. <span class="mantlebar"><i> » <a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ .Title }}</a></i></span>
  91. {{ end }}
  92. </div>
  93. </div>