hugo-theme-learn
hugo-theme-learn copied to clipboard
Implement TableOfContent #67 with aside toc
Hello I implemented multiple tocMode=navbar|page|aside
(as enhancement #67).
I also added documentation and samples in /exempleSite/content/cont/toc
Can you add it to your very nice theme ?
A big thanks for a big PR ! I may need some time to review it though.
if you need some help say me. I will help you with pleasure.
I functionally tested your PR and it looks pretty neat, congrats 👍 . I have following remarks though:
- The pages with
aside
mode are kind of broken in mobile version: http://recordit.co/WjLFoezE9w - Could you add a global option to let the user choose a mode, once and for all. But keep local options when user want to specifically change the mode of a given page.
- Could you add a disclaimer on each example page to show the differences. At first, I searched something special in "navbar" example... until I understood that it was the normal mode ^^
- Could you set a "navbar" example page as first page in the toc menu as it's the default.
I will do a more thorough technical review when you're ready.
Note: don't worry, I will translate french pages :p
hi I think it's all done.
- max-width is needed with display: flex;. I also remove scrolling on toc on mobile devices.
- Now we can add tocMode in config.toml to change the side default mode.
- I added it but it's not realy visual, but I don know how to make it more visual.
- ordered
Hi,
Could you implement an automatic switch mode ? My users works on laptop or desktop.
On a laptop, I rather keep toc in navbar. On a desktop (resolution 1600x900 and higher) I rather switch to the mode aside.
Hope you will. Aside toc is a real good idea. Thanks !
Hi the aside mode switch to page mode with this css media query in hugo-theme-toc.css file :
@media only all and (max-width: 48em)
I think you can overwrite it with custom css.
Hi,
when do you think you can finish code review?
hello can you finish this pull request ?
up
can you finish this pull request plz
@famaridon great work! Looking also forward to have this merged into the main theme. Any blockers on that, @matcornic?
@matcornic This is a cool feature! Are there any updates?
up
one more up
+1
@famaridon Do you have a screenshot or an example website of this feature?
Hi @RobFog,
you can find a sample https://process-sdk-draft.doc.moovapps.com/rest/
Thank you very much!
Is their any problem with the merge request ?
Is their any problem with the merge request ?
Hi @famaridon, been a bit busy with changing jobs and taking some time off. I'll get to this when possible. In the meantime I do notice that it has a conflict that'll need resolving before rebase & merge.
Thanks for the contribution
Ok I understand :)
I have tried to merge it on my fork.
Their is a problem with css. I can try to work on it. Their is an other problem with scrollspy. I think it's better to remove this feature because it's not mandatory and it can be hard to maintain.
Else all works well.
Thanks @famaridon, this looks pretty slick and I like the idea.
Sadly there are some issues at least with the page on your example page.
- using Chrome 85, the page looks broken
- using FF 81, the page looks pretty good, but the toc is running vertically off the visible area and there is no scroll bar
- long titles are wrapping around into the next line, making the toc hard to read and difficult to discern the structure of the document
Eagerly waiting for this!
I'm sorry but I can't work on it I'm currently too busy