mirror of
https://git.beihong.wang/wangbeihong/blog-source.git
synced 2026-04-24 08:13:04 +08:00
initial
This commit is contained in:
1
usr/themes/HarmonyHues/assets/js/article-toc.min.js
vendored
Executable file
1
usr/themes/HarmonyHues/assets/js/article-toc.min.js
vendored
Executable file
@@ -0,0 +1 @@
|
||||
$(document).ready(function(){var t=$('[id^="cl-"]'),e=$(".atoc-list a");setActiveCatalogItem=(()=>{var a=$(window).scrollTop()+100;t.each(function(){var t=$(this),o=t.attr("id"),c=$('a[data-target="'+o+'"]');t.offset().top<=a&&(e.removeClass("active"),c.addClass("active"))})}),setActiveCatalogItem(),$(window).scroll(()=>{setActiveCatalogItem()});const a=new IntersectionObserver(t=>{t.forEach(t=>{const e=$(".widget-toc-main");t.isIntersecting?e.show():e.hide()})}),o=document.querySelector("#post");o&&a.observe(o)});
|
||||
Reference in New Issue
Block a user