62 lines
2 KiB
Text
62 lines
2 KiB
Text
package templates
|
|
|
|
import (
|
|
"strconv"
|
|
|
|
"git.bronku.xyz/bronku/cake-order-tracker/models"
|
|
)
|
|
|
|
templ SpecialCakeOverlay(allTags []models.Tag) {
|
|
<div id="sc-overlay" class="overlay">
|
|
<div class="overlay-backdrop" onclick="closeSpecialCakeOverlay()"></div>
|
|
<div class="overlay-panel">
|
|
<header>
|
|
<h2>
|
|
<span class="material-symbols-outlined">cake_add</span>
|
|
<span id="sc-overlay-title">Dodaj tort specjalny</span>
|
|
</h2>
|
|
<button type="button" class="close-btn" onclick="closeSpecialCakeOverlay()">
|
|
<span class="material-symbols-outlined">close</span>
|
|
</button>
|
|
</header>
|
|
<div class="overlay-body">
|
|
<label>Nazwa *</label>
|
|
<input type="text" id="sc-name" placeholder="Nazwa tortu"/>
|
|
<label>Cena *</label>
|
|
<input type="number" id="sc-price" min="0" step="0.01" placeholder="0.00"/>
|
|
<label>Wielkość</label>
|
|
<input type="text" id="sc-size" placeholder="np. 20cm, 30x40"/>
|
|
<label>Kształt</label>
|
|
<select id="sc-shape">
|
|
<option value="">—</option>
|
|
<option value="round">Okrągły</option>
|
|
<option value="square">Kwadrat</option>
|
|
</select>
|
|
<label>Smak</label>
|
|
<input type="text" id="sc-flavour" placeholder="np. czekoladowy"/>
|
|
<label>Notatki</label>
|
|
<input type="text" id="sc-notes" placeholder="Dodatkowe informacje"/>
|
|
if len(allTags) > 0 {
|
|
<label>Tagi</label>
|
|
<div class="tag-grid" id="sc-overlay-tags">
|
|
for _, t := range allTags {
|
|
<label class="tag-chip">
|
|
<input type="checkbox" class="sc-tag-cb" value={ strconv.Itoa(t.ID) }/>
|
|
{ t.Name }
|
|
</label>
|
|
}
|
|
</div>
|
|
<label>Nowy tag</label>
|
|
<input type="text" id="sc-new-tag" placeholder="Nowy tag..."/>
|
|
}
|
|
</div>
|
|
<footer>
|
|
<button type="button" class="btn btn-outline" onclick="closeSpecialCakeOverlay()">Anuluj</button>
|
|
<button type="button" class="btn btn-primary" onclick="saveSpecialCake()">
|
|
<span class="material-symbols-outlined">check</span>
|
|
Zapisz
|
|
</button>
|
|
</footer>
|
|
</div>
|
|
</div>
|
|
}
|