index-main/site/snippets/header.php
isUnknown 03032dcda8 fix: overlay and menu z-index, site-title back in header
- Restore #site-title inside #site-header
- Overlay below header (z-header - 2), menu below header (z-header - 1)
- Header stays above overlay; when menu-open, dim all header elements
  except #site-title (opacity trick)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-27 12:01:14 +01:00

90 lines
3.4 KiB
PHP

<!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>
<!-- À SUPPRIMER EN PRODUCTION -->
<meta name="robots" content="noindex, nofollow, noarchive">
<?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 à l'accueil"
title="aller au site d'Index"
>
<?= svg('assets/images/index-logo.svg') ?>
</a>
</h1>
<nav id="nav-highlight">
<ul>
<li><a href="<?= page('enquetes')->url() ?>"><?= t('investigations.title') ?></a></li>
<li><a href="<?= page('impacts')->url() ?>"><?= t('impacts.title') ?></a></li>
<li><a href="<?= page('ressources')->url() ?>"><?= t('resources.title') ?></a></li>
<li class="support highlight"><a href="https://soutenir.index.ngo/" target="_blank" rel="noopener"><?= kirby()->language() && kirby()->language()->code() === 'en' ? 'Support us' : 'Soutenez-nous' ?></a></li>
</ul>
</nav>
<?php if ($page->template() == 'investigation'): ?>
<nav id="nav-investigation">
<!-- <p class="title"><?= $page->title()->esc() ?></p> -->
<ul>
<li class="is-selected"><a href="#investigation__hero">Vidéo</a></li>
<li><a href="#investigation__content">Enquête</a></li>
<li><a href="#methodologies">Méthodologies</a></li>
<li><a href="#impacts">Impact</a></li>
<li><a href="#related-investigations">En lien</a></li>
</ul>
</nav>
<?php endif ?>
<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') ?>
<div id="menu-overlay"></div>