From 5e650baec49d523ab6dc851335ffa8a996648a86 Mon Sep 17 00:00:00 2001 From: Theo DUPIN Date: Tue, 8 Nov 2022 21:43:40 +0100 Subject: [PATCH] Correction pages Admin --- src/components/NavigationAdmin.js | 19 ++----- src/pages/Admin_create.js | 4 +- src/pages/Calendrier.js | 51 ++++++----------- src/styles/components/_admin.scss | 91 ++++++++++++++++--------------- 4 files changed, 71 insertions(+), 94 deletions(-) diff --git a/src/components/NavigationAdmin.js b/src/components/NavigationAdmin.js index 488fad2..d1fc0d4 100644 --- a/src/components/NavigationAdmin.js +++ b/src/components/NavigationAdmin.js @@ -11,28 +11,19 @@ const NavigationAdmin = (props) => { - + - + ); }; -function changeColor() { - let button = document.getElementById("bouton_créer"); - button.style.backgroundColor = "rgb(170,170,170)"; -} -function changeColor2() { - let button = document.getElementById("bouton_modif"); - button.style.backgroundColor = "rgb(170,170,170)"; -} - -function changeColor3() { - let button = document.getElementById("bouton_sup"); - button.style.backgroundColor = "rgb(170,170,170)"; +function changeColor() { + let b1 = document.querySelector('button'); + b1.style.backgroundColor = "rgb(170,170,170)"; } export default NavigationAdmin; \ No newline at end of file diff --git a/src/pages/Admin_create.js b/src/pages/Admin_create.js index ba02f93..6523549 100644 --- a/src/pages/Admin_create.js +++ b/src/pages/Admin_create.js @@ -99,9 +99,7 @@ function Admin_create() {

{loginError === true?"L'identifiant existe déja":''}

- - - + Retour
diff --git a/src/pages/Calendrier.js b/src/pages/Calendrier.js index 06e07a4..2d56e9b 100644 --- a/src/pages/Calendrier.js +++ b/src/pages/Calendrier.js @@ -22,22 +22,7 @@ const locales = { }); const events = [ - { - title: "Big Meeting", - allDay: true, - start: new Date(2022, 10, 0), - end: new Date(2022, 10, 2) - }, - { - title: "Vacation", - start: new Date(2022, 10, 7), - end: new Date(2022, 10, 9) - }, - { - title: "Conference", - start: new Date(2022, 10, 14), - end: new Date(2022, 10, 16) - }, + ]; @@ -45,11 +30,11 @@ const locales = { const Calendrier = () => { - const [newEvent, setNewEvent] = useState({Titre: "", Début: "", Fin:""}); + const [newEvent, setNewEvent] = useState({title: "", start: "", end:""}); const [allEvents, setAllEvents] = useState(events); function handleAddEvent() { - setAllEvents([...allEvents, newEvent]) + setAllEvents([...allEvents, newEvent]); } return ( @@ -76,21 +61,21 @@ const Calendrier = () => {
-

Ajouter un évènement -
- setNewEvent({...newEvent, Titre: e.target.value})}/> - setNewEvent({...newEvent, Début})} /> - setNewEvent({...newEvent, Fin})} /> -
- -

- +

Ajouter un évènement +
+ setNewEvent({...newEvent, title: e.target.value})}/> + setNewEvent({...newEvent, start})} /> + setNewEvent({...newEvent, end})} /> +
+ +

+
diff --git a/src/styles/components/_admin.scss b/src/styles/components/_admin.scss index 1d4128e..d88568a 100644 --- a/src/styles/components/_admin.scss +++ b/src/styles/components/_admin.scss @@ -67,10 +67,7 @@ } } - /*.form{ - align-self: center; - font-size: 30px; - }*/ + .Titre_Formulaire{ display: flex; @@ -120,48 +117,57 @@ -webkit-backdrop-filter: blur(15px);*/ margin-left: 10px; margin-right: 10px; - } - - .Formulaire_de_connexion { - - display: flex; - flex-direction: row; - margin-top: 10%; - /*background: rgba(255, 255, 255, 0.3); - border-radius: 15px; - box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37); - backdrop-filter: blur(3px); - -webkit-backdrop-filter: blur(15px);*/ - - .texte_côté { - display:flex; - flex-direction: column; - justify-content: space-around; - height: 100%; - } - input { + .form{ display: flex; flex-direction: column; - margin: 10px; - } + align-self: center; + font-size: 30px; - .button_submit { - display: flex; - margin-top: 150%; - margin-bottom: 2%; - padding-left: 10px; - - .bouton_réini{ - background-color: rgb(190, 189, 189); - border-radius: 5px; - border: 1px solid black; - box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37); - cursor: pointer; + .Formulaire_de_connexion { + + display: flex; + flex-direction: row; + margin-top: 5%; + /*background: rgba(255, 255, 255, 0.3); + border-radius: 15px; + box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37); + backdrop-filter: blur(3px); + -webkit-backdrop-filter: blur(15px);*/ + + .texte_côté { + display:flex; + flex-direction: column; + justify-content: space-around; + height: 100%; + } + + input { + display: flex; + flex-direction: column; + margin: 10px; + } + + .button_submit { + display: flex; + margin-top: 150%; + margin-bottom: 2%; + padding-left: 10px; + + .bouton_réini{ + background-color: rgb(190, 189, 189); + border-radius: 5px; + border: 1px solid black; + box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37); + cursor: pointer; + } + } } } } + + .texte { align-self: center; font-size: 15px; @@ -199,8 +205,6 @@ font-size: 15px; border-radius: 15px; width: 20%; - align-items: center; - justify-content: center; &:hover { box-shadow: 0, 5px, 35px, 0 rgba(0, 0, 0, 1); @@ -216,15 +220,15 @@ .bouton_ann{ //display: flex; background-color: grey; - border: 1px solid rgba(255, 255, 255, 0.1); + border: 0px solid rgba(255, 255, 255, 0.1); backdrop-filter: blur(30px); color: rgb(255, 255, 255); cursor: pointer; font-size: 15px; border-radius: 15px; width: 20%; - align-items: center; - justify-content: center; + text-decoration: none; + text-align: center; &:hover { box-shadow: 0, 5px, 35px, 0 rgba(0, 0, 0, 1); @@ -396,7 +400,6 @@ border-radius: 15px; width: 30%; align-items: center; - justify-content: center; &:hover { box-shadow: 0, 5px, 35px, 0 rgba(0, 0, 0, 1);