44 lines
1.2 KiB
Text
44 lines
1.2 KiB
Text
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">
|
|
<head>
|
|
<meta charset="UTF-8"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
|
<title>Zamówienia ciast</title>
|
|
<link rel="stylesheet" href="/static/fonts/inter.css"/>
|
|
<link rel="stylesheet" href="/static/fonts/material.css"/>
|
|
<link rel="stylesheet" href="/static/style.css"/>
|
|
<script src="/static/htmx2.04.js" defer></script>
|
|
<script src="/static/order.js"></script>
|
|
</head>
|
|
<body>
|
|
<header>
|
|
<nav>
|
|
@link("/orders", "dashboard", "Panel główny")
|
|
@link("/cakes", "inventory_2", "Katalog")
|
|
@link("/blocked", "event_busy", "Terminy zablokowane")
|
|
@link("/order", "add", "Nowe zamówienie")
|
|
</nav>
|
|
</header>
|
|
<main>
|
|
@main
|
|
</main>
|
|
</body>
|
|
</html>
|
|
}
|
|
|
|
templ MainContent(title string, main templ.Component) {
|
|
<title>{ title }</title>
|
|
<main>
|
|
@main
|
|
</main>
|
|
}
|