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.
 
 
 
 
 

47 lines
1.6 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. <div class="{{ $scratch.depth }}title"><span class="sup">{{ substr $currentDir 0 -1 }}⁄{{ substr .Title 0 1 }}</span>{{ substr .Title 1 }}</div></div>
  9. <div class="grid">
  10. <div class="leftcolumn">
  11. {{ if ne (trim .Page.TableOfContents "\n") "<nav id=\"TableOfContents\"></nav>" }}
  12. {{ .Page.TableOfContents }}
  13. {{ end }}
  14. </div>
  15. <div class="rightcolumn">
  16. {{ if (not (eq $scratch.depth "crust")) }}
  17. <div class="has">
  18. {{ if isset $scratch "has" }}
  19. <span class="sup">has {{ index $scratch.has 1 }}⁄</span>
  20. {{ end }}
  21. </div>
  22. <div class="afterhas">
  23. {{ range $scratch.has_children }}
  24. <div class="{{ $scratch.child_depth }}">
  25. <a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ .Title }}</a>
  26. </div>
  27. {{ end }}
  28. {{ end }}
  29. {{ if eq $scratch.depth "crust" }}
  30. <div class="has">
  31. <span class="sup">in {{ index $scratch.in 1 }}⁄</span>
  32. </div>
  33. <div class="afterhas">
  34. {{ range $scratch.is_in }}
  35. <div class="{{ substr $currentDir 0 -1 }}">
  36. <a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ .Title }}</a>
  37. </div>
  38. {{ end }}
  39. {{ end }}
  40. </div>
  41. </div>
  42. </div>