57 lines
2.3 KiB
HTML
57 lines
2.3 KiB
HTML
{{- define "singlebody" -}}
|
||
{{ $s := partialCached "scratch.html" . }}
|
||
{{ $p := $.GetPage .Params.print }}
|
||
{{ $scratch := $s.Get (printf "/%s" $p.File) }}
|
||
|
||
{{ $currentDir := "" }}
|
||
{{ with .File }}
|
||
{{ $currentDir = .Dir }}
|
||
{{ end }}
|
||
|
||
<div class="print0">{{ partial "printsinglebody.html" $p }}</div>
|
||
<div class="content">{{ $p.Content }}</div>
|
||
|
||
{{ range $scratch.has_children }}
|
||
<div class="crustpage">
|
||
{{ $addS := len .Params.authors }}
|
||
{{ range $n, $authorFile := .Params.authors }}
|
||
{{ $author := $.GetPage (printf "/author/%s" $authorFile) }}
|
||
{{ if eq $n 0 }}
|
||
<div class="runningAuthors"><span class="sup">author{{ with (gt $addS 1) }}s{{ end }}⁄</span><a href="#{{ $author.File.LogicalName }}">{{ $author.Title }}</a>
|
||
{{ else }}
|
||
, <a href="#{{ $author.File.LogicalName }}">{{ $author.Title }}</a>
|
||
{{ end }}
|
||
{{ end }}
|
||
{{ with .Params.authors }}</div>{{ end }}
|
||
|
||
{{ $tit := .Title }}
|
||
{{ if gt (len .Title) 54 }}
|
||
{{ $tit = printf "%s…" (substr .Title 0 50) }}
|
||
{{ end }}
|
||
<div class="runningTitle"><span class="sup">{{ index $scratch.crust 0 }}⁄</span><a href="#{{ .File.LogicalName }}">{{ $tit }}</a></div>
|
||
{{ partial "printsinglebody.html" . }}
|
||
{{ .Content }}
|
||
{{ end }}
|
||
|
||
{{ range where $.Site.RegularPages "Section" "in" (slice "author" "editor") }}
|
||
<div class="authorpage">
|
||
<div class="runningTitle runningAuthors"><span class="sup">{{ index $scratch.mantle 0 }}⁄</span><a href="#{{ $p.File.LogicalName }}">{{ $p.Title }}</a></div>
|
||
<div id="{{ .File.LogicalName }}" class="{{ $scratch.depth | default "crust" }}title"><span class="supt">{{ substr .File.Dir 0 -1 }}⁄</span>{{ .Title }}</div>
|
||
{{ .Content }}
|
||
|
||
{{ if in .Page.Site.Params.sandpointsMentionedIn (substr .File.Dir 0 -1) }}
|
||
{{ $ss := $s.Get (printf "/%s" .File) }}
|
||
<div class="has hasmentionedin">
|
||
{{ with $ss }}
|
||
<div class="hassup">mentioned in⁄</div>
|
||
{{ end }}
|
||
<div class="afterhas">
|
||
{{ range $ss.backlinks }}
|
||
<div class="{{ $ss.child_depth }}">
|
||
<a href="#{{ .File.LogicalName }}">{{ .Title }}</a>
|
||
</div>
|
||
{{ end }}
|
||
</div></div>
|
||
{{ end }}
|
||
{{ end }}
|
||
{{- end -}}
|