link fix and formatting chagnes in js
This commit is contained in:
parent
4cfa559718
commit
922478bdeb
3 changed files with 231 additions and 169 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue