Préparer la version 1.0.0-rc.4
This commit is contained in:
parent
0a482afe9d
commit
6e3beea211
38 changed files with 388 additions and 56 deletions
|
|
@ -1,8 +1,9 @@
|
|||
<?php
|
||||
require_once __DIR__ . '/_helpers.php';
|
||||
$siteUrl = static fn (string$page = 'home', array$query = []): string => PublicSiteController::url($page, $query);
|
||||
$theme = in_array($settings['public_site_theme'] ?? 'warm', ['warm','nature','minimal'], true) ? $settings['public_site_theme'] : 'warm';
|
||||
$theme = in_array($settings['public_site_theme'] ?? 'warm', ['warm','nature','minimal','custom'], true) ? $settings['public_site_theme'] : 'warm';
|
||||
$association = $settings['association_name'] ?: 'Association';
|
||||
$siteName = trim((string)($settings['public_site_name'] ?? '')) ?: $association;
|
||||
$viewFile = __DIR__ . '/' . $view;
|
||||
$requestPath = rtrim((string)(parse_url($_SERVER['REQUEST_URI'] ?? '/', PHP_URL_PATH) ?: '/'), '/') ?: '/';
|
||||
$activePage = match($requestPath) {
|
||||
|
|
@ -38,13 +39,19 @@ if (!function_exists('public_age')) {
|
|||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<title><?= h($title . ' — ' . $association) ?></title>
|
||||
<title><?= h($title . ' — ' . $siteName) ?></title>
|
||||
<meta name="description"
|
||||
content="<?= h(mb_substr(strip_tags((string)($settings['public_site_home_text'] ?? '')), 0, 155)) ?>">
|
||||
<meta name="robots"
|
||||
content="<?= ($settings['public_site_enabled'] ?? '0') === '1' ? 'index,follow' : 'noindex,nofollow' ?>">
|
||||
<?php if ($hasContactMap): ?>
|
||||
<link rel="stylesheet" href="/assets/vendor/leaflet/leaflet.css"><?php endif; ?><style>
|
||||
@font-face {
|
||||
font-family: "Globinours Emoji";
|
||||
src: url("/assets/fonts/globinours-emoji.woff2") format("woff2");
|
||||
font-display: swap
|
||||
}
|
||||
|
||||
:root {
|
||||
--accent: #d87945;
|
||||
--accent-dark: #a84f29;
|
||||
|
|
@ -81,6 +88,20 @@ if (!function_exists('public_age')) {
|
|||
--shadow: none
|
||||
}
|
||||
|
||||
[data-theme=custom] {
|
||||
--accent: #d87945;
|
||||
--accent-dark: #a84f29;
|
||||
--ink: #2d2926;
|
||||
--muted: #756d67;
|
||||
--paper: #fffaf5;
|
||||
--surface: #fff;
|
||||
--line: #eadfd5
|
||||
}
|
||||
|
||||
<?php if ($theme === 'custom' && trim((string)($settings['public_site_custom_css'] ?? '')) !== ''): ?>
|
||||
<?= $settings['public_site_custom_css'] ?>
|
||||
<?php endif; ?>
|
||||
|
||||
* {
|
||||
box-sizing: border-box
|
||||
}
|
||||
|
|
@ -89,7 +110,7 @@ if (!function_exists('public_age')) {
|
|||
margin: 0;
|
||||
background: var(--paper);
|
||||
color: var(--ink);
|
||||
font: 16px/1.6 system-ui, -apple-system, Segoe UI, sans-serif
|
||||
font: 16px/1.6 "Globinours Emoji", system-ui, -apple-system, Segoe UI, sans-serif
|
||||
}
|
||||
|
||||
a {
|
||||
|
|
@ -432,7 +453,7 @@ if (!function_exists('public_age')) {
|
|||
<header class="site-head">
|
||||
<div class="wrap head-row"><a class="brand"
|
||||
href="<?= h($siteUrl()) ?>"><?php if (AssociationBrand::path()): ?><img src="<?= h($siteUrl('logo')) ?>"
|
||||
alt=""><?php endif; ?><span><?= h($association) ?></span></a>
|
||||
alt=""><?php endif; ?><span><?= h($siteName) ?></span></a>
|
||||
<nav class="nav" aria-label="<?= h(t('public_site.navigation')) ?>">
|
||||
<a<?= $navClass($activePage === 'home') ?> href="<?= h($siteUrl()) ?>">
|
||||
<?= h(t('public_site.home')) ?></a><?php foreach ($publicSpecies as $species): ?>
|
||||
|
|
@ -460,7 +481,7 @@ if (!function_exists('public_age')) {
|
|||
: <?= h($settings['association_siret']) ?></span><?php endif; ?></div>
|
||||
</div>
|
||||
<div class="footer-powered"><?= h(t('public_site.powered_by')) ?> <a
|
||||
href="https://nnsprod.com/git/oversu/Globinours" target="_blank"
|
||||
href="https://globinours.fr" target="_blank"
|
||||
rel="noopener noreferrer">Globinours</a></div>
|
||||
</div>
|
||||
</footer>
|
||||
|
|
|
|||
Loading…
Reference in a new issue