flatter html

This commit is contained in:
bronkuu 2026-06-15 20:15:12 +02:00
parent cf2e217030
commit a74c276cd3
11 changed files with 84 additions and 107 deletions

View file

@ -7,11 +7,11 @@ import (
)
templ CakesPage(cakes []models.Cake, allTags []models.Tag) {
@Layout("Katalog", templ.NopComponent, CakesMain(cakes, allTags))
@Layout("Katalog", CakesMain(cakes, allTags))
}
templ CakesMain(cakes []models.Cake, allTags []models.Tag) {
<section class="card">
<section class="card" id="cakes-card">
<header>
<h2>
<span class="material-symbols-outlined">inventory_2</span>
@ -30,10 +30,9 @@ templ CakesMain(cakes []models.Cake, allTags []models.Tag) {
}
</div>
}
<table class="data-table" id="cakes-table">
<table class="data-table">
<thead>
<tr>
<th></th>
<th>Nazwa</th>
<th>SKU</th>
<th>Tagi</th>
@ -44,11 +43,6 @@ templ CakesMain(cakes []models.Cake, allTags []models.Tag) {
<tbody>
for _, c := range cakes {
<tr data-tags={ tagNames(c.Tags) }>
<td>
<div class="icon cake">
<span class="material-symbols-outlined">cake</span>
</div>
</td>
<td class="font-medium">{ c.Name }</td>
<td class="text-muted">#{ strconv.Itoa(c.ID) }</td>
<td>