hugo-theme-learn icon indicating copy to clipboard operation
hugo-theme-learn copied to clipboard

Implement TableOfContent #67 with aside toc

Open famaridon opened this issue 7 years ago • 22 comments

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 ?

famaridon avatar Jan 05 '18 15:01 famaridon

A big thanks for a big PR ! I may need some time to review it though.

matcornic avatar Jan 07 '18 22:01 matcornic

if you need some help say me. I will help you with pleasure.

famaridon avatar Jan 08 '18 07:01 famaridon

I functionally tested your PR and it looks pretty neat, congrats 👍 . I have following remarks though:

  1. The pages with aside mode are kind of broken in mobile version: http://recordit.co/WjLFoezE9w
  2. 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.
  3. 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 ^^
  4. 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

matcornic avatar Jan 17 '18 21:01 matcornic

hi I think it's all done.

  1. max-width is needed with display: flex;. I also remove scrolling on toc on mobile devices.
  2. Now we can add tocMode in config.toml to change the side default mode.
  3. I added it but it's not realy visual, but I don know how to make it more visual.
  4. ordered

famaridon avatar Jan 18 '18 12:01 famaridon

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 !

s-leray avatar Jan 19 '18 14:01 s-leray

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.

famaridon avatar Jan 23 '18 09:01 famaridon

Hi,

when do you think you can finish code review?

famaridon avatar Jan 30 '18 08:01 famaridon

hello can you finish this pull request ?

famaridon avatar Apr 05 '18 09:04 famaridon

up

can you finish this pull request plz

famaridon avatar Jun 11 '18 19:06 famaridon

@famaridon great work! Looking also forward to have this merged into the main theme. Any blockers on that, @matcornic?

nlsrchtr avatar Jun 26 '18 22:06 nlsrchtr

@matcornic This is a cool feature! Are there any updates?

pocc avatar May 03 '19 18:05 pocc

up

famaridon avatar Jul 16 '19 07:07 famaridon

one more up

famaridon avatar Sep 16 '19 08:09 famaridon

+1

@famaridon Do you have a screenshot or an example website of this feature?

RobFog avatar Nov 18 '19 00:11 RobFog

Hi @RobFog,

you can find a sample https://process-sdk-draft.doc.moovapps.com/rest/

famaridon avatar Nov 18 '19 08:11 famaridon

Thank you very much!

RobFog avatar Nov 18 '19 09:11 RobFog

Is their any problem with the merge request ?

famaridon avatar Jul 29 '20 13:07 famaridon

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

matalo33 avatar Jul 29 '20 13:07 matalo33

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.

famaridon avatar Jul 30 '20 07:07 famaridon

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

McShelby avatar Oct 02 '20 15:10 McShelby

Eagerly waiting for this!

thrix avatar Oct 13 '20 14:10 thrix

I'm sorry but I can't work on it I'm currently too busy

famaridon avatar Oct 13 '20 14:10 famaridon