mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-23 15:57:57 +00:00
25 lines
No EOL
1,020 B
HTML
25 lines
No EOL
1,020 B
HTML
{{- $html := "" }}
|
|
{{- $pages := partialCached "_relearn/pages.gotmpl" (dict "page" .) .Path }}
|
|
{{- range $pages }}
|
|
{{- if not (partialCached "_relearn/pageIsHidden.gotmpl" . .Path) }}
|
|
{{- $html = printf "%s%s" $html (partialCached "_relearn/articleWalker.html" . .Path) }}
|
|
{{- $child := . }}
|
|
{{- range .Site.Params.relearn.dependencies }}
|
|
{{- $has := printf "has%s" .name }}
|
|
{{- $hasnested := printf "relearnHasNested%s" .name }}
|
|
{{- $.Store.Set $hasnested (or ($.Store.Get $hasnested) ($child.Store.Get $hasnested) ($child.Store.Get $has)) }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|
|
|
|
{{- $article := partialCached "_relearn/nestedContent.gotmpl" . .Path }}
|
|
{{- if len $html }}
|
|
{{- $title := partial "title.gotmpl" (dict "page" . "linkTitle" true) }}
|
|
{{- $html = printf `%s
|
|
<section>
|
|
<h1 class="a11y-only">%s</h1>%s
|
|
</section>` $article (T "Subsections" $title | htmlEscape) $html }}
|
|
{{- else }}
|
|
{{- $html = $article }}
|
|
{{- end }}
|
|
{{- return $html }} |