Multiple Navigations in Sidebar (mul-behavior showed by gif) #3092
Replies: 5 comments
-
This doesn't look like its intended usage. |
Beta Was this translation helpful? Give feedback.
-
Thank you for so prompt reply! Indeed, I put together several Stackoverflows and finally made this Frankenstein. From the source code |
Beta Was this translation helpful? Give feedback.
-
Multiple sitemap:
- title: "Sitemap"
children:
- title: "Home"
url: /home.html
- title: "Schedule"
url: /schedule.html
- title: "Speakers"
url: /speakers.html
- title: "Participants"
url: /participants.html
- title: "Contact Information"
children:
- title: "Person A"
mail: "[email protected]"
- title: "Person B"
mail: "[email protected]" |
Beta Was this translation helpful? Give feedback.
-
@iBug is correct. Unintended use having two nav lists on the same page as it looks really clunky with the two collapse toggles. The YAML above is how the theme expects a nav with multiple headings to be structured. |
Beta Was this translation helpful? Give feedback.
-
Maybe seldom people want to put two sidebars, but my case is an example. As the two nav's are different things, I do not want them to be highlighted at the same time. In @iBug 's solution, the two nav's will still change the opacity simultaneously. After all, your template is great and helps me a lot! And I think my workaround is good for my demend. |
Beta Was this translation helpful? Give feedback.
-
Environment
Steps to reproduce the behavior
When the mouse hovering on the sidebar, the sidebar's opacity will change. However, when there are multiple nav's in the sidebar, their opacity will all changed or not changed. This is not beautiful. What's more, when the screen is small ("Toggle menu" appears), all the "toggle menu" buttons could only open the first nav.
The codes are as follows.
home.md
:navigation.yml
:This behavior is due to all the nav's are using the same CSS class or id. I cure the first issue by add
nav.title
toid="ac-toc"
in _includes/nav_list.For the second issue, I disabled hover in the CSS class file and rewrite the behavior in _includes/nav_list. using inline js.
My repo with above changes is ymsc-strings/gauge-theory-workshop-sept-2021.
I did not submit a pull request because I think this is a mere ad-hoc solution and I believe you have better solutions. This repo is excellent! Thank you very much for your template anyhow.
Beta Was this translation helpful? Give feedback.
All reactions