Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

希望能够实现文章目录widget的自适应滚动 #835

Open
lpy716 opened this issue Jan 24, 2021 · 4 comments
Open

希望能够实现文章目录widget的自适应滚动 #835

lpy716 opened this issue Jan 24, 2021 · 4 comments
Labels
feature:extension Feature request that affects widgets, comment, share, search, and plugins.

Comments

@lpy716
Copy link

lpy716 commented Jan 24, 2021

确保你在提交功能建议之前仔细阅读了Hexo文档Icarus用户指南,和GitHub issues来了解你的建议是否已经被他人提出过。

你的功能建议与某个使用问题相关么?请详述。

阅览文章时,目录不能跟随当前正在浏览的节标题。参照作者在#745及更早给出的解决方案,尽管已实现正在被浏览节标题的高亮,但一旦目录太长,就算是设置了max-height和可滚动乃至目录widget的单独固定,超过max-height的标题也得靠手动滚动才能看到高亮,而非它自动滚动出来。

描述你想要的解决方案

类似这个网站的效果,使正在被浏览的标题除处在首、尾部的以外,始终都处于目录widget的中间位置。

@ppoffice ppoffice added the feature:extension Feature request that affects widgets, comment, share, search, and plugins. label Jan 24, 2021
@hellowac
Copy link

是的,希望目录可以达到页面允许的最大高度时支持滚动。就像 Icarus用户指南 页面 旁边的目录导航,当阅读够深时,而浏览器页面高度不够时,左边目录栏想看下面的导航就看不到了。

@TinyTigerPan
Copy link

请问现在有解决方案了吗

@maizehsu
Copy link

请问现在有解决方案了吗

https://www.alphalxy.com/2019/03/customize-icarus/#%E7%9B%AE%E5%BD%95%E7%B2%98%E6%80%A7%E5%AE%9A%E4%BD%8D

Icarus 5.0.0 亲测可用

@studeyang
Copy link

把 collapsed 设置成 true 就可以了。

widgets:
  -
    position: left
    type: toc
    index: false
    collapsed: true
    depth: 3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature:extension Feature request that affects widgets, comment, share, search, and plugins.
Projects
None yet
Development

No branches or pull requests

6 participants