|
2 | 2 | import { page } from '$app/stores';
|
3 | 3 |
|
4 | 4 | $: currentPage = $page.url.pathname;
|
| 5 | + const links = [{href: "/team/", label: "Equipa", pageComp: "/team"}, |
| 6 | + {href: "/projects/", label: "Projects", pageComp: "/projects"}, |
| 7 | + {href: "/events/", label: "Eventos", pageComp: "/events"}, |
| 8 | + {href: "/contacts/", label: "Contactos", pageComp: "/contacts"}]; |
5 | 9 | </script>
|
6 | 10 |
|
7 | 11 | <nav
|
|
15 | 19 | </a>
|
16 | 20 | </div>
|
17 | 21 | <div class="flex justify-end gap-7">
|
18 |
| -<<<<<<< HEAD |
19 |
| - <a class:active={currentUrl === "http://localhost:3000/#/team/"} href="#/team/"><p class = "font-bold">Equipa</p></a> |
20 |
| - <a class:active={currentUrl === "http://localhost:3000/#/projects/"} href="#/projects/"><p class = "font-bold">Projetos</p></a> |
21 |
| - <a class:active={currentUrl === "http://localhost:3000/#/events/"} href="#/events/"><p class = "font-bold">Eventos</p></a> |
22 |
| - <a class:active={currentUrl === "http://localhost:3000/#/contacts/"} href="#/contacts/"><p class = "font-bold">Contactos</p></a> |
23 |
| -======= |
24 |
| - <a href="/#/">Equipa</a> |
25 |
| - <a href="/#/">Projetos</a> |
26 |
| - <a href="/#/">Eventos</a> |
27 |
| - <a href="/contacts">Contactos</a> |
28 |
| ->>>>>>> c06cc9d4ec9d3ef94d256019af7eb47b0e9b5b6d |
| 22 | + {#each links as {href, label, pageComp}} |
| 23 | + <a class:active={currentPage === pageComp} href={href}> |
| 24 | + <p class = "font-bold">{label}</p> |
| 25 | + </a> |
| 26 | + {/each} |
29 | 27 | </div>
|
30 | 28 | </nav>
|
31 | 29 |
|
32 | 30 | <style>
|
33 | 31 | .active {
|
34 |
| - background-color: rgba(116, 20, 20, 0.4); |
35 |
| - padding: 2px 3px; |
| 32 | + background-color: theme('colors.muted-red.400'); |
| 33 | + padding: 2px 6px; |
36 | 34 | border-radius: 4px;
|
37 | 35 | }
|
38 | 36 | </style>
|
0 commit comments