fix template test renderer, add category

This commit is contained in:
41666 2025-04-06 22:27:42 -07:00
parent d9146750ba
commit e4317ec4fd
15 changed files with 171 additions and 103 deletions

View file

@ -5,12 +5,24 @@
</style>
<div class="container">
<div class="cat-multi">
{{ template "components/role" .TestRole }} {{ template "components/role"
.TestRole2 }} {{ template "components/role" .TestRole3 }}
<div>
<h1>Multi</h1>
{{ range $_, $r := .Category1 }} {{ template "components/role" $r }} {{ end
}}
</div>
<div class="cat-single">
{{ template "components/role" .TestRole4 }} {{ template "components/role"
.TestRole5 }} {{ template "components/role" .TestRole6 }}
<div>
<h1>Single</h1>
{{ range $_, $r := .Category2 }} {{ template "components/role" $r }} {{ end
}}
</div>
<div>
<h1>Bad</h1>
{{ range $_, $r := .Category3 }} {{ template "components/role" $r }} {{ end
}}
</div>
<div>
<h1>Hmm</h1>
{{ range $_, $r := .Category4 }} {{ template "components/role" $r }} {{ end
}}
</div>
</div>