Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 
 
 

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