fix #29 : envoyer le lien magique par email (envoyer_mail_smtp)
This commit is contained in:
@@ -0,0 +1,139 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="<?= htmlspecialchars(siteLang()) ?>">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title><?= htmlspecialchars(($seoTitle ?? '') ?: ($title ?? siteTitle())) ?></title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<!-- SEO -->
|
||||
<meta name="description" content="<?= htmlspecialchars(($seoDescription ?? '') ?: siteClaim()) ?>">
|
||||
<meta name="robots" content="<?= htmlspecialchars($metaRobots ?? 'index, follow') ?>">
|
||||
<link rel="canonical" href="<?= htmlspecialchars($canonical ?? $ogUrl ?? rtrim(APP_URL, '/') . '/') ?>">
|
||||
|
||||
<!-- Open Graph -->
|
||||
<meta property="og:title" content="<?= htmlspecialchars(($seoTitle ?? '') ?: ($title ?? siteTitle())) ?>">
|
||||
<meta property="og:description" content="<?= htmlspecialchars(($seoDescription ?? '') ?: siteClaim()) ?>">
|
||||
<meta property="og:type" content="<?= htmlspecialchars($ogType ?? 'website') ?>">
|
||||
<meta property="og:locale" content="<?= htmlspecialchars(siteLangOgLocale()) ?>">
|
||||
<meta property="og:url" content="<?= htmlspecialchars($ogUrl ?? APP_URL) ?>">
|
||||
<meta property="og:site_name" content="<?= htmlspecialchars(siteTitle()) ?>">
|
||||
<?php if (!empty($ogImage ?? '')): ?>
|
||||
<meta property="og:image" content="<?= htmlspecialchars($ogImage) ?>">
|
||||
<meta property="og:image:width" content="1200">
|
||||
<meta property="og:image:height" content="630">
|
||||
<?php endif; ?>
|
||||
<?php if (!empty($metaAuthor ?? '')): ?>
|
||||
<meta name="author" content="<?= htmlspecialchars($metaAuthor) ?>">
|
||||
<?php endif; ?>
|
||||
<?php if (!empty($articlePublishedAt ?? '')): ?>
|
||||
<meta property="article:published_time" content="<?= htmlspecialchars(date('c', strtotime((string)$articlePublishedAt))) ?>">
|
||||
<?php endif; ?>
|
||||
<?php if (!empty($metaAuthorUrl ?? '')): ?>
|
||||
<meta property="article:author" content="<?= htmlspecialchars($metaAuthorUrl) ?>">
|
||||
<?php elseif (!empty($metaAuthor ?? '')): ?>
|
||||
<meta property="article:author" content="<?= htmlspecialchars($metaAuthor) ?>">
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (!empty($jsonLd ?? '')): ?>
|
||||
<script type="application/ld+json"><?= $jsonLd ?></script>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- RSS autodiscovery -->
|
||||
<link rel="alternate" type="application/rss+xml" title="<?= htmlspecialchars(siteTitle()) ?>" href="/feed">
|
||||
|
||||
<!-- Favicon -->
|
||||
<link rel="icon" href="/assets/favicon.svg" type="image/svg+xml">
|
||||
|
||||
<!-- CSS -->
|
||||
<link href="/assets/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link rel="stylesheet" href="/assets/css/style.css">
|
||||
</head>
|
||||
|
||||
<body<?php if (!empty($bodyClass ?? '')): ?> class="<?= htmlspecialchars($bodyClass) ?>"<?php endif; ?>>
|
||||
|
||||
<header>
|
||||
<nav class="navbar navbar-expand-lg navbar-dark mb-0" role="navigation" aria-label="Navigation principale">
|
||||
<div class="container-fluid">
|
||||
<?php
|
||||
$_layoutAction = $_GET['action'] ?? 'list';
|
||||
$_layoutPrivateCats = isset($articles) ? $articles->getPrivateCategories() : [];
|
||||
$_layoutCats = isset($articles) ? array_filter(
|
||||
$articles->getCategories(),
|
||||
function ($cat) use ($_layoutPrivateCats) {
|
||||
return isLoggedIn() || !in_array($cat, $_layoutPrivateCats, true);
|
||||
},
|
||||
ARRAY_FILTER_USE_KEY
|
||||
) : [];
|
||||
$_layoutCurrentCat = trim($_GET['cat'] ?? '');
|
||||
?>
|
||||
<a class="navbar-brand d-flex flex-column lh-1" href="/">
|
||||
<span><?= htmlspecialchars(siteTitle()) ?></span>
|
||||
<small class="navbar-tagline"><?= htmlspecialchars(siteClaim()) ?></small>
|
||||
</a>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarContent" aria-controls="navbarContent" aria-expanded="false" aria-label="Basculer la navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarContent">
|
||||
<ul class="navbar-nav me-auto"></ul>
|
||||
<form class="search-form d-flex" action="/search" method="GET" role="search">
|
||||
<input class="form-control form-control-sm search-input"
|
||||
type="search" name="q"
|
||||
value="<?= htmlspecialchars($_GET['q'] ?? '') ?>"
|
||||
placeholder="Rechercher…"
|
||||
aria-label="Rechercher">
|
||||
</form>
|
||||
|
||||
<ul class="navbar-nav">
|
||||
<?php if (function_exists('isLoggedIn') && isLoggedIn()): ?>
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" href="#" role="button"
|
||||
data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<?= htmlspecialchars(function_exists('currentUserName') ? currentUserName() : (currentUserEmail() ?? '')) ?>
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-menu-end">
|
||||
<li><a class="dropdown-item" href="/profile">Mon identité</a></li>
|
||||
<li><a class="dropdown-item" href="/admin"><?= (function_exists('isAdmin') && isAdmin()) ? 'Administration' : 'Mes articles' ?></a></li>
|
||||
<li><hr class="dropdown-divider"></li>
|
||||
<li><a class="dropdown-item text-muted" href="/logout.php">Déconnexion</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<?php else: ?>
|
||||
<li class="nav-item"><a class="nav-link" href="/login">Connexion</a></li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
<main class="<?= htmlspecialchars($mainClass ?? 'container') ?>" role="main">
|
||||
<?= $content ?>
|
||||
</main>
|
||||
|
||||
<footer class="py-5 mt-5" role="contentinfo">
|
||||
<div class="container">
|
||||
<div class="footer-inner">
|
||||
<div class="footer-about">
|
||||
<strong><?= htmlspecialchars(siteTitle()) ?></strong>
|
||||
<p><?= htmlspecialchars(siteClaim()) ?></p>
|
||||
<small>© <?= date('Y') ?> — <a href="<?= htmlspecialchars(siteLicenseUrl()) ?>" target="_blank" rel="noopener"><?= htmlspecialchars(siteLicenseLabel()) ?></a></small>
|
||||
</div>
|
||||
<nav class="footer-nav" aria-label="Liens du site">
|
||||
<a href="/about">À propos</a>
|
||||
<a href="/contact">Contact</a>
|
||||
<a href="/legal">Mentions légales</a>
|
||||
<a href="/licenses">Licences</a>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<!-- JS -->
|
||||
<script src="/assets/js/bootstrap.bundle.min.js"></script>
|
||||
<script src="/assets/js/app.js"></script>
|
||||
<?php if (isset($reactionStats)): ?>
|
||||
<script src="/assets/js/reactions.js"></script>
|
||||
<?php endif; ?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user