mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2025-09-13 22:45:16 -05:00
WIP? add optional dict to page-list
This commit is contained in:
@@ -1,9 +1,18 @@
|
||||
<div class="page-list">
|
||||
{{ with . }}
|
||||
{{ $list := dict }}
|
||||
{{ $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 . }}
|
||||
<article class="page">
|
||||
{{ .Render "summary" }}
|
||||
</article>
|
||||
{{ .Render "summary" }}
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
<div>
|
||||
|
Reference in New Issue
Block a user