This commit is contained in:
parent
8096781fe2
commit
975f2cd9bc
26 changed files with 1303 additions and 993 deletions
|
|
@ -1,9 +1,48 @@
|
|||
---
|
||||
import path from "../utils/path.ts"
|
||||
import {Users, List, Info} from "@lucide/astro"
|
||||
import {Users, List, Info, CalendarDays, type AstroComponent} from "@lucide/astro"
|
||||
|
||||
const route = Astro.url.pathname
|
||||
|
||||
|
||||
const events: Record<string, Array<{
|
||||
name: string,
|
||||
path: string,
|
||||
icon: AstroComponent,
|
||||
}>> = {
|
||||
"fallback": [
|
||||
{
|
||||
name: "Hamburg 2026",
|
||||
path: "/hamburg/2026/",
|
||||
icon: CalendarDays,
|
||||
},
|
||||
],
|
||||
"/meta": [],
|
||||
"/hamburg/2026": [
|
||||
{
|
||||
name: "Wann & Wo",
|
||||
path: "/hamburg/2026/",
|
||||
icon: Info,
|
||||
},
|
||||
{
|
||||
name: "Programm",
|
||||
path: "/hamburg/2026/programm",
|
||||
icon: List,
|
||||
},
|
||||
{
|
||||
name: "Wer",
|
||||
path: "/hamburg/2026/wer",
|
||||
icon: Users,
|
||||
},
|
||||
],
|
||||
}
|
||||
|
||||
const currentEventPath = Object.keys(events).filter(event => route.startsWith(event))[0]
|
||||
|
||||
const event = events[currentEventPath] ?? events["fallback"]
|
||||
---
|
||||
|
||||
<div class="navbar bg-base-100 shadow-sm z-30 sticky top-0 left-0 w-screen">
|
||||
<div class="navbar bg-base-100 shadow-sm z-50 h-20 sticky top-0 left-0 w-screen">
|
||||
<div class="navbar-start w-fit max-h-14">
|
||||
<div class="dropdown">
|
||||
<div tabindex="0" role="button" class="btn btn-ghost sm:hidden">
|
||||
|
|
@ -14,18 +53,16 @@ import {Users, List, Info} from "@lucide/astro"
|
|||
<ul
|
||||
tabindex="-1"
|
||||
class="menu menu-sm dropdown-content bg-base-100 rounded-box z-1 mt-3 w-52 p-4 gap-4 shadow-xl border">
|
||||
<li><a class="text-xl" href={path(import.meta.env.BASE_URL, "/")}>
|
||||
<Info/>
|
||||
Wann & Wo
|
||||
</a></li>
|
||||
<li><a class="text-xl" href={path(import.meta.env.BASE_URL, "/hamburg/2026/programm/")}>
|
||||
<List/>
|
||||
Programm
|
||||
</a></li>
|
||||
<li><a class="text-xl" href={path(import.meta.env.BASE_URL, "/hamburg/2026/wer/")}>
|
||||
<Users/>
|
||||
Wer
|
||||
</a></li>
|
||||
{
|
||||
event.map(item =>
|
||||
<li>
|
||||
<a class="text-xl" href={path(import.meta.env.BASE_URL, item.path)}>
|
||||
<item.icon />
|
||||
{item.name}
|
||||
</a>
|
||||
</li>,
|
||||
)
|
||||
}
|
||||
</ul>
|
||||
</div>
|
||||
<a class="btn btn-link text-xl max-h-14" href={path(import.meta.env.BASE_URL, "/")}>
|
||||
|
|
@ -37,18 +74,16 @@ import {Users, List, Info} from "@lucide/astro"
|
|||
</div>
|
||||
<div class="navbar-center hidden sm:flex">
|
||||
<ul class="menu menu-horizontal px-1 gap-2">
|
||||
<li><a href={path(import.meta.env.BASE_URL, "/")}>
|
||||
<Info/>
|
||||
Wann & Wo
|
||||
</a></li>
|
||||
<li><a href={path(import.meta.env.BASE_URL, "/hamburg/2026/programm/")}>
|
||||
<List/>
|
||||
Programm
|
||||
</a></li>
|
||||
<li><a href={path(import.meta.env.BASE_URL, "/hamburg/2026/wer/")}>
|
||||
<Users/>
|
||||
Wer
|
||||
</a></li>
|
||||
{
|
||||
event.map(item =>
|
||||
<li>
|
||||
<a href={path(import.meta.env.BASE_URL, item.path)}>
|
||||
<item.icon />
|
||||
{item.name}
|
||||
</a>
|
||||
</li>,
|
||||
)
|
||||
}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
Loading…
Reference in a new issue