feat: 将目录(TOC)移至侧边栏并优化滚动高亮逻辑
- 重构TOC组件,移至SideBar中显示 - 改进IntersectionObserver实现,优化章节高亮行为 - 添加toc国际化翻译(中/英/繁) - 更新Swup容器配置,支持文章页侧边栏刷新 - 移除原MainGridLayout中的独立TOC容器
This commit is contained in:
@@ -37,6 +37,7 @@ enum I18nKey {
|
||||
notFoundDesc = "notFoundDesc",
|
||||
backToHome = "backToHome",
|
||||
pinned = "pinned",
|
||||
toc = "toc",
|
||||
}
|
||||
|
||||
export default I18nKey;
|
||||
|
||||
@@ -40,4 +40,5 @@ export const en: Translation = {
|
||||
[Key.notFoundDesc]: "The link is broken, the page has gone missing",
|
||||
[Key.backToHome]: "Back to Home",
|
||||
[Key.pinned]: "Pinned",
|
||||
[Key.toc]: "Toc",
|
||||
};
|
||||
|
||||
@@ -40,4 +40,5 @@ export const zh_CN: Translation = {
|
||||
[Key.notFoundDesc]: "你访问的链接已断开,页面走丢了",
|
||||
[Key.backToHome]: "返回首页",
|
||||
[Key.pinned]: "置顶",
|
||||
[Key.toc]: "目录",
|
||||
};
|
||||
|
||||
@@ -40,4 +40,5 @@ export const zh_TW: Translation = {
|
||||
[Key.notFoundDesc]: "你訪問的連結已斷開,頁面走丟了",
|
||||
[Key.backToHome]: "返回首頁",
|
||||
[Key.pinned]: "置頂",
|
||||
[Key.toc]: "目錄",
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user