mise en place du début du back
This commit is contained in:
parent
5210d78d7d
commit
c1c4fda329
22 changed files with 1595 additions and 4 deletions
82
site/snippets/footer.php
Normal file
82
site/snippets/footer.php
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
<!-- Footer -->
|
||||
<footer class="site-footer">
|
||||
<div class="site-footer__container">
|
||||
<!-- Logo & Info -->
|
||||
<div class="site-footer__brand">
|
||||
<?php if ($logo = $site->logo()->toFile()): ?>
|
||||
<img src="<?= $logo->url() ?>" alt="<?= $site->site_title() ?>" class="site-footer__logo">
|
||||
<?php else: ?>
|
||||
<span class="site-footer__logo-text"><?= $site->site_title() ?></span>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($site->site_tagline()->isNotEmpty()): ?>
|
||||
<p class="site-footer__tagline"><?= $site->site_tagline() ?></p>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
|
||||
<!-- Contact -->
|
||||
<div class="site-footer__contact">
|
||||
<?php if ($site->contact_email()->isNotEmpty()): ?>
|
||||
<a href="mailto:<?= $site->contact_email() ?>" class="site-footer__email">
|
||||
<?= $site->contact_email() ?>
|
||||
</a>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($site->contact_phone()->isNotEmpty()): ?>
|
||||
<a href="tel:<?= $site->contact_phone() ?>" class="site-footer__phone">
|
||||
<?= $site->contact_phone() ?>
|
||||
</a>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($site->contact_address()->isNotEmpty()): ?>
|
||||
<address class="site-footer__address">
|
||||
<?= $site->contact_address()->kt() ?>
|
||||
</address>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
|
||||
<!-- Social Links -->
|
||||
<div class="site-footer__social">
|
||||
<?php if ($site->social_linkedin()->isNotEmpty()): ?>
|
||||
<a href="<?= $site->social_linkedin() ?>" class="site-footer__social-link" target="_blank" rel="noopener noreferrer">
|
||||
LinkedIn
|
||||
</a>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($site->social_twitter()->isNotEmpty()): ?>
|
||||
<a href="<?= $site->social_twitter() ?>" class="site-footer__social-link" target="_blank" rel="noopener noreferrer">
|
||||
Twitter
|
||||
</a>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($site->social_instagram()->isNotEmpty()): ?>
|
||||
<a href="<?= $site->social_instagram() ?>" class="site-footer__social-link" target="_blank" rel="noopener noreferrer">
|
||||
Instagram
|
||||
</a>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($site->social_youtube()->isNotEmpty()): ?>
|
||||
<a href="<?= $site->social_youtube() ?>" class="site-footer__social-link" target="_blank" rel="noopener noreferrer">
|
||||
YouTube
|
||||
</a>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
|
||||
<!-- Mentions légales -->
|
||||
<?php if ($pdf = $site->mentions_legales()->toFile()): ?>
|
||||
<div class="site-footer__legal">
|
||||
<a href="<?= $pdf->url() ?>" target="_blank">Mentions légales</a>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
<!-- Copyright -->
|
||||
<div class="site-footer__copyright">
|
||||
<p>© <?= date('Y') ?> <?= $site->site_title() ?>. Tous droits réservés.</p>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<!-- Scripts -->
|
||||
<?= js('assets/js/main.js') ?>
|
||||
</body>
|
||||
</html>
|
||||
73
site/snippets/header.php
Normal file
73
site/snippets/header.php
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="<?= $kirby->language()?->code() ?? 'fr' ?>">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title><?= $page->meta_title()->or($page->title() . ' - ' . $site->site_title()) ?></title>
|
||||
<meta name="description" content="<?= $page->meta_description()->or($site->site_description()) ?>">
|
||||
|
||||
<!-- Favicon -->
|
||||
<link rel="icon" type="image/png" href="<?= url('assets/favicon.png') ?>">
|
||||
|
||||
<!-- Styles -->
|
||||
<?= css('assets/css/main.css') ?>
|
||||
|
||||
<!-- Open Graph -->
|
||||
<meta property="og:title" content="<?= $page->meta_title()->or($page->title()) ?>">
|
||||
<meta property="og:description" content="<?= $page->meta_description()->or($site->site_description()) ?>">
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:url" content="<?= $page->url() ?>">
|
||||
<?php if ($cover = $page->cover()->toFile()): ?>
|
||||
<meta property="og:image" content="<?= $cover->url() ?>">
|
||||
<?php endif ?>
|
||||
</head>
|
||||
<body class="template-<?= $page->template() ?>">
|
||||
<!-- Header -->
|
||||
<header class="site-header">
|
||||
<div class="site-header__container">
|
||||
<!-- Logo -->
|
||||
<a href="<?= $site->url() ?>" class="site-header__logo">
|
||||
<?php if ($logo = $site->logo()->toFile()): ?>
|
||||
<img src="<?= $logo->url() ?>" alt="<?= $site->site_title() ?>">
|
||||
<?php else: ?>
|
||||
<span class="site-header__logo-text"><?= $site->site_title() ?></span>
|
||||
<?php endif ?>
|
||||
</a>
|
||||
|
||||
<!-- Navigation -->
|
||||
<nav class="site-header__nav">
|
||||
<ul class="site-nav">
|
||||
<?php foreach ($site->main_navigation()->toStructure() as $item): ?>
|
||||
<?php $linkedPage = $item->link()->toPages()->first() ?>
|
||||
<?php if ($linkedPage): ?>
|
||||
<li class="site-nav__item <?= $linkedPage->isOpen() ? 'is-active' : '' ?>">
|
||||
<a href="<?= $linkedPage->url() ?>">
|
||||
<?= $kirby->language()?->code() === 'en' ? $item->label_en() : $item->label_fr() ?>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
<!-- Language Switcher -->
|
||||
<?php if ($kirby->languages()->count() > 1): ?>
|
||||
<div class="site-header__lang">
|
||||
<?php foreach ($kirby->languages() as $lang): ?>
|
||||
<a href="<?= $page->url($lang->code()) ?>"
|
||||
class="site-lang__link <?= $lang->code() === $kirby->language()?->code() ? 'is-active' : '' ?>">
|
||||
<?= strtoupper($lang->code()) ?>
|
||||
</a>
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
<!-- Mobile Menu Toggle -->
|
||||
<button class="site-header__toggle" aria-label="Menu">
|
||||
<span></span>
|
||||
<span></span>
|
||||
<span></span>
|
||||
</button>
|
||||
</div>
|
||||
</header>
|
||||
Loading…
Add table
Add a link
Reference in a new issue