From 7b4d6569a56081871491d54d16051745f7b57a2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o?= <theo@le-filament.com> Date: Tue, 19 Apr 2022 17:50:34 +0200 Subject: [PATCH] display hamburger menu in home on small devices and center logo --- assets/css/style.css | 21 ++++++++++----------- layouts/index.html | 1 + layouts/partials/header.html | 5 +++++ 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/assets/css/style.css b/assets/css/style.css index dadf6af..08b1449 100644 --- a/assets/css/style.css +++ b/assets/css/style.css @@ -1095,17 +1095,8 @@ object { justify-content:center; background-color:#fff } -@media (min-width:768px) { - .site-branding { - justify-content:space-between - } -} #menu { - display:flex; - flex-wrap: wrap; - justify-content: space-between; - width: 280px; - z-index:1 + display:none; } .contact-yellow-top { margin-top:30px; @@ -1158,8 +1149,16 @@ object { } @media (min-width:992px) { .site-branding { - padding-bottom:20px + padding-bottom:20px; + justify-content: space-between; } + #menu { + display:flex; + flex-wrap: wrap; + justify-content: space-between; + width: 280px; + z-index:1 + } #contact-section h2 { margin-top:130px } diff --git a/layouts/index.html b/layouts/index.html index 033bde0..e056802 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -3,6 +3,7 @@ {{ .Scratch.Set "title" "Accueil" }} {{ partial "head.html" . }} <body> + {{ partial "header.html" . }} <div id="content" class="site-content"> <div class="home"> <div class="home-content"> diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 7c0bc71..890ef45 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -1,4 +1,7 @@ <header id="masthead" class="site-header"> + {{ if .IsHome }} + <label class="label-menu label-menu-home"> + {{ end }} <div class="site-branding container-site"> <a href="/" class="custom-logo-link" rel="home" itemprop="url"> <img src="/images/logo-lefilament-H.svg" class="custom-logo" alt="Le Filament" > @@ -162,7 +165,9 @@ </div> </div> </div> + {{ if not .IsHome }} <label class="label-menu label-menu-home"> + {{ end }} <input type="checkbox"> <span class="menu"> <span class="hamburger"></span> -- GitLab