2024-07-10 04:21:22 +00:00
|
|
|
package components
|
|
|
|
|
|
|
|
import c "git.ekzyis.com/ekzyis/delphi.market/server/router/context"
|
|
|
|
|
|
|
|
templ Header() {
|
2024-07-10 05:47:01 +00:00
|
|
|
<header class="mt-3">
|
|
|
|
<nav class="flex flex-row">
|
|
|
|
<div>
|
|
|
|
<a href="/">home</a>
|
|
|
|
</div>
|
|
|
|
<div class="ms-auto">
|
2024-07-10 06:20:04 +00:00
|
|
|
<a href="/about">about</a>
|
2024-07-10 05:47:01 +00:00
|
|
|
if ctx.Value(c.SessionContextKey) != nil {
|
|
|
|
<a href="/user">user</a>
|
|
|
|
} else {
|
|
|
|
<a href="/login">login</a>
|
|
|
|
}
|
|
|
|
</div>
|
2024-07-10 04:21:22 +00:00
|
|
|
</nav>
|
|
|
|
</header>
|
|
|
|
}
|