wip(js): add head.html and assets/js

This commit is contained in:
geekifan
2025-04-21 17:35:52 +08:00
parent 33048ab200
commit f5b2c028da
29 changed files with 1243 additions and 0 deletions

View File

@ -0,0 +1,20 @@
export class TocDesktop {
/* Tocbot options Ref: https://github.com/tscanlin/tocbot#usage */
static options = {
tocSelector: '#toc',
contentSelector: '.content',
ignoreSelector: '[data-toc-skip]',
headingSelector: 'h2, h3, h4',
orderedList: false,
scrollSmooth: false,
headingsOffset: 16 * 2 // 2rem
};
static refresh() {
tocbot.refresh(this.options);
}
static init() {
tocbot.init(this.options);
}
}