SandpointsTheme/layouts/print/single.html

32 lines
1.4 KiB
HTML
Raw Normal View History

2025-05-04 15:11:06 +02:00
{{- define "print" -}}
{{- $currentPage := . -}}
{{- range $source := $currentPage.Params.print[0].render.static -}}
{{- with site.GetPage (printf "%s" $source) -}}
{{- $sourcePage := . -}}
{{- partial "single-page-graph.html" . -}}
{{- partial "page-header.html" . -}}
<main class="content">
<div class="title"><span class="supt">{{ $sourcePage.Section }}</span>{{ $sourcePage.Title }}</div>
<div class="page-menu">
<aside class="toc">
{{ if ne (trim $sourcePage.TableOfContents "\n") "<nav id=\"TableOfContents\"></nav>" }}
{{ $sourcePage.TableOfContents }}
{{ end }}
</aside>
<aside class="graph-menus">
{{- partial "menu_verbs.html" . -}}
{{- partial "deferred_page_graph.html" . -}}
</aside>
</div>
<div class="article">{{ $sourcePage.Content }}</div>
</main>
{{- range $param := $currentPage.Params.print.iterate -}}
{{- printf "Iterate params: %#v" . -}}
{{- with index $sourcePage.Params $param -}}
{{- printf "Iteration: %#v" . -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{- end -}}