mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2025-09-14 06:55:16 -05:00
WIP? add optional dict to page-list
This commit is contained in:
@@ -1,9 +1,18 @@
|
|||||||
<div class="page-list">
|
{{ $list := dict }}
|
||||||
{{ with . }}
|
{{ $extraclasses := "" }}
|
||||||
|
{{ with try (index . "list") }}
|
||||||
|
{{ if .Err }}
|
||||||
|
{{ $list = $ }}
|
||||||
|
{{ else }}
|
||||||
|
{{ $list = .Value }}
|
||||||
|
{{ $extraclasses = index $ "classes" }}
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
<div class="page-list{{ with $extraclasses }}{{ . }}{{ end }}">
|
||||||
|
{{ with $list }}
|
||||||
{{ range . }}
|
{{ range . }}
|
||||||
<article class="page">
|
|
||||||
{{ .Render "summary" }}
|
{{ .Render "summary" }}
|
||||||
</article>
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<div>
|
<div>
|
||||||
|
Reference in New Issue
Block a user