Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.
 
 
 
 
 

85 рядки
4.4 KiB

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