Skip to content

Commit

Permalink
Merge pull request #606 from fabiolb/599-website-layout-without-js
Browse files Browse the repository at this point in the history
docs: fix layout without JS enabled
  • Loading branch information
magiconair committed Mar 1, 2019
2 parents dd9ef7d + 35103f8 commit 39910b0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/static/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
height: 100%;
}

/* set navbar to static for now. If JS is enabled, we will revert to fixed in
* custom.js, but if JS isn't enabled a fixed header overlaps the content. */
.site-header.sticky .navbar {
position: static;
}

article.main-content {
padding-top: 0;
}
Expand Down
2 changes: 2 additions & 0 deletions docs/static/js/custom.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
$(function() {
// Make the navbar only fixed if JS is enabled, else it overlaps the content.
$(".site-header.sticky .navbar").css('position', 'fixed');
});

0 comments on commit 39910b0

Please sign in to comment.