main-site/src/routes/Header.svelte

56 lines
1.1 KiB
Svelte
Raw Normal View History

2024-01-01 04:56:29 +00:00
<script lang="ts">
2024-01-01 19:00:35 +00:00
import { page } from '$app/stores';
import { Button } from '$lib/components/ui/button';
2024-01-01 04:56:29 +00:00
2024-01-01 19:00:35 +00:00
const button = 'border-t-2 bg-black/55 hover:bg-black/70 hover:border-primary w-28';
2024-01-01 04:56:29 +00:00
</script>
2024-01-01 19:00:35 +00:00
<ul
class="sticky flex h-16 w-full flex-row items-center justify-center gap-3 border-b bg-black/40 backdrop-blur-sm"
>
<li>
<Button
variant="ghost"
href="/"
class="{button} + {$page.url.pathname === '/'
? 'border-primary text-primary'
: 'text-accent'}"
2024-01-01 19:00:35 +00:00
>
Home
</Button>
</li>
<li>
<Button
variant="ghost"
href="/servers"
class="{button} + {$page.url.pathname.startsWith('/servers')
? 'border-primary text-primary'
: 'text-accent'}"
>
Servers
</Button>
</li>
<li>
<Button
variant="ghost"
href="/services"
class="{button} + {$page.url.pathname.startsWith('/services')
? 'border-primary text-primary'
: 'text-accent'}"
>
Services
</Button>
</li>
<li>
<Button
variant="ghost"
href="/about"
class="{button} + {$page.url.pathname.startsWith('/about')
? 'border-primary text-primary'
: 'text-accent'}"
>
About
</Button>
</li>
</ul>