From d81dafb1c5cfc38164fa7a4512b75f80660ba0c5 Mon Sep 17 00:00:00 2001 From: Eduardo Gomez Date: Wed, 13 Nov 2019 14:03:29 +0100 Subject: [PATCH] Fix an issue with the header on mobile --- package.json | 2 +- src/js/app.js | 2 ++ src/sass/components/header/_header.scss | 8 ++++++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 7b1cf9a9b..71d4e0e67 100644 --- a/package.json +++ b/package.json @@ -54,5 +54,5 @@ "desktop": "assets/screenshot-desktop.jpg", "mobile": "assets/screenshot-mobile.jpg" }, - "version": "0.5.9" + "version": "0.6.0" } diff --git a/src/js/app.js b/src/js/app.js index 2ce861488..4553306a1 100644 --- a/src/js/app.js +++ b/src/js/app.js @@ -102,11 +102,13 @@ $(document).ready(() => { } $openMenu.click(() => { + $header.addClass('mobile-menu-opened') $menu.addClass('opened') toggleScrollVertical() }) $closeMenu.click(() => { + $header.removeClass('mobile-menu-opened') $menu.removeClass('opened') toggleScrollVertical() }) diff --git a/src/sass/components/header/_header.scss b/src/sass/components/header/_header.scss index 77baf13df..f559a49af 100644 --- a/src/sass/components/header/_header.scss +++ b/src/sass/components/header/_header.scss @@ -12,6 +12,14 @@ padding: 20px 0; } + &.mobile-menu-opened { + height: 100%; + + @include respond-to('medium') { + height: auto; + } + } + &.headroom--pinned { @include bs(0 4px 8px rgba(0, 0, 0, 0.05)); @include transform(translateY(0%));