JuliaPluto / PlutoUI.jl

https://featured.plutojl.org/basic/plutoui.jl
The Unlicense
299 stars 54 forks source link

An error in the indentation of the ToC #228

Closed holomorphism closed 1 year ago

holomorphism commented 1 year ago

@fonsp I have tried TableOfContents in PlutoUI v0.7.43. It looks very cool!

However, there seems to be an error in the indentation of the ToC items. See the following image. toc

I think you can fix the following line in TableOfContents.jl. https://github.com/JuliaPluto/PlutoUI.jl/blob/fbcd8dc23e2a1c590829634334c9e43637ac6ccc/src/TableOfContents.jl#L436-L458

I made the following changes to this section on my end and it appears to be working correctly.

.plutoui-toc.indent section .after-H2 a { padding-left: 10px; }
.plutoui-toc.indent section .after-H3 a { padding-left: 20px; }
.plutoui-toc.indent section .after-H4 a { padding-left: 30px; }
.plutoui-toc.indent section .after-H5 a { padding-left: 40px; }
.plutoui-toc.indent section .after-H6 a { padding-left: 50px; }

.plutoui-toc.indent section a.H1 { padding-left: 0px; }
.plutoui-toc.indent section a.H2 { padding-left: 10px; }
.plutoui-toc.indent section a.H3 { padding-left: 20px; }
.plutoui-toc.indent section a.H4 { padding-left: 30px; }
.plutoui-toc.indent section a.H5 { padding-left: 40px; }
.plutoui-toc.indent section a.H6 { padding-left: 50px; }

Thanks.

fonsp commented 1 year ago

Thanks for the bug report and the fix! Released in PlutoUI 0.7.44 🎉

holomorphism commented 1 year ago

Thanks!