Skip to content

Commit

Permalink
let toc disappear quicker
Browse files Browse the repository at this point in the history
  • Loading branch information
bedroesb committed Aug 29, 2023
1 parent 26451ae commit 438d0f8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion _includes/toc.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
$('#toc-contents').toc({ minimumHeaders: {{site.theme_variables.toc.min_headers | default: 2 }}, listType: 'ul', classes: { list: 'list-unstyled' }, noBackToTopLinks: true, showSpeed: 0, headers: '{{site.theme_variables.toc.headers | default: 'main h2' }}' , title: '<strong class="my-2">On this page</strong><hr class="my-2">' });
});
</script>
<button id="btn-toc-hide" class="btn bg-light d-lg-none hover-primary mb-3" type="button" data-bs-toggle="collapse" data-bs-target="#toc-contents" aria-expanded="true" aria-controls="toc-contents">
<button id="btn-toc-hide" class="btn bg-light d-xl-none hover-primary mb-3" type="button" data-bs-toggle="collapse" data-bs-target="#toc-contents" aria-expanded="true" aria-controls="toc-contents">
<i class="fa-solid fa-up-right-and-down-left-from-center me-2"></i>On this page
</button>
<nav id="toc-contents" class="collapse" aria-label="Table of contents"></nav>
Expand Down
6 changes: 3 additions & 3 deletions assets/css/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ body img {
grid-template-rows: auto auto 1fr;
}
}
@include media-breakpoint-up(lg) {
@include media-breakpoint-up(xl) {
#main {
grid-template-areas:
"intro toc"
Expand All @@ -128,7 +128,7 @@ body img {
display: none;
}

@include media-breakpoint-up(lg) {
@include media-breakpoint-up(xl) {
#toc {
top: $spacer * 3;
right: 0;
Expand Down Expand Up @@ -474,7 +474,7 @@ header .navbar {
/*-----TOC-----*/

#toc-contents {
@include media-breakpoint-up(lg) {
@include media-breakpoint-up(xl) {
display: block !important;
} // Indent the lists and reset any other padding
ul {
Expand Down

0 comments on commit 438d0f8

Please sign in to comment.