diff --git a/assets/css/menu.css b/assets/css/menu.css index aeadfa6..00fc4b6 100644 --- a/assets/css/menu.css +++ b/assets/css/menu.css @@ -1,12 +1,11 @@ .menu { position: fixed; - left: 0; - bottom: -12vh; width: 100%; - height: 25vh; + height: fit-content; z-index: 2; overflow: visible; transition: transform 0.3s; + bottom: 0; } @@ -21,7 +20,6 @@ height: auto; align-items: center; background-color: rgba(64, 98, 63, 0.7); /* Add a semi-transparent background color for readability */ - bottom: 5vh; } @@ -35,12 +33,13 @@ margin: 0 10px; #menu a { display: block; /* Add this line to make the link fill the entire menu item */ padding: 10px; /* Add some padding for better readability and clickable area */ - color: #c25151; + color: #c32c2c; text-decoration: none; - background-image: url('/assets/img/buisson.svg'); /* Add this line to set the link background image */ background-repeat: no-repeat; background-position: center; background-size: cover; + background-image: url('/assets/img/buisson.svg'); + } #menu a:hover{ @@ -48,99 +47,70 @@ margin: 0 10px; transform: translateY(-2px); } + + + +/*hide the mobile menu by default*/ + +.topnav{ + visibility: hidden; + height: 0px; +} + + + /* Add styles for smartphones screens */ @media all and (max-width: 800px) { - .menu { - position: fixed; - bottom: 0; - width: 100%; - height: 25vh; - z-index: 2; - overflow: visible; - transition: transform 0.3s; - } - - #menu ul { - height: auto; - flex-direction: column; - justify-content: center; - } - - #menu li { - margin: 5px 0; - } - -} - -.mobile-menu { - display: block; + /* Style the navigation menu */ +.topnav { + visibility: visible; + overflow-y: scroll; + background-color: #333; position: fixed; - top: 0; left: 0; - overflow: hidden; width: 100%; - z-index: 20; - - height: 0; - background: rgba(15, 15, 23, 0); - - transition: background-color 0.2s linear; -} - -.mobile-menu .containerF3g { - width: 100%; height: 100%; - overflow: auto; -} - -.mobile-grid { - display: flex; - flex-wrap: wrap; - padding: 2vh 60px; - min-height: 100vh; - justify-content: center; - align-content: center; -} - -.mobile-menu-link { - min-width: 100px; - width: 50%; + z-index: 100; + border-radius: 10px; + margin-top: 1vh; + height: auto; + } + + /* Hide the links inside the navigation menu (except for logo/home) */ + .topnav #mobile_menu_links { + display: none; + + } + + /* Style navigation menu links */ + .topnav a { + color: white; + padding: 1vh 1vw; + text-decoration: none; + font-size: 4vh; display: block; - opacity: 0; - cursor: pointer; - transform: translateY(10%); - transition: transform 0.2s ease-out, opacity 0.2s linear 0.05s; -} - -nav.mobile-menu.open .mobile-menu-link { - transform: translateY(0); - opacity: 1; -} - -.menu-link:hover text { - fill: #FFDC00; -} - -.mobile-brick { - display: block; -} - - -span.close-mobile-menu { - color: #FFF; - font-size: 80px; + text-align: center; + } + + /* Style the hamburger menu */ + .topnav a.icon { + background: black; display: block; position: absolute; - -webkit-user-select: none; /* Safari */ - -moz-user-select: none; /* Firefox */ - -ms-user-select: none; /* IE10+/Edge */ - user-select: none; /* Standard */ - cursor: pointer; - bottom: 0; - right: 20px; - transition: color 0.5s; -} - -span.close-mobile-menu:hover { - color: #FFDC00; + right: 0; + top: 0; + } + + /* Add a grey background color on mouse-over */ + .topnav a:hover { + background-color: #ddd; + color: black; + } + + .active { + background-color: rgb(27, 170, 22);; + color: white; + } } + + diff --git a/assets/css/template.css b/assets/css/template.css index ce74929..786f2a7 100644 --- a/assets/css/template.css +++ b/assets/css/template.css @@ -98,6 +98,20 @@ a.linkmail:hover { border-radius: 10px; } + +/* +ajoute une petite marge au dessus de la pancarte sur mobile pour laisser +de la place a la navbar + +ajuste aussi la taille du texte de la pancarte +*/ +@media all and (max-width: 800px) { + + .pancarte{ + margin-top: 10vh; + } +} + .pancarte .title { padding: 3vw 4.5vw; color: black; @@ -171,6 +185,8 @@ footer { margin-top: 2vh; margin-left: auto; margin-right: auto; + font-size: 3vh; + } diff --git a/structure/menu.php b/structure/menu.php index 254f1a8..4cc15dc 100644 --- a/structure/menu.php +++ b/structure/menu.php @@ -29,39 +29,45 @@ for($i = 0; $i <= 17; $i++){ - -