Skip to content

Commit

Permalink
Resolve issues with rightnav (#84)
Browse files Browse the repository at this point in the history
* [rightnav] fix anchor links for headings

* [rightnav] add max size to body to prevent overflows

* [rightnav] remove comment above tocbot.init
  • Loading branch information
jonahbedouch authored Sep 3, 2024
1 parent 0c669b0 commit 726a38b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
3 changes: 1 addition & 2 deletions _includes/footer_custom.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@

<script src="{{ '/assets/js/tocbot.min.js' | relative_url }}"></script>
<script>
// Tries to mirror the HTML TOC
tocbot.init({
tocSelector: '.js-toc',
contentSelector: '.main-content',
Expand All @@ -43,4 +42,4 @@
collapseDepth: 3,
scrollSmooth: false,
});
</script>
</script>
10 changes: 9 additions & 1 deletion _sass/custom/custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ code[style*="color: red"] {
}

.content {
overflow-x: auto;
max-width: 75%
}

.content-nav {
Expand Down Expand Up @@ -140,6 +140,14 @@ code[style*="color: red"] {
.content-nav {
display: none;
}
.content {
width: 100%;
max-width: 100%;
}
.main {
margin: 0 !important;
max-width: 100%;
}
}

// If width of display is at least content+nav width
Expand Down

0 comments on commit 726a38b

Please sign in to comment.