2026-09-08 17:23:22 +00:00
|
|
|
<script lang="ts">
|
|
|
|
|
import {translate} from "@lib/transition"
|
|
|
|
|
import SecondaryNav from "@lib/components/SecondaryNav.svelte"
|
|
|
|
|
import SpaceMenu from "@app/components/SpaceMenu.svelte"
|
|
|
|
|
import PrimaryNavSpaces from "@app/components/PrimaryNavSpaces.svelte"
|
2026-09-09 19:24:44 +00:00
|
|
|
import {lastSpaceUrl} from "@app/routes"
|
2026-09-08 17:23:22 +00:00
|
|
|
|
|
|
|
|
type Props = {
|
|
|
|
|
url: string
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const {url}: Props = $props()
|
|
|
|
|
|
2026-09-09 19:24:44 +00:00
|
|
|
const activeUrl = $derived($lastSpaceUrl ?? url)
|
|
|
|
|
|
2026-09-08 17:23:22 +00:00
|
|
|
const duration = 200
|
|
|
|
|
|
|
|
|
|
const parallax = 10
|
|
|
|
|
|
|
|
|
|
const slide = (delay: number) => ({
|
|
|
|
|
axis: "x" as const,
|
|
|
|
|
offset: -100,
|
|
|
|
|
unit: "cqw",
|
|
|
|
|
duration,
|
|
|
|
|
delay,
|
|
|
|
|
})
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<div class="@container flex h-full min-h-0 w-full">
|
|
|
|
|
<div
|
2026-09-17 18:26:01 +00:00
|
|
|
class="primary-nav flex min-h-0 pb-2"
|
2026-09-08 17:23:22 +00:00
|
|
|
in:translate={slide(0)}
|
|
|
|
|
out:translate={slide(parallax)}>
|
2026-09-17 18:26:01 +00:00
|
|
|
<PrimaryNavSpaces />
|
2026-09-08 17:23:22 +00:00
|
|
|
</div>
|
|
|
|
|
<div class="flex w-0 min-w-0 grow" in:translate={slide(parallax)} out:translate={slide(0)}>
|
|
|
|
|
<SecondaryNav visible class="secondary-nav--mobile-space mt-0 h-full w-0 min-w-0 grow pb-0">
|
2026-09-09 19:24:44 +00:00
|
|
|
{#key activeUrl}
|
|
|
|
|
<SpaceMenu url={activeUrl} mobile />
|
|
|
|
|
{/key}
|
2026-09-08 17:23:22 +00:00
|
|
|
</SecondaryNav>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|