diff --git a/assets/css/planning_events.css b/assets/css/planningEvents.css similarity index 100% rename from assets/css/planning_events.css rename to assets/css/planningEvents.css diff --git a/assets/css/sidenav.css b/assets/css/sidenav.css index f59e2cd..19f0e84 100755 --- a/assets/css/sidenav.css +++ b/assets/css/sidenav.css @@ -3,7 +3,7 @@ .sidenav { height: 100%; width: 300px; - margin-left: -270px; /* change margin with JavaScript */ + transform: translateX(-270px); /* change margin with JavaScript */ position: fixed; /* Stay in place */ z-index: 1000; top: 0; @@ -13,6 +13,10 @@ background: linear-gradient(to right, #1c1c1c, transparent 90%); } +.sidenav.sidenav-open { + transform: translateX(0); +} + #sidenav-scroll { position: absolute; diff --git a/assets/scripts/photosScript.js b/assets/scripts/photos.js similarity index 100% rename from assets/scripts/photosScript.js rename to assets/scripts/photos.js diff --git a/assets/scripts/planningScript.js b/assets/scripts/planning.js similarity index 100% rename from assets/scripts/planningScript.js rename to assets/scripts/planning.js diff --git a/assets/scripts/sidenavScript.js b/assets/scripts/sidenav.js similarity index 76% rename from assets/scripts/sidenavScript.js rename to assets/scripts/sidenav.js index d7a57b6..48c769b 100755 --- a/assets/scripts/sidenavScript.js +++ b/assets/scripts/sidenav.js @@ -1,7 +1,9 @@ -var menuOpen = false; -var sidenav = $("#menuSidenav"); -var hamburger = $("#hamburger"); -var backButton = $("#back-button"); +let sidenav = $("#menuSidenav"); +let hamburger = $("#hamburger"); +let backButton = $("#back-button"); + +let openedSidenavClass = 'sidenav-open'; +let activeBackgroundClass = 'active-background'; /* * Open navigation menu, change Hamburger icon to selected state @@ -9,11 +11,9 @@ var backButton = $("#back-button"); */ function openNav() { - sidenav.css("margin-left", "0"); - sidenav.css("overflow", "auto"); - backButton.addClass("active-background"); + sidenav.addClass(openedSidenavClass); + backButton.addClass(activeBackgroundClass); enableHamburger(); - menuOpen = true; } @@ -22,11 +22,9 @@ function openNav() { * and hide the back button overlay */ function closeNav() { - sidenav.css("margin-left", "-270px"); - sidenav.css("overflow", "hidden"); - backButton.removeClass("active-background"); + sidenav.removeClass(openedSidenavClass); + backButton.removeClass(activeBackgroundClass); disableHamburger(); - menuOpen = false; } @@ -34,7 +32,7 @@ function closeNav() { * Toggle the navigation bar */ function toggleNav() { - if (menuOpen) { + if (sidenav.hasClass(openedSidenavClass)) { closeNav(); } else { openNav(); diff --git a/assets/scripts/TimerScript.js b/assets/scripts/timer.js similarity index 100% rename from assets/scripts/TimerScript.js rename to assets/scripts/timer.js diff --git a/photos.php b/photos.php index 80fe892..4c1711b 100755 --- a/photos.php +++ b/photos.php @@ -278,7 +278,7 @@ function generatePath($path) ?> - + diff --git a/planning.php b/planning.php index 2e5ed6c..26e4c8f 100755 --- a/planning.php +++ b/planning.php @@ -98,8 +98,8 @@ ob_start(); // Start reading html

Clique sur un évenement pour afficher ses informations

- - + + - - + +