mirror of
https://github.com/cotes2020/jekyll-theme-chirpy.git
synced 2025-06-07 16:17:50 +00:00
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
@ -6,8 +6,8 @@
|
||||
{% endif %}
|
||||
|
||||
{% if enable_toc %}
|
||||
<section id="toc-wrapper" class="ps-0 pe-4">
|
||||
<h2 class="panel-heading ps-3 pt-2 mb-2">{{- site.data.locales[include.lang].panel.toc -}}</h2>
|
||||
<section id="toc-wrapper" class="d-none ps-0 pe-4">
|
||||
<h2 class="panel-heading ps-3 mb-2">{{- site.data.locales[include.lang].panel.toc -}}</h2>
|
||||
<nav id="toc"></nav>
|
||||
</section>
|
||||
{% endif %}
|
||||
|
@ -9,5 +9,7 @@ export function toc() {
|
||||
orderedList: false,
|
||||
scrollSmooth: false
|
||||
});
|
||||
|
||||
document.getElementById('toc-wrapper').classList.remove('d-none');
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user