index-main/site/snippets/header.php
isUnknown e228c1757e feat(i18n): configure French as default language without URL prefix
- Set French as default language with URL '/' (no prefix)
- Set English language with URL '/en'
- Replace hardcoded language buttons with dynamic links
- Fix invalid HTML (remove <a> inside <button>)
- Add aria-current attribute for accessibility

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-11 12:40:10 +01:00

75 lines
2.7 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="fr ">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="<?= url('assets/css/style.css') ?>?version-cache-prevent<?= rand(0, 1000) ?>">
<link rel="stylesheet" type="text/css" href="<?= url('assets/fonts/stylesheet.css') ?>">
<script src="https://unpkg.com/masonry-layout@4/dist/masonry.pkgd.min.js"></script>
<meta name="robots" content="noindex,nofollow">
<title>
<?php if ($page->isHomePage() == false): ?>
<?= $page->title() ?>&nbsp;|&nbsp;
<?php endif ?>
<?= $site->title() ?>
</title>
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/swiper@12/swiper-bundle.min.css"
/>
<script src="<?= url('assets/js/script.js') ?>" type="module"></script>
<?php snippet('seo/head'); ?>
</head>
<body data-template="<?= $page->template() ?>">
<header id="site-header">
<div class="site-header__inner">
<h1 id="site-title">
<a
href="<?= $site->url() ?>"
aria-label="Retour à laccueil"
title="aller au site d'Index"
>
<?= svg('assets/images/index-logo.svg') ?>
</a>
</h1>
<!-- Note: toujours mettre .header__title-page (jen ai besoin pour la mise en forme) mais le laisser vide sur la plupart des pages sauf les pages enquêtes -->
<p class="header__title-page">Lexécution de Nidal et Khaled Amirah à Naplouse</p>
<nav id="nav-highlight">
<ul>
<li><a href="/enquetes">Enquêtes</a></li>
<li><a href="/impacts">Impact</a></li>
<li class="soutenir"><a targer="_blank" href="https://soutenir.index.ngo/">Soutenez-nous</a></li>
</ul>
</nav>
<button id="theme-toggle">
<svg style="fill: var(--color-txt)" class="switch" width="24" height="24" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M22 41C32.4934 41 41 32.4934 41 22C41 11.5066 32.4934 3 22
3C11.5066 3 3 11.5066 3 22C3 32.4934 11.5066 41 22 41ZM7 22C7
13.7157 13.7157 7 22 7V37C13.7157 37 7 30.2843 7 22Z"></path>
</svg>
</button>
<div id="lang-toggle">
<?php foreach($kirby->languages() as $language): ?>
<a
href="<?= $language->url() ?>"
<?php e($language->code() === $kirby->language()->code(), 'aria-current="page"') ?>
>
<?= strtoupper($language->code()) ?>
</a>
<?php endforeach ?>
</div>
<button id="menu-toggle">
<span class="open"><?= svg('assets/icons/menu.svg') ?></span>
<span class="close"><?= svg('assets/icons/close.svg') ?></span>
</button>
</div>
</header>
<?php snippet('nav') ?>