forked from
devins.page/devins.page
my website, hosted on wisp.place
1---
2const currentPath = Astro.url.pathname;
3---
4
5<nav class="flex gap-1 px-4 overflow-y-hidden overflow-x-auto">
6 <a
7 href="/"
8 class:list={[
9 "py-0.5 px-4 rounded-t-sm",
10 currentPath === "/" &&
11 "bg-dp-background2-light dark:bg-dp-background2-dark",
12 ]}
13 >
14 home
15 </a>
16 <a
17 href="/blog"
18 class:list={[
19 "py-0.5 px-4 rounded-t-sm",
20 currentPath.startsWith("/blog") &&
21 "bg-dp-background2-light dark:bg-dp-background2-dark",
22 ]}
23 >
24 blog
25 </a>
26 <a
27 href="/uses"
28 class:list={[
29 "py-0.5 px-4 rounded-t-sm",
30 currentPath.startsWith("/uses") &&
31 "bg-dp-background2-light dark:bg-dp-background2-dark",
32 ]}
33 >
34 uses
35 </a>
36</nav>