add base template + mainController

This commit is contained in:
Olivier PARPAILLON
2024-11-18 15:52:10 +01:00
parent e0935ec69d
commit e5307da3e1
6 changed files with 183 additions and 0 deletions

View File

@@ -0,0 +1,48 @@
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<title>Sortie</title>
{% block stylesheets %}
{{ encore_entry_link_tags('app') }}
{% endblock %}
</head>
<body>
<header>
{% include 'main/header.html.twig' %}
</header>
<main>
{% for label, messages in app.flashes %}
{% for message in messages %}
{% if label == 'success' %}
<div class="p-4 text-sm text-green-800 rounded-lg bg-green-50 dark:bg-gray-800 dark:text-green-400 text-center" role="alert">
<span class="font-medium">
{{ message }}
</span>
</div>
{% endif %}
{% if label == 'error' %}
<div class="p-4 text-sm text-red-800 rounded-lg bg-red-50 dark:bg-gray-800 dark:text-red-400 text-center" role="alert">
<span class="font-medium">
{{ message }}
</span>
</div>
{% endif %}
{% if label == 'warning' %}
<div class="p-4 text-sm text-yellow-800 rounded-lg bg-yellow-50 dark:bg-gray-800 dark:text-yellow-400 text-center" role="alert">
<span class="font-medium">
{{ message }}
</span>
</div>
{% endif %}
{% endfor %}
{% endfor %}
{% block content %}
{% endblock %}
</main>
<footer>
{% include 'main/footer.html.twig' %}
</footer>
</body>
</html>