From: Vincent Vanwaelscappel Date: Thu, 5 Sep 2019 15:40:31 +0000 (+0200) Subject: fix #3003 @1.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=37dd8b43d9a0e641b721e9f8e087f669b40ad391;p=pmi.git fix #3003 @1.5 --- diff --git a/resources/js/app.js b/resources/js/app.js index 0af809c..261a0ca 100644 --- a/resources/js/app.js +++ b/resources/js/app.js @@ -129,10 +129,11 @@ window.addEventListener('scroll', function () { function checkScroll() { window.headerHeight = 134; - if (document.documentElement.scrollTop > 200) { + var scroll = document.documentElement.scrollTop; + if (scroll > 200) { document.getElementById('site-header').classList.add('minimized'); window.headerHeight = 60; - } else { + } else if (scroll < 100) { document.getElementById('site-header').classList.remove('minimized'); } } diff --git a/resources/js/components/ProductsFilters.vue b/resources/js/components/ProductsFilters.vue index 8d2ce38..6206000 100644 --- a/resources/js/components/ProductsFilters.vue +++ b/resources/js/components/ProductsFilters.vue @@ -3,7 +3,7 @@
-
+
@@ -54,7 +54,7 @@
-
+
diff --git a/resources/styles/components/header.styl b/resources/styles/components/header.styl index 222ac1e..6bbe279 100644 --- a/resources/styles/components/header.styl +++ b/resources/styles/components/header.styl @@ -1,14 +1,14 @@ #header-placeholder height 134px + .template-home & + background-color:theme('colors.navy') .site-header --transition-duration 500ms - - @apply bg-navy text-white text-lg font-display font-medium antialiased - position fixed + @apply bg-navy text-white text-lg font-display font-medium antialiased sticky top-0 transition height var(--transition-duration) width 100% - z-index 10 + z-index 100 height 134px .container diff --git a/resources/views/partials/header.blade.php b/resources/views/partials/header.blade.php index 347e8d6..4260612 100644 --- a/resources/views/partials/header.blade.php +++ b/resources/views/partials/header.blade.php @@ -1,5 +1,4 @@ @include('partials.nav-mobile') -