actuel-inactuel/site/snippets/header.php

91 lines
2.9 KiB
PHP
Raw Normal View History

2024-04-10 14:55:34 +02:00
<?php
2025-01-26 13:11:06 +01:00
2025-02-04 19:07:25 +01:00
if(!$kirby->user() && ($page->template() == 'linear' || $page->template() == 'grid')) {
2025-02-05 15:02:44 +01:00
go('/a-venir');
2025-01-26 13:11:06 +01:00
}
$entryTopPos ??= 20;
2024-04-10 14:55:34 +02:00
?>
2024-01-25 18:34:32 +01:00
<!DOCTYPE html>
<html lang="en">
2024-09-05 08:28:00 +02:00
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>
<?= $site->title() ?><?= e($page->url() !== $site->url(), ' - ' . $page->title()) ?>
</title>
<link rel="stylesheet"
href="<?= url('assets/css/style.css') . '?version-cache-prevent' . rand(0, 1000) ?>" />
<script
src="<?= url('assets') ?>/js/script.js?version-cache-prevent<?= rand(0, 1000)?>"
defer></script>
<script defer src="<?= url('assets/js/alpine.min.js') ?>">
</script>
<script defer src="<?= url('assets/js/ragadjust.js') ?>">
</script>
<meta name="robots" content="noindex, nofollow, noarchive">
<?php if ($page->template() == 'linear' || $page->template() == 'grid'): ?>
2025-02-18 10:16:52 +01:00
<!-- SCHEMA -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "NewsArticle",
"headline": "<?= $page->title() ?>",
"author": [{
"@type": "Person",
"name": "<?= $page->author() ?>"
}],
"image": "<?= url('assets/images/logo.png') ?>",
"description": "<?= $page->title() ?>, par <?= $page->author()->toPage()->title() ?>. Publié le <?= $page->published()->toDate('d/m/Y') ?> dans <?= $page->parent()->title() ?>/<?= $page->category() ?>",
"datePublished": "<?= $page->published()->toDate('Y-m-d') ?>",
"dateModified": "<?= $page->modified('Y-m-d') ?>",
"url": "<?= $page->url() ?>",
"mainEntityOfPage": {
"@type": "WebPage",
"@id": "<?= $page->url() ?>"
},
"publisher": {
"@type": "Organization",
"name": "actuel - inactuel"
}
}
</script>
<?php endif ?>
<!-- FAVICON -->
<link rel="icon" type="image/png" href="/favicon-96x96.png" sizes="96x96" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<link rel="shortcut icon" href="/favicon.ico" />
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
<meta name="apple-mobile-web-app-title" content="actuel-inactuel" />
<link rel="manifest" href="/site.webmanifest" />
2025-02-18 10:16:52 +01:00
<?php if ($page->additionnalCss()->isNotEmpty()): ?>
<!-- CUSTOM CSS -->
<style>
<?= $page->additionnalCss() ?>
</style>
<?php endif ?>
</head>
2025-02-04 09:54:20 +01:00
<body
class="background-grid <?= e($page->fullWidth() == 'true', 'full-width') ?>"
data-template="<?= $page->template() ?>">
<header id="main-header">
<a id="logo"
href="<?= e($page->isHomePage(), '#main-edito', $site->url()) ?>"
class="no-underline"
title="<?= e($page->isHomePage(), 'lire l\'éditorial', 'aller à l\'accueil') ?>">
<h1>
<span id="actuel">actuel</span>
<span id="inactuel">inactuel</span>
</h1>
</a>
</header>
<?php snippet('nav') ?>