gokarna-theme / gokarna-hugo

A minimal opinionated theme for Hugo
https://gokarna-hugo.netlify.app
GNU General Public License v3.0
384 stars 147 forks source link

feat: responsive Table of Contents #103

Open jamesericdavidson opened 2 years ago

jamesericdavidson commented 2 years ago

95 added a Table of Contents for desktop, but it does not appear on mobile.

The Gokarna implementation is superior to the generic Hugo shortcode, so seeing this feature regardless of screen size would be great.

If you don't want to implement this feature yourselves, guidance on submitting a Pull Request would be appreciated! :smile:

yashmehrotra commented 2 years ago

@jamesericdavidson Thank you for the kind words.

We haven't implemented the mobile version yet cause its a bit tricky to create a nice UI which is both purposeful and aesthetic. We will probably implement it by adding a Table of contents dropdown at the start of the page

If you don't want to implement this feature yourselves, guidance on submitting a Pull Request would be appreciated!

That's highly appreciated, we'll try to pick this up and get this done next week but if that doesn't happen would love your help

mansoorbarri commented 1 year ago

how about a colapse-able TOC with a button which is constantly displayed, something like this: New Project

yashmehrotra commented 1 year ago

@mansoorbarri This does not match the UI design and looks bad

Have you seen any other sites doing this on mobile, curious to see how others have implemented it

mansoorbarri commented 1 year ago

@mansoorbarri This does not match the UI design and looks bad

Have you seen any other sites doing this on mobile, curious to see how others have implemented it

https://christitus.com used to have a collapsible menu at the top of every article but now he has removed that too.

I think there is no "good" way to do this right now.