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

Make it possible to collapse navigation bar items which have child items #243

Closed
bazsodombiandras opened this issue Nov 19, 2021 · 11 comments
Labels
question Further information is requested

Comments

@bazsodombiandras
Copy link

bazsodombiandras commented Nov 19, 2021

It would be nice to have to possibility to collapse/expand the navigation bar items which have child items under them. This could be controlled by a config option.

Consider the following example:

Navigation
Posts
    Reports
        Mary
            2021 November
            2021 October
            2021 September
            ...
        Joseph
            2021 November
            2021 October
            2021 September
            ...```

As time goes by and a report is published each month both for Mary and Joseph, Mary's list grows very large and you have to scroll down a lot to get to Joseph's reports. Collapsing/expanding the "Mary" node elegantly solves this problem.
@xoxys
Copy link
Member

xoxys commented Nov 19, 2021

That's already possible. You can control this for each individual section using geekdocCollapseSection or globally using GeekdocCollapseAllSections on your projects' config file.

@xoxys xoxys added the question Further information is requested label Nov 19, 2021
@xoxys
Copy link
Member

xoxys commented Nov 19, 2021

There is also a demo section on the docs page if you want to see it in action:

image

@bazsodombiandras
Copy link
Author

That's awesome! how can I add geekdocCollapseSection to just one section, not from the global config.toml?

@xoxys
Copy link
Member

xoxys commented Nov 19, 2021

As you would do with every page config 🙂 add it to the front matter of the section. See https://raw.githubusercontent.com/thegeeklab/hugo-geekdoc/main/exampleSite/content/collapse/level-2/_index.md

@bazsodombiandras
Copy link
Author

Wow, didn't know it's possible to do configs per section. Thanks!

Is there any way I could donate a small symbolic sum (like 5 euros) to you to buy you a coffee for all the great work that you do with this theme?

@bazsodombiandras
Copy link
Author

The collapsing works like magic per level, however if I make some sections collapsible, the leaf levels (lowest levels) start as collapsed by default. Is there any way to make them collapsible but have them be expanded by default?

@bazsodombiandras
Copy link
Author

Important things have been clarified. Thank you very much for your help!

@xoxys
Copy link
Member

xoxys commented Nov 20, 2021

Is there any way I could donate a small symbolic sum (like 5 euros) to you to buy you a coffee for all the great work that you do with this theme?

Right now, I don't have a way to make donations. But your kind words are very welcome :) If you want to support our work, please keep reporting issues, star this repo and tell others about it. That helps a lot.

@xoxys
Copy link
Member

xoxys commented Nov 20, 2021

The collapsing works like magic per level, however if I make some sections collapsible, the leaf levels (lowest levels) start as collapsed by default. Is there any way to make them collapsible but have them be expanded by default?

Right now, that's not possible. I would need to take a look if we could support it somehow.

@bazsodombiandras
Copy link
Author

The collapsing works like magic per level, however if I make some sections collapsible, the leaf levels (lowest levels) start as collapsed by default. Is there any way to make them collapsible but have them be expanded by default?

Right now, that's not possible. I would need to take a look if we could support it somehow.

Not abig deal, it's quite OK as it is. Thank you!

@bazsodombiandras
Copy link
Author

Is there any way I could donate a small symbolic sum (like 5 euros) to you to buy you a coffee for all the great work that you do with this theme?

Right now, I don't have a way to make donations. But your kind words are very welcome :) If you want to support our work, please keep reporting issues, star this repo and tell others about it. That helps a lot.

Will do! Geekdoc is by far the nicest Hugo theme I've found for my personal needs.

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

No branches or pull requests

2 participants