Skip to content
Open
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
13 changes: 12 additions & 1 deletion esp/esp/themes/theme_data/droplets/scss/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,22 @@ div.navbar-collapse {
background-position: 0;
}

@media (min-width: 768px) and (max-width: $navbarCollapseWidth) {
// Below the collapse width the navbar and footer sit in the page flow instead of
// staying fixed, so they can't cover the page. main.html only adds the body
// padding that clears fixed bars above this width.
@media (max-width: $navbarCollapseWidth) {

.navbar-container .navbar.fixed-top,
.footer-container .navbar.fixed-bottom {
position: static;
}

.navbar-container,
.footer-container {
width: 100%;
max-width: none;
padding-left: 0;
padding-right: 0;
}
Comment thread
coderabbitai[bot] marked this conversation as resolved.
}

Expand Down
6 changes: 5 additions & 1 deletion esp/esp/themes/theme_data/droplets/templates/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,11 @@
};
function headerResize() {
if (window.innerWidth > parseInt($j(":root").css("--width-breakpoint"))){
$j('body').css('padding-top', $j("#navbar").innerHeight());
// Measure the fixed-top nav itself, not the #navbar container inside
// it, so the padding also covers the nav's own vertical padding.
var $headerNav = $j("#navbar").closest(".navbar");
var h = $headerNav.length ? $headerNav.outerHeight(false) : $j("#navbar").outerHeight(false);
$j('body').css('padding-top', h);
} else {
$j('body').css('padding-top', "inherit");
}
Expand Down
Loading