Files
interface-kaznautes/templates/base.html.twig

96 lines
4.5 KiB
Twig

<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>{% block title %}Association Kaz{% endblock %}</title>
<link rel="icon" href="{{ asset("img/logo.svg") }}">
{% block stylesheets %}
<link rel="stylesheet" href="{{ asset('styles/app.css') }}">
{% endblock %}
{% block javascripts %}
{% block importmap %}{{ importmap('app') }}{% endblock %}
{% endblock %}
</head>
<body>
{% block navbar %}
{{ include('_navbar.html.twig') }}
{% endblock %}
{# Contenu principal #}
<main class="flex-grow">
{# Affichage des messages flash (Succès ou Erreur) #}
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 mt-4">
{% for label, messages in app.flashes %}
{% for message in messages %}
<div class="flex items-center p-4 mb-4 rounded-lg border shadow-sm
{{ label == 'success' ? 'bg-green-50 border-green-200 text-green-800' :
label == 'error' ? 'bg-red-50 border-red-200 text-red-800' :
label == 'warning' ? 'bg-yellow-50 border-yellow-200 text-yellow-800' :
'bg-blue-50 border-blue-200 text-blue-800' }}"
role="alert">
{# Icône dynamique #}
<svg class="flex-shrink-0 w-5 h-5 mr-3" fill="currentColor" viewBox="0 0 20 20">
{% if label == 'success' %}
<path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clip-rule="evenodd"></path>
{% else %}
<path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z" clip-rule="evenodd"></path>
{% endif %}
</svg>
<div class="text-sm font-bold">
{{ message }}
</div>
{# Bouton Fermer #}
<button type="button"
onclick="this.parentElement.remove()"
class="text-lg font-bold hover:opacity-70 transition-opacity ml-4">
&times;
</button>
</div>
{% endfor %}
{% endfor %}
</div>
{# Contenu principal de chaque page #}
{% block body %}{% endblock %}
</main>
{# Gestion du pied-de-page du site #}
<footer class="bg-white border-t border-gris-clair py-6 sm:py-8 mt-auto w-full font-sora">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 flex flex-col md:flex-row justify-between items-center gap-4">
<div class="text-sm text-gris-fonce flex items-center gap-2 justify-center md:justify-start">
{# Logo de l'association #}
<img src="{{ asset('img/logo.svg') }}"
alt="Logo de l'association"
class="h-6 w-auto object-contain opacity-80 hover:opacity-100 transition-opacity">
{# Le texte et les liens #}
<span>
&copy; {{ 'now'|date('Y') }} | Kaz, le numérique sobre, libre, éthique et local.
</span>
</div>
<ul class="flex flex-wrap justify-center gap-4 sm:gap-6 text-sm text-gris-fonce">
<li>
<a href="https://kaz.bzh/mentions-legales/" class="hover:text-bouton transition-colors">Mentions légales et statuts</a>
</li>
<li>
<a href="https://status.kaz.bzh/status/kaz" class="hover:text-bouton transition-colors">Santé des services Kaz</a>
</li>
<li>
<a href="https://kaz.bzh/contact/" class="hover:text-bouton transition-colors">Contact</a>
</li>
</ul>
</div>
</footer>
</body>
</html>