mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2025-01-18 10:50:24 +00:00
children: set containerstyle automatically according to style #192
This commit is contained in:
parent
138e88205c
commit
9793100216
1 changed files with 3 additions and 0 deletions
|
@ -5,6 +5,9 @@
|
|||
{{- $withDescription := .Get "description" | default false }}
|
||||
{{- $sortTerm := .Get "sort" | lower }}
|
||||
{{- $containerstyle := .Get "containerstyle" | default "ul" }}
|
||||
{{- if( and (not (eq $style "li") ) (eq $containerstyle "ul" ) ) }}
|
||||
{{- $containerstyle = "div" }}
|
||||
{{- end }}
|
||||
|
||||
{{ (printf "<%s class=\"children children-%s children-sort-%s\">" $containerstyle $style $sortTerm)|safeHTML }}
|
||||
{{- $pages := .Page.Pages }}
|
||||
|
|
Loading…
Reference in a new issue