Expand description
文章目录组件。 文章目录组件
双形态(CSS 媒体查询切换,断点 1200px):
- <1200px(移动端/窄屏):正文顶部
<details class="toc">折叠块,Alt+C 聚焦。 - ≥1200px(桌面端):右缘悬浮侧边目录——收起为一列层级刻度,scroll-spy 高亮
当前阅读节(
__initTocSidebar,IntersectionObserver 探测带),鼠标悬浮动画 展开为卡片面板,点 pin 按钮锁定展开。
两形态共用同一份服务端生成的 toc_html(嵌套 <ul><li><a href="#id">)。
锚点点击由 yggdrasil-core 的 initAnchorClick 全局 capture 拦截平滑滚动,
侧边目录链接自动受益。
Re-exports§
pub use PostToc_completions::Component::PostToc;
Structs§
- Post
TocProps - Properties for the
PostToccomponent.
Functions§
- PostToc
- 文章目录(Table of Contents)组件。