Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fixes position of sticky-nav after closing ql-banner #9007

Merged
merged 1 commit into from
Jun 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion app/assets/v2/js/ql-banner.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@

// check if the banner has been closed
if (!localStorage.getItem('ql-banner')) {
// get body
const body = document.querySelector('body');
// grab the elements
const banner = document.getElementById('ql-banner');
// grab the elements
Expand All @@ -11,7 +13,7 @@ if (!localStorage.getItem('ql-banner')) {
const bannerInnerRow = document.querySelector('#ql-banner-inner .row');

// show the banner
banner.style.display = 'flex';
body.classList.add('ql-banner-visible');

// set up the kinetics (using custom implementation to contain the particles in a single el)
const kinetics = new Kinetics({
Expand Down
6 changes: 5 additions & 1 deletion app/assets/v2/scss/ql-banner.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
z-index: 4;
}

body.ql-banner-visible #ql-banner {
display: flex;
}

#ql-banner-inner {
height: 160px;
}
Expand Down Expand Up @@ -79,7 +83,7 @@
z-index: 0;
}

body:not(.navbar-menu-open) .sticky-nav {
body.ql-banner-visible:not(.navbar-menu-open) .sticky-nav {
top: 160px;
}

Expand Down