set front

This commit is contained in:
jleroy2023
2024-11-18 14:41:52 +01:00
parent 9bdde39dde
commit 8f75b8a125
30 changed files with 2650 additions and 18 deletions

View File

@@ -1,19 +1,91 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>{% block title %}Welcome!{% endblock %}</title>
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 128 128%22><text y=%221.2em%22 font-size=%2296%22>⚫️</text><text y=%221.3em%22 x=%220.2em%22 font-size=%2276%22 fill=%22%23fff%22>sf</text></svg>">
{% block stylesheets %}
{{ encore_entry_link_tags('app') }}
{% endblock %}
<html lang="fr">
<head>
<meta charset="UTF-8">
<title>{% block title %}Sortir{% endblock %}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" href="{{ asset('icon.svg') }}">
<script>
// On page load or when changing themes, best to add inline in `head` to avoid FOUC
if (localStorage.getItem('color-theme') === 'dark' || (!('color-theme' in localStorage) && window.matchMedia('(prefers-color-scheme: dark)').matches)) {
document.documentElement.classList.add('dark');
} else {
document.documentElement.classList.remove('dark')
}
</script>
{% block stylesheets %}
{{ encore_entry_link_tags('app') }}
{% endblock %}
{% block javascripts %}
{{ encore_entry_script_tags('app') }}
{% block importmap %}{{ importmap('app') }}{% endblock %}
{% endblock %}
</head>
<body>
{% block body %}{% endblock %}
</body>
{% block javascripts %}
{{ encore_entry_script_tags('app') }}
{% endblock %}
</head>
<body class="bg-light-font dark:bg-dark-font transition-all duration-300">
{% if app.flashes is defined %}
<div class="fixed bottom-16 right-8 z-50">
{% for type, flash in app.flashes %}
{% for message in flash %}
<div id="alert-{{ loop.index }}" role="alert"
class="max-w-md bg-light-font dark:bg-dark-card rounded-lg border-gray-400 dark:border-dark-primary border p-3 shadow-xl my-3 flash-message transition duration-300 ease-linear">
<div class="flex flex-row">
<div class="px-2">
{% if type == 'success' %}
{% set typeMessage = 'Succès' %}
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none"
viewBox="0 0 24 24" stroke-width="2.5" stroke="#44C997">
<path stroke-linecap="round" stroke-linejoin="round"
d="M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"></path>
</svg>
{% elseif type == 'danger' or type == 'error' %}
{% set typeMessage = 'Erreur' %}
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none"
viewBox="0 0 24 24" stroke-width="2.5" stroke="#FF0E0E">
<path stroke-linecap="round" stroke-linejoin="round"
d="m9.75 9.75 4.5 4.5m0-4.5-4.5 4.5M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"></path>
</svg>
{% elseif type == 'warning' %}
{% set typeMessage = 'Attention' %}
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none"
viewBox="0 0 24 24" stroke-width="2.5" stroke="#FFCC00">
<path stroke-linecap="round" stroke-linejoin="round"
d="M12 9v3.75m9-.75a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 3.75h.008v.008H12v-.008Z"></path>
</svg>
{% else %}
{% set typeMessage = 'Information' %}
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none"
viewBox="0 0 24 24" stroke-width="2.5" stroke="#076ECA">
<path stroke-linecap="round" stroke-linejoin="round"
d="m11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z"></path>
</svg>
{% endif %}
</div>
<div class="ml-2 mr-3 w-full">
<div class="flex">
<span class="grow font-semibold text-dark dark:text-white">{{ typeMessage }}</span>
<button data-dismiss-target="#alert-{{ loop.index }}" aria-label="Close">
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"
xmlns="http://www.w3.org/2000/svg">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M6 18L18 6M6 6l12 12"></path>
</svg>
</button>
</div>
<span class="block text-gray-600 dark:text-gray-400">{{ message }}</span>
</div>
</div>
</div>
{% endfor %}
{% endfor %}
</div>
{% endif %}
{% include "base/navbar.html.twig" %}
{% block body %}{% endblock %}
{% include "base/footer.html.twig" %}
<script src="{{ asset('js/script.js') }}" defer></script>
</body>
</html>