main-site/src/routes/Header.svelte

51 lines
1.1 KiB
Svelte
Raw Normal View History

2024-01-01 05:56:29 +01:00
<script lang="ts">
2024-01-01 20:00:35 +01:00
import { page } from '$app/stores';
import { Button } from '$lib/components/ui/button';
2024-01-01 05:56:29 +01:00
2024-01-04 00:51:27 +01:00
const button = 'border-t-2 bg-black/55 hover:bg-black/70 hover:border-secondary w-28';
2024-01-01 05:56:29 +01:00
</script>
2024-01-01 20:00:35 +01:00
<ul
class="absolute z-50 flex h-16 w-full flex-row overflow-x-auto items-center gap-3 border-b bg-black/40 backdrop-blur-sm"
2024-01-01 20:00:35 +01:00
>
<li class="ml-auto">
2024-01-01 20:00:35 +01:00
<Button
variant="ghost"
href="/"
2024-01-04 01:36:35 +01:00
class="{button} + {!($page.url.pathname === '/') || 'border-secondary text-secondary'}"
2024-01-01 20:00:35 +01:00
>
Home
</Button>
</li>
<li>
<Button
variant="ghost"
href="/servers"
2024-01-04 01:36:35 +01:00
class="{button} + {!$page.url.pathname.startsWith('/servers') ||
'border-secondary text-secondary'}"
2024-01-01 20:00:35 +01:00
>
Servers
</Button>
</li>
<li>
<Button
variant="ghost"
href="/services"
2024-01-04 01:36:35 +01:00
class="{button} + {!$page.url.pathname.startsWith('/services') ||
'border-secondary text-secondary'}"
2024-01-01 20:00:35 +01:00
>
Services
</Button>
</li>
<li class="mr-auto">
2024-01-01 20:00:35 +01:00
<Button
variant="ghost"
href="/about"
2024-01-04 01:36:35 +01:00
class="{button} + {!$page.url.pathname.startsWith('/about') ||
'border-secondary text-secondary'}"
2024-01-01 20:00:35 +01:00
>
About
</Button>
</li>
</ul>