2020-12-15 02:09:00 +01:00
|
|
|
|
{{- define "singlebody" -}}
|
2021-02-06 00:15:18 +01:00
|
|
|
|
{{ $cssOutput := "" }}
|
|
|
|
|
{{ $cssHashes := "" }}
|
|
|
|
|
|
2020-12-15 02:09:00 +01:00
|
|
|
|
{{ $s := partialCached "scratch.html" . }}
|
|
|
|
|
{{ $p := $.GetPage .Params.print }}
|
|
|
|
|
{{ $scratch := $s.Get (printf "/%s" $p.File) }}
|
|
|
|
|
|
2023-04-21 17:52:13 +02:00
|
|
|
|
{{ $authorsPages := (slice) }}
|
|
|
|
|
{{ with $p.Params.authors }}
|
|
|
|
|
{{ range $n, $authorFile := . }}
|
|
|
|
|
{{ $author := $.GetPage (printf "/author/%s" $authorFile) }}
|
|
|
|
|
{{ $authorsPages = (uniq $authorsPages) | append $author }}
|
|
|
|
|
{{ end }}
|
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
|
|
{{ $editorsPages := (slice) }}
|
|
|
|
|
{{ with $p.Params.editors }}
|
|
|
|
|
{{ range $n, $editorFile := . }}
|
|
|
|
|
{{ $editor := $.GetPage (printf "/editor/%s" $editorFile) }}
|
|
|
|
|
{{ $editorsPages = (uniq $editorsPages) | append $editor }}
|
|
|
|
|
{{ end }}
|
|
|
|
|
{{ end }}
|
|
|
|
|
|
2020-12-15 02:09:00 +01:00
|
|
|
|
{{ $currentDir := "" }}
|
|
|
|
|
{{ with .File }}
|
|
|
|
|
{{ $currentDir = .Dir }}
|
|
|
|
|
{{ end }}
|
|
|
|
|
|
2021-02-03 02:50:21 +01:00
|
|
|
|
<div class="print0">{{ partial "printsinglebody.html" $p }}</div>
|
|
|
|
|
<div class="content">{{ $p.Content }}</div>
|
2023-05-02 23:36:54 +02:00
|
|
|
|
|
2021-02-03 02:50:21 +01:00
|
|
|
|
{{ range $scratch.has_children }}
|
|
|
|
|
<div class="crustpage">
|
2021-02-08 03:21:20 +01:00
|
|
|
|
{{ $addS := 0 }}
|
|
|
|
|
{{ with .Params.authors }}
|
|
|
|
|
{{ $addS = len . }}
|
|
|
|
|
{{ end }}
|
2023-04-21 17:52:13 +02:00
|
|
|
|
|
|
|
|
|
{{ with .Params.editors }}
|
|
|
|
|
{{ range $n, $editorFile := . }}
|
|
|
|
|
{{ $editor := $.GetPage (printf "/editor/%s" $editorFile) }}
|
|
|
|
|
{{ $editorsPages = (uniq $editorsPages) | append $editor }}
|
|
|
|
|
{{ end }}
|
|
|
|
|
{{ end }}
|
|
|
|
|
|
2021-02-06 00:15:18 +01:00
|
|
|
|
{{ range $n, $authorFile := .Params.authors }}
|
|
|
|
|
{{ $author := $.GetPage (printf "/author/%s" $authorFile) }}
|
2023-04-21 17:52:13 +02:00
|
|
|
|
{{ $authorsPages = (uniq $authorsPages) | append $author }}
|
2021-02-06 00:15:18 +01:00
|
|
|
|
{{ if eq $n 0 }}
|
2021-02-09 04:30:57 +01:00
|
|
|
|
<div class="runningAuthors"><span class="sup">author{{ with (gt $addS 1) }}s{{ end }}⁄</span><a href="#ph-{{ $author.File.UniqueID }}">{{ $author.Title }}</a>
|
2021-02-06 00:15:18 +01:00
|
|
|
|
{{ else }}
|
2021-02-09 04:30:57 +01:00
|
|
|
|
, <a href="#ph-{{ $author.File.UniqueID }}">{{ $author.Title }}</a>
|
2021-02-06 00:15:18 +01:00
|
|
|
|
{{ end }}
|
2021-02-03 02:50:21 +01:00
|
|
|
|
{{ end }}
|
2021-02-06 00:15:18 +01:00
|
|
|
|
{{ with .Params.authors }}</div>{{ end }}
|
|
|
|
|
|
|
|
|
|
{{ $tit := .Title }}
|
|
|
|
|
{{ if gt (len .Title) 54 }}
|
|
|
|
|
{{ $tit = printf "%s…" (substr .Title 0 50) }}
|
|
|
|
|
{{ end }}
|
2021-02-09 04:30:57 +01:00
|
|
|
|
<div class="runningTitle"><span class="sup">{{ index $scratch.crust 0 }}⁄</span><a href="#ph-{{ .File.UniqueID }}">{{ $tit }}</a></div>
|
2021-02-03 02:50:21 +01:00
|
|
|
|
{{ partial "printsinglebody.html" . }}
|
|
|
|
|
{{ .Content }}
|
2021-02-08 03:21:20 +01:00
|
|
|
|
{{ $kid := $s.Get (printf "/%s" .File) }}
|
|
|
|
|
{{ range $kid.has_children }}
|
|
|
|
|
<div class="crustpage">
|
|
|
|
|
{{ $addS := 0 }}
|
|
|
|
|
{{ with .Params.authors }}
|
|
|
|
|
{{ $addS = len . }}
|
|
|
|
|
{{ end }}
|
|
|
|
|
{{ range $n, $authorFile := .Params.authors }}
|
|
|
|
|
{{ $author := $.GetPage (printf "/author/%s" $authorFile) }}
|
|
|
|
|
{{ if eq $n 0 }}
|
2021-02-09 04:30:57 +01:00
|
|
|
|
<div class="runningAuthors"><span class="sup">author{{ with (gt $addS 1) }}s{{ end }}⁄</span><a href="#ph-{{ $author.File.UniqueID }}">{{ $author.Title }}</a>
|
2021-02-08 03:21:20 +01:00
|
|
|
|
{{ else }}
|
2021-02-09 04:30:57 +01:00
|
|
|
|
, <a href="#ph-{{ $author.File.UniqueID }}">{{ $author.Title }}</a>
|
2021-02-08 03:21:20 +01:00
|
|
|
|
{{ end }}
|
|
|
|
|
{{ end }}
|
|
|
|
|
{{ with .Params.authors }}</div>{{ end }}
|
|
|
|
|
|
|
|
|
|
{{ $tit := .Title }}
|
|
|
|
|
{{ if gt (len .Title) 54 }}
|
|
|
|
|
{{ $tit = printf "%s…" (substr .Title 0 50) }}
|
|
|
|
|
{{ end }}
|
2021-02-09 04:30:57 +01:00
|
|
|
|
<div class="runningTitle"><span class="sup">{{ index $scratch.crust 0 }}⁄</span><a href="#ph-{{ .File.UniqueID }}">{{ $tit }}</a></div>
|
2021-02-08 03:21:20 +01:00
|
|
|
|
{{ partial "printsinglebody.html" . }}
|
|
|
|
|
{{ .Content }}
|
|
|
|
|
{{ end }}
|
|
|
|
|
{{ end }}
|
2023-04-21 17:52:13 +02:00
|
|
|
|
|
|
|
|
|
{{ range union (uniq $editorsPages) (uniq $authorsPages) }}
|
2021-02-03 02:50:21 +01:00
|
|
|
|
<div class="authorpage">
|
2021-02-09 04:30:57 +01:00
|
|
|
|
<div class="runningTitle runningAuthors"><span class="sup">{{ index $scratch.mantle 0 }}⁄</span><a href="#ph-{{ $p.File.UniqueID }}">{{ $p.Title }}</a></div>
|
|
|
|
|
<div id="ph-{{ .File.UniqueID }}" class="{{ $scratch.depth | default "crust" }}title"><span class="supt">{{ substr .File.Dir 0 -1 }}⁄</span>{{ .Title }}</div>
|
2021-02-03 02:50:21 +01:00
|
|
|
|
{{ .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 }}">
|
2021-02-09 04:30:57 +01:00
|
|
|
|
<a href="#ph-{{ .File.UniqueID }}">{{ .Title }}</a>
|
2021-02-03 02:50:21 +01:00
|
|
|
|
</div>
|
|
|
|
|
{{ end }}
|
|
|
|
|
</div></div>
|
|
|
|
|
{{ end }}
|
|
|
|
|
{{ end }}
|
2020-12-15 02:09:00 +01:00
|
|
|
|
{{- end -}}
|