mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-30 11:13:06 +00:00
35 lines
1.1 KiB
HTML
35 lines
1.1 KiB
HTML
|
{{- $showtitle := .showtitle | default false }}
|
||
|
{{- if eq (printf "%T" $showtitle) "string" }}
|
||
|
{{- $showtitle = (eq $showtitle "true") }}
|
||
|
{{- end }}
|
||
|
{{- $showdivider := .showdivider | default false }}
|
||
|
{{- if eq (printf "%T" $showdivider) "string" }}
|
||
|
{{- $showdivider = (eq $showdivider "true") }}
|
||
|
{{- end }}
|
||
|
{{- $showhidden := .showhidden | default false }}
|
||
|
{{- if eq (printf "%T" $showhidden) "string" }}
|
||
|
{{- $showhidden = (eq $showhidden "true") }}
|
||
|
{{- end }}
|
||
|
{{- $hidevisible := .hidevisible | default false }}
|
||
|
{{- if eq (printf "%T" $hidevisible) "string" }}
|
||
|
{{- $hidevisible = (eq $hidevisible "true") }}
|
||
|
{{- end }}
|
||
|
|
||
|
{{- $pages := partialCached "_relearn/pages.gotmpl" (dict "page" .page) }}
|
||
|
{{- $needsdivider := false }}
|
||
|
{{- range $pages }}
|
||
|
{{- $display := or
|
||
|
(and $.showhidden (or .Params.hidden (eq .Title "")) )
|
||
|
(and (not $.hidevisible) (not (or .Params.hidden (eq .Title ""))) )
|
||
|
}}
|
||
|
{{- if $display }}
|
||
|
{{ if and $.showdivider $needsdivider }}
|
||
|
---
|
||
|
{{ end }}
|
||
|
{{ if and $.showtitle .Title }}
|
||
|
# {{ .Title }}
|
||
|
{{ end }}
|
||
|
{{ .RenderShortcodes }}
|
||
|
{{ end }}
|
||
|
{{- $needsdivider = true }}
|
||
|
{{- end }}
|