forked from decidim/decidim
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
28 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
let prevScrollpos = window.scrollY; | ||
Check failure Code scanning / check-spelling Unrecognized Spelling Error
Scrollpos is not a recognized word. (unrecognized-spelling)
|
||
const mainBar = document.getElementById("main-bar"); | ||
|
||
window.onscroll = function() { | ||
// if a subelement is not visible it has no offsetParent | ||
const header = document.getElementById("main-dropdown-summary-mobile").offsetParent; | ||
if (header) { | ||
let currentScrollPos = window.scrollY; | ||
|
||
if (prevScrollpos > currentScrollPos) { | ||
Check failure Code scanning / check-spelling Unrecognized Spelling Error
Scrollpos is not a recognized word. (unrecognized-spelling)
|
||
mainBar.style.top = 0; | ||
} else { | ||
mainBar.style.top = `-${header.offsetHeight}px`; | ||
} | ||
prevScrollpos = currentScrollPos; | ||
Check failure Code scanning / check-spelling Unrecognized Spelling Error
Scrollpos is not a recognized word. (unrecognized-spelling)
|
||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
footer { | ||
@apply mb-16 lg:mb-0; | ||
|
||
.main-footer { | ||
@apply bg-gray-4; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters