You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

63 lines
2.1 KiB
HTML

3 years ago
{{ $s := partialCached "scratch.html" . }}
{{ $currentNode := . }}
{{ $currentDir := "" }}
{{ with .File }}
{{ $currentDir = .Dir }}
{{ end }}
{{ $currentFile := (printf "/%s" .File) }}
{{ $scratch := $s.Get $currentFile }}
<div class="{{ $scratch.depth | default "crust" }}title"><span class="supt">{{ substr $currentDir 0 -1 }}:&thinsp;{{ substr .Title 0 1 }}</span>{{ substr .Title 1 }}</div></div>
3 years ago
<div class="grid">
<div class="leftcolumn">
{{ if ne (trim .Page.TableOfContents "\n") "<nav id=\"TableOfContents\"></nav>" }}
{{ .Page.TableOfContents }}
{{ end }}
</div>
<div class="rightcolumn">
3 years ago
{{ if in .Page.Site.Params.sandpointsMentionedIn (substr $currentDir 0 -1) }}
<div class="has">
{{ with $scratch.backlinks }}
<span class="sup">mentioned in</span>
3 years ago
{{ end }}
</div>
<div class="afterhas">
{{ range $scratch.backlinks }}
<div class="{{ $scratch.child_depth }}">
<a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ .Title }}</a>
</div>
3 years ago
{{ end }}
{{ end }}
3 years ago
{{ if and (not (eq $scratch.depth "crust")) $scratch.has_children }}
<div class="has">
{{ with $scratch.has }}
<span class="sup">has {{ $scratch.has }}</span>
3 years ago
{{ end }}
</div>
<div class="afterhas">
{{ range $scratch.has_children }}
<div class="{{ $scratch.child_depth }}">
<a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ .Title }}</a>
</div>
{{ 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>
3 years ago
</div>