Skip to content

Commit

Permalink
keep content clear of nav #8
Browse files Browse the repository at this point in the history
  • Loading branch information
weru committed May 19, 2020
1 parent fc71674 commit 1184e46
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions assets/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,13 @@ function hasClasses(el) {
}
}

(function calcNavHeight(){
const nav = elem('.nav_header');
const navHeight = nav.offsetHeight;
const docContent = elem('main');
docContent.style.paddingTop = `${navHeight + 20}px`;
})();

(function markInlineCodeTags(){
const codeBlocks = elems('code');
if(codeBlocks) {
Expand Down

0 comments on commit 1184e46

Please sign in to comment.