fix: 限制文章目录长度,防止 TODO 溢出

- 为 #leftbar_catalog 添加 max-height: calc(100vh - 400px) 限制
- 添加滚动条样式,当目录过长时可滚动查看
- 确保目录、TODO 和页面底部保持合理间距
- 添加暗色模式下的滚动条样式
This commit is contained in:
2026-01-12 16:30:12 +08:00
parent 899a5ae1cf
commit ff4c8460a2

View File

@@ -4595,21 +4595,33 @@ html.darkmode .tippy-box[data-theme~="light"] {
/*侧栏文章目录*/ /*侧栏文章目录*/
#leftbar_catalog { #leftbar_catalog {
margin-left: -5px; margin-left: -5px;
width: calc(100% + 0px); width: calc(100% + 0px);
height: auto; height: auto;
max-height: calc(100vh - 400px); /* 限制最大高度,为 TODO 和底部留出空间 */
overflow-y: auto;
}
#leftbar_catalog::-webkit-scrollbar {
width: 4px;
}
#leftbar_catalog::-webkit-scrollbar-track {
background: transparent;
}
#leftbar_catalog::-webkit-scrollbar-thumb {
background-color: rgba(0, 0, 0, 0.15);
border-radius: 2px;
}
html.darkmode #leftbar_catalog::-webkit-scrollbar-thumb {
background-color: rgba(255, 255, 255, 0.15);
} }
#leftbar_catalog ul { #leftbar_catalog ul {
padding: 0; padding: 0;
list-style: none; list-style: none;
} }
#leftbar_catalog .index-item, #leftbar_catalog .index-item,