Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 
 
 

49 rader
1.6 KiB

  1. {{ $s := partialCached "scratch.html" . }}
  2. {{ $currentNode := . }}
  3. {{ $currentDir := "" }}
  4. {{ with .File }}
  5. {{ $currentDir = .Dir }}
  6. {{ end }}
  7. {{ $currentFile := (printf "/%s" .File) }}
  8. {{ $scratch := $s.Get $currentFile }}
  9. <div class="{{ $scratch.depth }}title"><span class="sup">{{ substr $currentDir 0 -1 }}⁄{{ substr .Title 0 1 }}</span>{{ substr .Title 1 }}</div></div>
  10. <div class="grid">
  11. <div class="leftcolumn">
  12. {{ if ne (trim .Page.TableOfContents "\n") "<nav id=\"TableOfContents\"></nav>" }}
  13. {{ .Page.TableOfContents }}
  14. {{ end }}
  15. </div>
  16. <div class="rightcolumn">
  17. {{ if (not (eq $scratch.depth "crust")) }}
  18. <div class="has">
  19. {{ if isset $scratch "has" }}
  20. <span class="sup">has {{ $scratch.has }}⁄</span>
  21. {{ end }}
  22. </div>
  23. <div class="afterhas">
  24. {{ range $scratch.has_children }}
  25. <div class="{{ $scratch.child_depth }}">
  26. <a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ .Title }}</a>
  27. </div>
  28. {{ end }}
  29. {{ end }}
  30. {{ if eq $scratch.depth "crust" }}
  31. <div class="has">
  32. <span class="sup">in {{ index $scratch.in 1 }}⁄</span>
  33. </div>
  34. <div class="afterhas">
  35. {{ range $scratch.is_in }}
  36. <div class="{{ substr $currentDir 0 -1 }}">
  37. <a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ .Title }}</a>
  38. </div>
  39. {{ end }}
  40. {{ end }}
  41. </div>
  42. </div>
  43. </div>