nirvash/templates/cms_list.html

27 lines
578 B
HTML
Raw Permalink Normal View History

{{ $pages := ((.Context).Value "adapter").ListPages }}
{{ template "header" .}}
2022-06-07 06:59:41 +00:00
<h2>Pages</h2>
<div class="new-page-button-wrapper">
2022-06-07 06:59:41 +00:00
<a class="new-page-button" href="/new">New Page</a>
</div>
<div class="page-list">
<ul>
{{ range $slug, $title := $pages }}
{{ if eq $title "NAVIGATION" }}
<li><a href="/edit/{{$slug}}">{{$title}}</a></li>
{{ end }}
{{ end }}
{{ range $slug, $title := $pages }}
{{ if ne $title "NAVIGATION" }}
<li><a href="/edit/{{$slug}}">{{$title}}</a></li>
{{ end }}
{{ end }}
</ul>
</div>
{{ template "footer" .}}