您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 
 

48 行
1.7 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. <span class="sup">has {{ index $scratch.has 1 }}⁄</span>
  20. </div>
  21. <div class="afterhas">
  22. {{ range index $currentNode.Params (printf "has_%s" (index $scratch.has 1) )}}
  23. {{ with $.GetPage (printf "%s%s" (printf "/%s/" (index $scratch.has 0)) . ) }}
  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. {{ 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>