Page d'accueil login + début des modals
This commit is contained in:
parent
ad94458cc1
commit
c7d3f19e97
@ -1,55 +1,145 @@
|
||||
.left-background {
|
||||
background-color: #db5559; /* Couleur de fond */
|
||||
width: 20%; /* Prend 1/4 de la largeur de l'écran */
|
||||
height: 100%; /* Prend toute la hauteur de la fenêtre */
|
||||
position: fixed; /* Reste en place même si on fait défiler la page */
|
||||
top: 0; /* Commence en haut de l'écran */
|
||||
left: 0; /* Aligne à gauche de l'écran */
|
||||
.top-bar {
|
||||
background-color: #db5559;
|
||||
width: calc(100% - 18%); /*Calcule la totalité de l'écran - le left-background */
|
||||
height: 60px;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 18%; /*Evite le chauvechement des 2 bars */
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 0 20px;
|
||||
color: white;
|
||||
font-size: 18px;
|
||||
box-sizing: border-box; /* Inclut le padding dans la largeur totale */
|
||||
}
|
||||
|
||||
.index-title-page{
|
||||
|
||||
.user-role {
|
||||
background-color: white;
|
||||
color: black;
|
||||
padding: 10px 15px;
|
||||
font-weight: bold;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.left-background {
|
||||
background-color: #db5559;
|
||||
width: 18%;
|
||||
height: 100%;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
|
||||
.index-title-page {
|
||||
color: #FFFFFF;
|
||||
font-size: 60px;
|
||||
padding-bottom: 10px;
|
||||
font-family: 'Brittany Signature', sans-serif;
|
||||
}
|
||||
|
||||
ul {
|
||||
list-style-type: none; /* Enlève les points de la liste */
|
||||
list-style-type: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
li {
|
||||
|
||||
padding-bottom:30px;
|
||||
padding-bottom: 30px;
|
||||
}
|
||||
|
||||
.btn-custom {
|
||||
background-color: #FFFFFF; /* Couleur de fond verte */
|
||||
color: black; /* Couleur du texte blanche */
|
||||
border: none; /* Pas de bordure */
|
||||
padding: 15px 30px; /* Espace intérieur (padding) */
|
||||
font-size: 16px; /* Taille de police */
|
||||
font-weight: bold; /* Texte en gras */
|
||||
cursor: pointer; /* Curseur en forme de main au survol */
|
||||
width: 100%; /* Ajuste la largeur automatiquement en fonction du contenu */
|
||||
display: inline-block; /* Empêche le bouton de s'étendre à 100% */
|
||||
background-color: #FFFFFF;
|
||||
color: black;
|
||||
padding: 15px 40px;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
|
||||
border-right: 5px solid #db5559;
|
||||
border-left: 5px solid #db5559;
|
||||
}
|
||||
|
||||
/* Effet au survol */
|
||||
.btn-custom:hover {
|
||||
background-color: #f8b5b5; /* Couleur légèrement plus foncée au survol */
|
||||
|
||||
.btn-custom:hover, .btn-info-compte:hover, .btn-info-exit:hover {
|
||||
background-color: #f8b5b5;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.icon-medium {
|
||||
display: inline-flex; /* Utilise inline-flex pour gérer l'alignement facilement */
|
||||
align-items: center; /* Centre verticalement l'icône */
|
||||
width: 25px;
|
||||
height: 25px;
|
||||
margin-right: 8px; /* Espace entre l'icône et le texte */
|
||||
}
|
||||
|
||||
.icon-container {
|
||||
display: inline-flex; /* Permet d'afficher l'icône et le texte sur la même ligne */
|
||||
align-items: center; /* Centre verticalement le contenu */
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
|
||||
.Information-perso {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 20px;
|
||||
margin-top: auto;
|
||||
}
|
||||
|
||||
.btn-info-compte, .btn-info-exit {
|
||||
background-color: #FFFFFF;
|
||||
color: black;
|
||||
padding: 10px 20px;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
cursor: pointer;
|
||||
border: 1px solid black;
|
||||
}
|
||||
|
||||
.btn-info-compte {
|
||||
width: 50%;
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
.btn-info-exit {
|
||||
width: 10%;
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
.modal {
|
||||
display: none;
|
||||
position: fixed;
|
||||
z-index: 1;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: rgba(0,0,0,0.4);
|
||||
}
|
||||
|
||||
.modal-content {
|
||||
background-color: #fff;
|
||||
margin: 15% auto;
|
||||
padding: 20px;
|
||||
border: 1px solid #888;
|
||||
width: 80%;
|
||||
}
|
||||
|
||||
.close {
|
||||
color: #aaa;
|
||||
float: right;
|
||||
font-size: 28px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.close:hover, .close:focus {
|
||||
color: black;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
152
public/css/modal.css
Normal file
152
public/css/modal.css
Normal file
@ -0,0 +1,152 @@
|
||||
.top-bar {
|
||||
background-color: #db5559;
|
||||
width: calc(100% - 18%); /*Calcule la totalité de l'écran - le left-background */
|
||||
height: 60px;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 18%; /*Evite le chauvechement des 2 bars */
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 0 20px;
|
||||
color: white;
|
||||
font-size: 18px;
|
||||
box-sizing: border-box; /* Inclut le padding dans la largeur totale */
|
||||
}
|
||||
|
||||
|
||||
.user-role {
|
||||
background-color: white;
|
||||
color: black;
|
||||
padding: 10px 15px;
|
||||
font-weight: bold;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.left-background {
|
||||
background-color: #db5559;
|
||||
width: 18%;
|
||||
height: 100%;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
|
||||
.index-title-page {
|
||||
color: #FFFFFF;
|
||||
font-size: 60px;
|
||||
padding-bottom: 10px;
|
||||
font-family: 'Brittany Signature', sans-serif;
|
||||
}
|
||||
|
||||
ul {
|
||||
list-style-type: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
li {
|
||||
padding-bottom: 30px;
|
||||
}
|
||||
|
||||
.btn-custom {
|
||||
background-color: #FFFFFF;
|
||||
color: black;
|
||||
padding: 15px 40px;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
|
||||
border-right: 5px solid #db5559;
|
||||
border-left: 5px solid #db5559;
|
||||
}
|
||||
|
||||
|
||||
.btn-custom:hover, .btn-info-compte:hover, .btn-info-exit:hover {
|
||||
background-color: #f8b5b5;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.icon-medium {
|
||||
width: 25px;
|
||||
height: 25px;
|
||||
}
|
||||
|
||||
.icon-container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
|
||||
.Information-perso {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 20px;
|
||||
margin-top: auto;
|
||||
}
|
||||
|
||||
.btn-info-compte, .btn-info-exit {
|
||||
background-color: #FFFFFF;
|
||||
color: black;
|
||||
padding: 10px 20px;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
cursor: pointer;
|
||||
border: 1px solid black;
|
||||
}
|
||||
|
||||
.btn-info-compte {
|
||||
width: 50%;
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
.btn-info-exit {
|
||||
width: 10%;
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
/* Style pour la modal (cachée par défaut) */
|
||||
.modal {
|
||||
display: none; /* Masquée par défaut */
|
||||
position: fixed;
|
||||
z-index: 1; /* Au-dessus du contenu normal */
|
||||
left: 18%; /* Commence juste après ton left-background */
|
||||
top: 0;
|
||||
width: 82%; /* Prend le reste de la largeur après le left-background */
|
||||
height: 100%; /* Prend toute la hauteur de l'écran */
|
||||
background-color: rgba(0, 0, 0, 0.4); /* Couleur d'arrière-plan avec transparence */
|
||||
overflow: auto; /* Permet le défilement si le contenu dépasse */
|
||||
}
|
||||
|
||||
/* Contenu de la modal */
|
||||
.modal-content {
|
||||
background-color: white;
|
||||
margin: 5% auto; /* Centrage vertical */
|
||||
padding: 20px;
|
||||
border: 1px solid black;
|
||||
width: 80%; /* Largeur du contenu de la modal */
|
||||
height: 80%; /* Hauteur du contenu de la modal */
|
||||
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
/* Bouton de fermeture */
|
||||
.close {
|
||||
color: black;
|
||||
float: right;
|
||||
font-size: 28px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.close:hover,
|
||||
.close:focus {
|
||||
color: red;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
38
public/js/modal.js
Normal file
38
public/js/modal.js
Normal file
@ -0,0 +1,38 @@
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
// Fonction pour ouvrir la modal
|
||||
function openModal(modalId) {
|
||||
const modal = document.getElementById(modalId);
|
||||
if (modal) {
|
||||
modal.style.display = "block";
|
||||
}
|
||||
}
|
||||
|
||||
// Fonction pour fermer la modal
|
||||
function closeModal(modalId) {
|
||||
const modal = document.getElementById(modalId);
|
||||
if (modal) {
|
||||
modal.style.display = "none";
|
||||
}
|
||||
}
|
||||
|
||||
// Ouvre les modals lorsqu'un bouton est cliqué
|
||||
document.body.addEventListener('click', function(event) {
|
||||
if (event.target.matches('span[data-modal]')) {
|
||||
const modalId = event.target.getAttribute('data-modal');
|
||||
openModal(modalId);
|
||||
}
|
||||
|
||||
// Ferme la modal lorsqu'on clique sur le bouton de fermeture
|
||||
if (event.target.matches('.close[data-modal]')) {
|
||||
const modalId = event.target.getAttribute('data-modal');
|
||||
closeModal(modalId);
|
||||
}
|
||||
|
||||
// Ferme la modal lorsqu'on clique en dehors du contenu
|
||||
document.querySelectorAll('.modal').forEach(modal => {
|
||||
if (event.target === modal) {
|
||||
modal.style.display = "none";
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
@ -5,9 +5,12 @@ namespace App\Controller;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
use Symfony\Component\Routing\Attribute\Route;
|
||||
|
||||
class IndexController extends AbstractController{
|
||||
#[Route('/index', name: 'index_app')]
|
||||
public function index(){
|
||||
class IndexAccueilController extends AbstractController{
|
||||
#[Route('/indexAdmin', name: 'index_admin_app')]
|
||||
public function indexAdmin(){
|
||||
return $this->render('base.html.twig');
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
8
templates/Modals/gestionTableModal.html.twig
Normal file
8
templates/Modals/gestionTableModal.html.twig
Normal file
@ -0,0 +1,8 @@
|
||||
<div id="tableModal" class="modal">
|
||||
<div class="modal-content">
|
||||
<span class="close" data-modal="tableModal">×</span>
|
||||
<h2>Gestion Table</h2>
|
||||
<!-- Contenu de la modal Gestion Table -->
|
||||
<p>Ajouter ici le formulaire ou les informations pour gérer les tables.</p>
|
||||
</div>
|
||||
</div>
|
8
templates/Modals/gestionUtilisateurModal.html.twig
Normal file
8
templates/Modals/gestionUtilisateurModal.html.twig
Normal file
@ -0,0 +1,8 @@
|
||||
<div id="userModal" class="modal">
|
||||
<div class="modal-content">
|
||||
<span class="close" data-modal="userModal">×</span>
|
||||
<h2>Gestion Utilisateur</h2>
|
||||
<!-- Contenu de la modal Gestion Utilisateur -->
|
||||
<p>Ajouter ici le formulaire ou les informations pour gérer les utilisateurs.</p>
|
||||
</div>
|
||||
</div>
|
@ -1,56 +1,82 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<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>">
|
||||
<link href="https://fonts.cdnfonts.com/css/brittany-signature" rel="stylesheet">
|
||||
<link rel="stylesheet" href="{{ asset('css/modal.css') }}"> <!-- Ajout du fichier CSS -->
|
||||
{% block stylesheets %}{% endblock %}
|
||||
</head>
|
||||
<body>
|
||||
{% block body %}
|
||||
|
||||
{% block stylesheets %}
|
||||
{% endblock %}
|
||||
<!-- Top Bar -->
|
||||
<div class="top-bar">
|
||||
<div>
|
||||
Bonjour, User
|
||||
</div>
|
||||
<div class="user-role">
|
||||
Rôle : Test
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% block javascripts %}
|
||||
{% block importmap %}{{ importmap('app') }}{% endblock %}
|
||||
{% endblock %}
|
||||
</head>
|
||||
<body>
|
||||
{% block body %}
|
||||
<!-- Left Menu -->
|
||||
<div class="left-background">
|
||||
<h1 class="index-title-page">FestinHegre</h1>
|
||||
|
||||
<div class="nav-bar">
|
||||
<ul>
|
||||
<li>
|
||||
<div class="btn-custom">
|
||||
Gestion Utilisateur
|
||||
<div class="btn-custom icon-container">
|
||||
<i class="icon-medium"> {{ ux_icon('grommet-icons:group') }}</i>
|
||||
<span data-modal="userModal">Gérer Utilisateur</span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="btn-custom">
|
||||
Gestion Table
|
||||
<div class="btn-custom icon-container">
|
||||
<i class="icon-medium"> {{ ux_icon('ic:outline-table-bar') }}</i>
|
||||
<span data-modal="tableModal">Gérer Table</span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="btn-custom">
|
||||
Gestion Menu
|
||||
<div class="btn-custom icon-container">
|
||||
<i class="icon-medium"> {{ ux_icon('bx:food-menu') }}</i>
|
||||
<span>Gestion Menu</span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="btn-custom">
|
||||
<span>Gestion Promo</span>
|
||||
<div class="btn-custom icon-container">
|
||||
<i class="icon-medium"> {{ ux_icon('lsicon:badge-promotion-outline') }}</i>
|
||||
<span>Gestion Promotion</span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="btn-custom icon-container">
|
||||
<i class="icon-medium"> {{ ux_icon('fluent-emoji-high-contrast:ten-oclock') }}</i>
|
||||
<span>Voir tendances</span>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="Information-perso">
|
||||
<div class="btn-custom icon-container">
|
||||
<div class="btn-info-compte icon-container">
|
||||
<i class="icon-medium"> {{ ux_icon('ph:user-circle-fill') }}</i>
|
||||
<span>Compte</span>
|
||||
</div>
|
||||
<div class="">
|
||||
<div class="btn-info-exit icon-container">
|
||||
<i class="icon-medium">{{ ux_icon('iconamoon:exit-bold') }}</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
</body>
|
||||
|
||||
<!-- Include modals -->
|
||||
{% include 'Modals/gestionUtilisateurModal.html.twig' %}
|
||||
{% include 'Modals/gestionTableModal.html.twig' %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
<script src="{{ asset('js/modal.js') }}"></script> <!-- Ajout du fichier JS -->
|
||||
</body>
|
||||
</html>
|
||||
|
@ -1,45 +0,0 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
|
||||
{% block title %}Accueil{% endblock %}
|
||||
|
||||
|
||||
{% block body %}
|
||||
<div class="left-menu">
|
||||
<h1 class="index-title-page">FestinHegre</h1>
|
||||
<div class="nav-bar">
|
||||
<ul>
|
||||
<li>
|
||||
<div>
|
||||
Gestion Utilisateur
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div>
|
||||
Gestion Table
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div>
|
||||
<i class="fa-light fa-square-list"></i>
|
||||
Gestion Menu
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div>
|
||||
Gestion Promo
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="Information-perso">
|
||||
<div>
|
||||
<i class="fa-solid fa-circle-user"></i>
|
||||
Compte
|
||||
</div>
|
||||
<div >
|
||||
<i class="icon-medium">{{ ux_icon('iconamoon:exit-bold') }}</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
Loading…
Reference in New Issue
Block a user