29 lines
578 B
Plaintext
Raw Normal View History

2024-07-10 06:21:22 +02:00
package components
import c "git.ekzyis.com/ekzyis/delphi.market/server/router/context"
2024-07-12 07:38:28 +02:00
templ Nav() {
2024-07-10 07:47:01 +02:00
<header class="mt-3">
2024-07-14 12:57:40 +02:00
<nav
id="nav"
class="flex flex-row"
hx-target="#content"
hx-swap="outerHTML"
hx-select="#content"
hx-push-url="true"
>
2024-07-10 07:47:01 +02:00
<div>
2024-07-12 05:40:45 +02:00
<button hx-get="/">home</button>
2024-07-10 07:47:01 +02:00
</div>
<div class="ms-auto">
2024-07-12 05:40:45 +02:00
<button hx-get="/about">about</button>
2024-07-10 07:47:01 +02:00
if ctx.Value(c.SessionContextKey) != nil {
2024-07-12 05:40:45 +02:00
<button hx-get="/user">user</button>
2024-07-10 07:47:01 +02:00
} else {
2024-07-12 13:26:27 +02:00
<button hx-get="/signup">signup</button>
2024-07-10 07:47:01 +02:00
}
</div>
2024-07-10 06:21:22 +02:00
</nav>
</header>
}