diff options
Diffstat (limited to 'layouts/partials/section-word-list.html')
-rw-r--r-- | layouts/partials/section-word-list.html | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/layouts/partials/section-word-list.html b/layouts/partials/section-word-list.html new file mode 100644 index 0000000..273c22b --- /dev/null +++ b/layouts/partials/section-word-list.html @@ -0,0 +1,37 @@ +{{- $collection := index .Data (.Feature.collection | default "features" ) -}} +{{- $data := index $collection .Feature.feature }} +{{- if eq .Feature.style "list" -}} + <div class="item"> + {{ range $data }} + {{- if reflect.IsMap . -}} + {{- range .list -}} + <li>{{.}}</li> + {{- end -}} + {{- else -}} + <li>{{.}}</li> + {{- end -}} + {{ end }} + </div> +{{- else if eq .Feature.style "compact" -}} + <div class="item"> + <dl> + {{ range $data }} + <dt>{{ .groupName }}</dt> + <dd> + {{- range .list -}} + <span>{{.}}</span> + {{- end -}} + </dd> + {{ end }} + </dl> + </div> +{{- else -}} + {{ range $data }} + <div class="item"> + <h2 class="item-title">{{ .groupName }}</h2> + {{ range .list }} + <li>{{.}}</li> + {{ end }} + </div> + {{ end }} +{{- end -}} |