Use nav in header

This commit is contained in:
ekzyis 2025-01-26 00:34:42 +01:00
parent 65f639179d
commit 6df1ac0a70
2 changed files with 2 additions and 5 deletions

View File

@ -13,7 +13,8 @@ templ Nav() {
hx-push-url="true" hx-push-url="true"
> >
<div> <div>
<button hx-get="/">home</button> <button hx-get="/">markets</button>
<button hx-get="/create">create</button>
</div> </div>
<div class="ms-auto"> <div class="ms-auto">
<button hx-get="/about">about</button> <button hx-get="/about">about</button>

View File

@ -25,10 +25,6 @@ templ Index(markets []types.Market) {
hx-select="#grid-container" hx-select="#grid-container"
hx-push-url="true" hx-push-url="true"
> >
<div class="border border-muted">
<button hx-get="/" class={ tabStyle(ctx.Value(c.ReqPathContextKey).(string), "/") + " !py-1 !px-3" }>markets</button>
<button hx-get="/create" class={ tabStyle(ctx.Value(c.ReqPathContextKey).(string), "/create") + " !py-1 !px-3" }>create</button>
</div>
if ctx.Value(c.ReqPathContextKey).(string) == "/" { if ctx.Value(c.ReqPathContextKey).(string) == "/" {
<div class="grid grid-cols-[auto_fit-content(10%)_fit-content(10%)]"> <div class="grid grid-cols-[auto_fit-content(10%)_fit-content(10%)]">
for _, m := range markets { for _, m := range markets {