fix: table template preview page template

This commit is contained in:
efim
2023-11-17 03:58:20 +00:00
parent 04ab19fadf
commit 942091c5d8
4 changed files with 53 additions and 29 deletions

View File

@@ -0,0 +1,34 @@
{{define "main-content"}}
<h2>For each type</h2>
<section class="grid grid-cols-5 border-4 gap-4">
<p>types:</p>
<p> inactive </p>
<p> raised </p>
<p> speaker </p>
<p> mark </p>
{{ range .Bricks }}
<div class="border-2">for {{ .Name }}</div>
<div>{{ template "inactiveBrick" .ColorClass }}</div>
<div>{{ template "raisedBrick" .ColorClass }}</div>
<div>{{ template "speakerBrick" .ColorClass }}</div>
<div>{{ template "markBrick" .ColorClass }}</div>
{{ end }}
</section>
<h2>Now for BrickData taking parametrized template name</h2>
{{ template "brick" .ABrick }}
<h2>Now for a person</h2>
<div class="border p-3">
{{ template "personBlocks" .TestPerson }}
</div>
<h2>And now i'll want to get all persons for a room</h2>
<div class="grid place-content-center">
{{ template "roomPeople" .ARoom }}
</div>
{{end}}