link fix and formatting chagnes in js

This commit is contained in:
bronku 2026-06-16 14:20:48 +02:00
parent 4cfa559718
commit 922478bdeb
3 changed files with 231 additions and 169 deletions

View file

@ -1,5 +1,12 @@
package templates
templ link(href string, icon string, name string) {
<a href={ href } hx-boost="true" hx-target="main" hx-select="main" hx-select-oob="title" hx-swap="outerHTML">
<span class="material-symbols-outlined">{ icon }</span>
<span>{ name }</span>
</a>
}
templ Layout(title string, main templ.Component) {
<!DOCTYPE html>
<html lang="pl">
@ -16,23 +23,11 @@ templ Layout(title string, main templ.Component) {
<body>
<header>
<nav>
<a href="/orders" hx-boost="true" hx-target="main" hx-select="main" hx-select-oob="title" hx-swap="outerHTML">
<span class="material-symbols-outlined">dashboard</span>
<span>Panel główny</span>
</a>
<a href="/cakes" hx-boost="true" hx-target="main" hx-select="main" hx-select-oob="title" hx-swap="outerHTML">
<span class="material-symbols-outlined">inventory_2</span>
<span>Katalog</span>
</a>
<a href="/blocked" hx-boost="true" hx-target="main" hx-select="main" hx-select-oob="title" hx-swap="outerHTML">
<span class="material-symbols-outlined">event_busy</span>
<span>Terminy zablokowane</span>
</a>
@link("/orders", "dashboard", "Panel główny")
@link("/cakes", "inventory_2", "Katalog")
@link("/blocked", "event_busy", "Terminy zablokowane")
@link("/order", "add", "Nowe zamówienie")
</nav>
<a href="/order" class="cta" hx-boost="true" hx-target="main" hx-select="main" hx-select-oob="title" hx-swap="outerHTML">
<span class="material-symbols-outlined">add</span>
<span>Nowe zamówienie</span>
</a>
</header>
<main>
@main