mirror of
https://github.com/cotes2020/jekyll-theme-chirpy.git
synced 2025-06-07 16:17:50 +00:00
fix: toc not visible when switching from mobile to desktop mode (#2139)
This commit is contained in:
parent
c174f62f26
commit
32051dad03
@ -27,6 +27,9 @@ function init() {
|
|||||||
mobile.init();
|
mobile.init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const $tocWrapper = document.getElementById('toc-wrapper');
|
||||||
|
$tocWrapper.classList.remove('invisible');
|
||||||
|
|
||||||
desktopMode.onchange = refresh;
|
desktopMode.onchange = refresh;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,11 +15,6 @@ export class TocDesktop {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static init() {
|
static init() {
|
||||||
const $tocWrapper = document.getElementById('toc-wrapper');
|
tocbot.init(this.options);
|
||||||
|
|
||||||
if ($tocWrapper) {
|
|
||||||
tocbot.init(this.options);
|
|
||||||
$tocWrapper.classList.remove('invisible');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user