27 lines
1011 B
Plaintext
27 lines
1011 B
Plaintext
---
|
|
const path = Astro.url.pathname;
|
|
|
|
const isActive = (href: string) => {
|
|
if (href === "/") return path === "/";
|
|
return path === href || path.startsWith(href);
|
|
};
|
|
---
|
|
|
|
<nav class="site-nav" aria-label="Navigation principale">
|
|
<a href="/" aria-current={isActive("/") ? "page" : undefined}>Accueil</a>
|
|
<span aria-hidden="true"> · </span>
|
|
|
|
<a href="/manifeste/" aria-current={isActive("/manifeste/") ? "page" : undefined}>Manifeste</a>
|
|
<span aria-hidden="true"> · </span>
|
|
|
|
<a href="/archicrat-ia/" aria-current={isActive("/archicrat-ia/") ? "page" : undefined}>Essai-thèse</a>
|
|
<span aria-hidden="true"> · </span>
|
|
|
|
<a href="/cas-ia/" aria-current={isActive("/cas-ia/") ? "page" : undefined}>Gouvernance IA</a>
|
|
<span aria-hidden="true"> · </span>
|
|
|
|
<a href="/glossaire/" aria-current={isActive("/glossaire/") ? "page" : undefined}>Glossaire</a>
|
|
<span aria-hidden="true"> · </span>
|
|
|
|
<a href="/recherche/" aria-current={isActive("/recherche/") ? "page" : undefined}>Recherche</a>
|
|
</nav> |