mycorrhiza/categories/view_page.html

23 lines
756 B
HTML

{{define "category x"}}Category {{. | beautifulName}}{{end}}
{{define "title"}}{{template "category x" .CatName}}{{end}}
{{define "body"}}
{{$catName := .CatName}}
<main class="main-width category">
{{if .GivenPermissionToModify}}
<div class="btn btn_navititle">
<a class="btn__link_navititle" href="/edit-category/{{$catName}}">{{block "edit" .}}Edit{{end}}</a>
</div>
{{end}}
<h1>{{block "cat" .}}Category{{end}} <i>{{beautifulName $catName}}</i></h1>
{{if len .Hyphae | not}}
<p>{{block "empty cat" .}}This category is empty{{end}}</p>
{{end}}
<ol>
{{range .Hyphae}}
<li>
<a class="wikilink" href="/hypha/{{.}}">{{beautifulName .}}</a>
</li>
{{end}}
</ol>
</main>
{{end}}