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

目录显示不正常 #93

Open
iamwlb opened this issue Apr 13, 2020 · 6 comments
Open

目录显示不正常 #93

iamwlb opened this issue Apr 13, 2020 · 6 comments

Comments

@iamwlb
Copy link

iamwlb commented Apr 13, 2020

目录在左边显示不正常。
截屏2020-04-13 下午8 41 03

@vhxubo
Copy link

vhxubo commented Apr 14, 2020

可以尝试使用customCSS,将目录修改为获得焦点后展开。
修改后的样式见 Vhxubo' blog,以下是具体的解决方案:

  • themes/maupassant/static/css目录下创建toc_style.css文件,填入以下内容
.post-toc {
  transition: all .3s ease;
}

.post-toc:hover,.post-toc:active {
  width: 200px !important;
}
  • config.toml中填入以下内容
[params]
  customCSS = ['toc_style.css']

@iamwlb
Copy link
Author

iamwlb commented Apr 14, 2020

试了一下,有效果,但是体验还是很差,一是没有了阅读时的实施定位功能,二是需要鼠标点击才出来,toc放在左边,严重破坏阅读体验。

@atmgnd
Copy link

atmgnd commented Apr 18, 2020

我把config里的toc改成false后, 单独在文章里加toc=true, 仍有目录显示, 但显示是正常的, 可以试试

@xujpxm
Copy link

xujpxm commented Apr 22, 2020

打算用这个主题,但是目录体验确实很差,希望作者能改进下,多谢~

@iamhaifeng
Copy link

试了一下,有效果,但是体验还是很差,一是没有了阅读时的实施定位功能,二是需要鼠标点击才出来,toc放在左边,严重破坏阅读体验。

我试了 @vhxubo 的方法,Hugo版本:0.101.0,效果不错,鼠标移过去就把目录显示出来了,不需要点击鼠标,建议作者合并至master. @rujews

@flysnoworg
Copy link
Collaborator

建议前端高手贡献commit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants