fix: make TOC title and entries visible at the same time (#1711)
When internet connection speeds are poor, there is a chance that the title of the TOC will appear earlier than its entries, causing a visual cutoff.
This commit is contained in:
parent
778ebdf250
commit
e0950fc973
2 changed files with 4 additions and 2 deletions
|
@ -6,8 +6,8 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if enable_toc %}
|
{% if enable_toc %}
|
||||||
<section id="toc-wrapper" class="ps-0 pe-4">
|
<section id="toc-wrapper" class="d-none ps-0 pe-4">
|
||||||
<h2 class="panel-heading ps-3 pt-2 mb-2">{{- site.data.locales[include.lang].panel.toc -}}</h2>
|
<h2 class="panel-heading ps-3 mb-2">{{- site.data.locales[include.lang].panel.toc -}}</h2>
|
||||||
<nav id="toc"></nav>
|
<nav id="toc"></nav>
|
||||||
</section>
|
</section>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -9,5 +9,7 @@ export function toc() {
|
||||||
orderedList: false,
|
orderedList: false,
|
||||||
scrollSmooth: false
|
scrollSmooth: false
|
||||||
});
|
});
|
||||||
|
|
||||||
|
document.getElementById('toc-wrapper').classList.remove('d-none');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue