|
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- {{ $s := partialCached "scratch.html" . }}
-
- {{ $currentNode := . }}
- {{ $currentDir := "" }}
- {{ with .File }}
- {{ $currentDir = .Dir }}
- {{ end }}
- {{ $currentFile := (printf "/%s" .File) }}
- {{ $scratch := $s.Get $currentFile }}
-
- <div class="{{ $scratch.depth }}title"><span class="sup">{{ substr $currentDir 0 -1 }}⁄{{ substr .Title 0 1 }}</span>{{ substr .Title 1 }}</div></div>
-
- <div class="grid">
- <div class="leftcolumn">
- {{ if ne (trim .Page.TableOfContents "\n") "<nav id=\"TableOfContents\"></nav>" }}
- {{ .Page.TableOfContents }}
- {{ end }}
- </div>
- <div class="rightcolumn">
- {{ if (not (eq $scratch.depth "crust")) }}
- <div class="has">
- <span class="sup">has {{ index $scratch.has 1 }}⁄</span>
- </div>
- <div class="afterhas">
- {{ range index $currentNode.Params (printf "has_%s" (index $scratch.has 1) )}}
- {{ with $.GetPage (printf "%s%s" (printf "/%s/" (index $scratch.has 0)) . ) }}
- <div class="{{ $scratch.child_depth }}">
- <a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ .Title }}</a>
- </div>
- {{ end }}
- {{ end }}
- {{ end }}
-
- {{ if eq $scratch.depth "crust" }}
- <div class="has">
- <span class="sup">in {{ index $scratch.in 1 }}⁄</span>
- </div>
- <div class="afterhas">
- {{ range $scratch.is_in }}
- <div class="{{ substr $currentDir 0 -1 }}">
- <a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ .Title }}</a>
- </div>
- {{ end }}
- {{ end }}
- </div>
- </div>
- </div>
|