blob: 5558f6f79008d8d58513c28cccc5ccace226228d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
<script lang="ts">
import { page } from '$app/stores';
</script>
<nav class="navbar">
<a href="/" class:active={$page.url.pathname === '/'}>Liste</a>
<a href="/catalog" class:active={$page.url.pathname === '/catalog'}
>Catalogue</a
>
<a href="/categories" class:active={$page.url.pathname === '/categories'}
>Catégories</a
>
</nav>
<style>
.navbar {
display: flex;
gap: 0.25rem;
padding: 0.75rem 0;
border-bottom: 1px solid var(--border);
position: sticky;
top: 0;
background: var(--bg);
z-index: 20;
}
.navbar a {
padding: 0.5rem 1rem;
border-radius: 9999px;
color: var(--text-secondary);
text-decoration: none;
font-size: 0.875rem;
font-weight: 500;
transition: all 0.2s ease;
}
.navbar a:hover {
color: var(--text);
background: var(--surface);
}
.navbar a.active {
background: var(--accent);
color: #fff;
box-shadow: 0 1px 2px var(--shadow);
}
</style>
|