add unsubscribe and view mail on the web buttons
This commit is contained in:
parent
8bdd63afe2
commit
f095954a33
20 changed files with 289 additions and 224 deletions
|
|
@ -1,36 +1,35 @@
|
|||
<?php
|
||||
$isOpen = isset($isOpen) ? $isOpen : false;
|
||||
$isOpen ??= false;
|
||||
?>
|
||||
|
||||
<header
|
||||
class="page-cover"
|
||||
>
|
||||
<header class="page-cover">
|
||||
<div class="title-wrapper">
|
||||
<a href="#main-content" class="no-underline" title="aller au texte">
|
||||
<?= $slots->title() ?>
|
||||
</a>
|
||||
</div>
|
||||
<?php if ($slots->text()): ?>
|
||||
<div class="text-wrapper">
|
||||
<?= $slots->text() ?>
|
||||
</div>
|
||||
<?php if ($slots->text()): ?>
|
||||
<div class="text-wrapper">
|
||||
<?= $slots->text() ?>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<ul class="links">
|
||||
<?php if ($page->is(page('inscription'))): ?>
|
||||
<li>
|
||||
<a href="<?= $site->url() ?>">
|
||||
accueil
|
||||
</a>
|
||||
</li>
|
||||
<?php if ($page->is(page('lettre'))): ?>
|
||||
<li>
|
||||
<a href="<?= $site->url() ?>">
|
||||
accueil
|
||||
</a>
|
||||
</li>
|
||||
<?php else: ?>
|
||||
<li>
|
||||
<a href="/inscription" id="subscribe-btn" class="plus">
|
||||
s'inscrire
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/lettre" id="subscribe-btn" class="plus">
|
||||
s'inscrire
|
||||
</a>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
<li>
|
||||
<a href="<?= $site->find('a-propos')->url() ?>">
|
||||
<a
|
||||
href="<?= $site->find('a-propos')->url() ?>">
|
||||
à propos
|
||||
</a>
|
||||
</li>
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
<footer id="main-footer">
|
||||
<ul id="links">
|
||||
<?php if (!$page->isHomePage() && $kirby->user()->isLoggedIn()): ?>
|
||||
<?php if (!$page->isHomePage() && $kirby->user()): ?>
|
||||
<li class="open-nav-wrapper">
|
||||
<button class="plus open-nav" title="chercher parmi les textes">textes</button>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
<?php if ($page->is(page('inscription'))): ?>
|
||||
<?php if ($page->is(page('lettre'))): ?>
|
||||
<li>
|
||||
<a href="<?= $site->url() ?>">
|
||||
accueil
|
||||
|
|
@ -13,7 +13,7 @@
|
|||
</li>
|
||||
<?php else: ?>
|
||||
<li>
|
||||
<a href="/inscription" id="subscribe-btn" class="plus">
|
||||
<a href="/lettre" id="subscribe-btn" class="plus">
|
||||
s'inscrire
|
||||
</a>
|
||||
</li>
|
||||
|
|
|
|||
|
|
@ -1,68 +1,82 @@
|
|||
<?php
|
||||
$entryTopPos = $entryTopPos ?? 20;
|
||||
|
||||
$kirby = kirby();
|
||||
$site = site();
|
||||
|
||||
$openPageURIS = [
|
||||
"home",
|
||||
"a-propos",
|
||||
"inscription"
|
||||
];
|
||||
|
||||
|
||||
if (!$kirby->user() && (!in_array($page->uri(), $openPageURIS))) {
|
||||
go($site->panel()->url());
|
||||
if(!$kirby->user() && $page->template() == 'linear' || $page->template() == 'grid') {
|
||||
go($site->errorPage()->url());
|
||||
}
|
||||
|
||||
$entryTopPos ??= 20;
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<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'): ?>
|
||||
<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 ?>
|
||||
<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>
|
||||
|
||||
<!-- 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" />
|
||||
</head>
|
||||
<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') ?>
|
||||
<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'): ?>
|
||||
<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" />
|
||||
</head>
|
||||
|
||||
<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') ?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue