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

能否实现文章目录单独浮动和子目录折叠 #673

Closed
bytepoem opened this issue Apr 12, 2020 · 1 comment
Closed

能否实现文章目录单独浮动和子目录折叠 #673

bytepoem opened this issue Apr 12, 2020 · 1 comment
Labels
feature:extension Feature request that affects widgets, comment, share, search, and plugins.

Comments

@bytepoem
Copy link

bytepoem commented Apr 12, 2020

作者你好,目前我使用的 hexo 和 icarus 都是最新版本

目前问题

对于一些较长的文章(h1,h2 标题较多),目前主题提供的文章目录功能只能设置左边或右边的widget 整列浮动,且文章目录过长时会导致底部的部分一直在屏幕之外

文章页面

文章源文件

建议

能否实现

  • TOC 这类 widget 单独浮动
  • TOC 子目录折叠(自动或者手动)

示例网站:http://theme-next.iissnan.com/getting-started.html#install-next-theme

示例

示例网站:http://moxfive.coding.me/2016/06/13/hexo-collapsible-toc/

示例

@ppoffice ppoffice added the feature:extension Feature request that affects widgets, comment, share, search, and plugins. label Apr 12, 2020
ppoffice referenced this issue Apr 12, 2020
- allow empty profile social_links
- fix code block font size on iOS safari
@ppoffice
Copy link
Owner

ppoffice commented Apr 12, 2020

@bytepoem

TOC 这类 widget 单独浮动

请更新主题到master分支的最新commit,并参照此处复制toc.jsx并添加is-sticky

https://github.com/ppoffice/hexo-component-inferno/blob/0.2.3/src/view/widget/toc.jsx#L118

这行的class="card widget"的引号之中(变成class="card widget is-sticky")。

TOC 子目录折叠(自动或者手动)

请参考 https://removeif.github.io/theme/%E5%8D%9A%E5%AE%A2%E6%BA%90%E7%A0%81%E5%88%86%E4%BA%AB.htmlhttps://github.com/removeif/hexo-theme-amazing/blob/master/layout/widget/toc.jsx

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

2 participants