catalogue in a template

This commit is contained in:
bronku 2025-04-06 16:06:14 +02:00
parent 280c6a92ab
commit 0edd3eb9b1

View file

@ -52,16 +52,23 @@
</div> </div>
{{end}} {{end}}
{{with .Catalogue}} {{with .Catalogue}}
<div > <div>
<h2>Katalog</h2> <h2>Katalog</h2>
<ul class="scrollable"> <div class="scrollable">
<table>
{{range .}} {{range .}}
<li> <tr>
{{.Name}} {{.Price}} <th>{{.Name}}<br><small>{{.Category}}</small></th>
<button type=button onClick="addCake({{.ID}},'{{.Name}} ({{.Price}}PLN)', 1)">dodaj</button> <th>{{.Price}}PLN</th>
</li> <th>
<button type=button onClick="addCake({{.ID}},'{{.Name}} ({{.Price}}PLN)', 1)">
<i class="fa-solid fa-plus"></i>
</button>
</th>
</tr>
{{end}} {{end}}
</ul> </table>
</div>
</div> </div>
{{end}} {{end}}
</form> </form>