xiaowang/site/templates/base.twig
2022-09-09 15:19:54 +02:00

152 lines
9.8 KiB
Twig

<!DOCTYPE html>
<html lang="fr">
<head>
{{ snippet('metadata') }}
{{ snippet('favicon') }}
{# CSS #}
{% block stylesheets %}
<link rel="stylesheet" href="build/main.css">
{% endblock %}
{# JavaScript #}
{% block scripts %}
<script src="build/app.js" defer></script>
{% endblock %}
{# Matomo #}
<script>
var _paq = window._paq = window._paq || [];
_paq.push(['disableCookies']);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="//matomo.paulnicoue.com/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '2']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})();
</script>
</head>
<body>
{% block header %}
<header>
<div class="header-bar">
<div class="header-bar__logo" aria-hidden="true">
<a class="header-bar__logo-link" href="{{ site.homePage.url }}" target="_self" aria-label="Accéder à la page d'accueil de {{ site.title }}" tabindex="-1">
<h1 class="header-bar__logo-title">{{ site.title }}</h1>
</a>
</div>
<nav class="header-bar__nav" aria-label="Menu">
<button class="header-bar__nav-button" aria-hidden="true" tabindex="-1">
<svg viewBox="0 0 48 48" fill="currentColor">
<path d="M7.5 36Q6.85 36 6.425 35.575Q6 35.15 6 34.5Q6 33.85 6.425 33.425Q6.85 33 7.5 33H30.5Q31.15 33 31.575 33.425Q32 33.85 32 34.5Q32 35.15 31.575 35.575Q31.15 36 30.5 36ZM7.5 25.4Q6.85 25.4 6.425 24.975Q6 24.55 6 23.9Q6 23.25 6.425 22.825Q6.85 22.4 7.5 22.4H24.5Q25.15 22.4 25.575 22.825Q26 23.25 26 23.9Q26 24.55 25.575 24.975Q25.15 25.4 24.5 25.4ZM7.5 15Q6.85 15 6.425 14.575Q6 14.15 6 13.5Q6 12.85 6.425 12.425Q6.85 12 7.5 12H30.5Q31.15 12 31.575 12.425Q32 12.85 32 13.5Q32 14.15 31.575 14.575Q31.15 15 30.5 15ZM34.75 23.95 41 30.2Q41.45 30.65 41.425 31.25Q41.4 31.85 40.95 32.3Q40.5 32.75 39.875 32.75Q39.25 32.75 38.8 32.3L31.5 25Q31.05 24.55 31.05 23.95Q31.05 23.35 31.5 22.9L38.8 15.6Q39.25 15.15 39.875 15.15Q40.5 15.15 40.95 15.6Q41.4 16.05 41.4 16.675Q41.4 17.3 40.95 17.75Z"/>
</svg>
<svg viewBox="0 0 48 48" fill="currentColor">
<path d="M24 26.1 13.5 36.6Q13.05 37.05 12.45 37.05Q11.85 37.05 11.4 36.6Q10.95 36.15 10.95 35.55Q10.95 34.95 11.4 34.5L21.9 24L11.4 13.5Q10.95 13.05 10.95 12.45Q10.95 11.85 11.4 11.4Q11.85 10.95 12.45 10.95Q13.05 10.95 13.5 11.4L24 21.9L34.5 11.4Q34.95 10.95 35.55 10.95Q36.15 10.95 36.6 11.4Q37.05 11.85 37.05 12.45Q37.05 13.05 36.6 13.5L26.1 24L36.6 34.5Q37.05 34.95 37.05 35.55Q37.05 36.15 36.6 36.6Q36.15 37.05 35.55 37.05Q34.95 37.05 34.5 36.6Z"/>
</svg>
</button>
<ul class="header-bar__nav-menu" tabindex="-1">
{% set headerNavItemNo = 1 %}
{% if site.homePage.isActive %}
<li class="header-bar__nav-item-{{ headerNavItemNo }} header-bar__nav-item--active">
<div>
<a href="{{ site.homePage.url }}" target="_self" aria-current="page">{{ site.homePage.title }}</a>
</div>
</li>
{% else %}
<li class="header-bar__nav-item-{{ headerNavItemNo }}">
<div>
<a href="{{ site.homePage.url }}" target="_self">{{ site.homePage.title }}</a>
</div>
</li>
{% endif %}
{% set headerNavItemNo = headerNavItemNo + 1 %}
{% if pages.template('biography').first.isActive %}
<li class="header-bar__nav-item-{{ headerNavItemNo }} header-bar__nav-item--active">
<div>
<a href="{{ pages.template('biography').first.url }}" target="_self" aria-current="page">{{ pages.template('biography').first.title }}</a>
</div>
</li>
{% else %}
<li class="header-bar__nav-item-{{ headerNavItemNo }}">
<div>
<a href="{{ pages.template('biography').first.url }}" target="_self">{{ pages.template('biography').first.title }}</a>
</div>
</li>
{% endif %}
{% set headerNavItemNo = headerNavItemNo + 1 %}
<li class="header-bar__nav-item-{{ headerNavItemNo }}">
<div>
<span>Galeries</span>
</div>
<ul>
{% for gallery in pages.template('gallery') %}
{% set headerNavItemNo = headerNavItemNo + 1 %}
{% if gallery.isActive %}
<li class="header-bar__nav-item-{{ headerNavItemNo }} header-bar__nav-item--active">
<div>
<a href="{{ gallery.url }}" target="_self" aria-current="page">{{ gallery.title }}</a>
</div>
</li>
{% else %}
<li class="header-bar__nav-item-{{ headerNavItemNo }}">
<div>
<a href="{{ gallery.url }}" target="_self">{{ gallery.title }}</a>
</div>
</li>
{% endif %}
{% endfor %}
</ul>
</li>
</ul>
<div class="header-bar__nav-overlay" aria-hidden="true"></div>
</nav>
</div>
</header>
{% endblock %}
{% block main %}
{% endblock %}
{% block footer %}
<footer>
<div class="footer-bar">
<div class="footer-bar__social">
<a class="footer-bar__instagram-button" rel="me" href="{{ site.homePage.instagram }}" target="_blank" aria-label="Accéder au profil Instagram de {{ site.title }}">
<svg aria-hidden="true" viewBox="0 0 24 24" fill="currentColor">
<path d="M12 0C8.74 0 8.333.015 7.053.072 5.775.132 4.905.333 4.14.63c-.789.306-1.459.717-2.126 1.384S.935 3.35.63 4.14C.333 4.905.131 5.775.072 7.053.012 8.333 0 8.74 0 12s.015 3.667.072 4.947c.06 1.277.261 2.148.558 2.913.306.788.717 1.459 1.384 2.126.667.666 1.336 1.079 2.126 1.384.766.296 1.636.499 2.913.558C8.333 23.988 8.74 24 12 24s3.667-.015 4.947-.072c1.277-.06 2.148-.262 2.913-.558.788-.306 1.459-.718 2.126-1.384.666-.667 1.079-1.335 1.384-2.126.296-.765.499-1.636.558-2.913.06-1.28.072-1.687.072-4.947s-.015-3.667-.072-4.947c-.06-1.277-.262-2.149-.558-2.913-.306-.789-.718-1.459-1.384-2.126C21.319 1.347 20.651.935 19.86.63c-.765-.297-1.636-.499-2.913-.558C15.667.012 15.26 0 12 0zm0 2.16c3.203 0 3.585.016 4.85.071 1.17.055 1.805.249 2.227.415.562.217.96.477 1.382.896.419.42.679.819.896 1.381.164.422.36 1.057.413 2.227.057 1.266.07 1.646.07 4.85s-.015 3.585-.074 4.85c-.061 1.17-.256 1.805-.421 2.227-.224.562-.479.96-.899 1.382-.419.419-.824.679-1.38.896-.42.164-1.065.36-2.235.413-1.274.057-1.649.07-4.859.07-3.211 0-3.586-.015-4.859-.074-1.171-.061-1.816-.256-2.236-.421-.569-.224-.96-.479-1.379-.899-.421-.419-.69-.824-.9-1.38-.165-.42-.359-1.065-.42-2.235-.045-1.26-.061-1.649-.061-4.844 0-3.196.016-3.586.061-4.861.061-1.17.255-1.814.42-2.234.21-.57.479-.96.9-1.381.419-.419.81-.689 1.379-.898.42-.166 1.051-.361 2.221-.421 1.275-.045 1.65-.06 4.859-.06l.045.03zm0 3.678c-3.405 0-6.162 2.76-6.162 6.162 0 3.405 2.76 6.162 6.162 6.162 3.405 0 6.162-2.76 6.162-6.162 0-3.405-2.76-6.162-6.162-6.162zM12 16c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4-1.79 4-4 4zm7.846-10.405c0 .795-.646 1.44-1.44 1.44-.795 0-1.44-.646-1.44-1.44 0-.794.646-1.439 1.44-1.439.793-.001 1.44.645 1.44 1.439z"/>
</svg>
</a>
<a class="footer-bar__email-button" href="mailto:{{ site.homePage.email }}" target="_blank" aria-label="Écrire un e-mail à {{ site.title }}">
<svg aria-hidden="true" viewBox="0 0 48 48" fill="currentColor">
<path d="M7 40Q5.8 40 4.9 39.1Q4 38.2 4 37V11Q4 9.8 4.9 8.9Q5.8 8 7 8H41Q42.2 8 43.1 8.9Q44 9.8 44 11V37Q44 38.2 43.1 39.1Q42.2 40 41 40ZM41 13.75 24.8 24.35Q24.6 24.45 24.425 24.525Q24.25 24.6 24 24.6Q23.75 24.6 23.575 24.525Q23.4 24.45 23.2 24.35L7 13.75V37Q7 37 7 37Q7 37 7 37H41Q41 37 41 37Q41 37 41 37ZM24 21.9 40.8 11H7.25ZM7 13.75V14.1Q7 13.95 7 13.7Q7 13.45 7 13.15Q7 12.5 7 12.125Q7 11.75 7 12.15V11V12.15Q7 11.75 7 12.1Q7 12.45 7 13.1Q7 13.4 7 13.675Q7 13.95 7 14.1V13.75V37Q7 37 7 37Q7 37 7 37Q7 37 7 37Q7 37 7 37Z"/>
</svg>
</a>
</div>
<div class="footer-bar__copyright">
<p>&copy; {{ 'now' | date('Y') }} {{ site.title }}</p>
</div>
</div>
</footer>
{% endblock %}
</body>
</html>