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

added dropdown menu functionality for multilevel navigation #60

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

CFaught
Copy link

@CFaught CFaught commented Oct 12, 2017

No description provided.

@pacollins
Copy link
Collaborator

Make sure to style it in the mobile pop-out menu as well. Check your site on mobile.

@CFaught
Copy link
Author

CFaught commented Oct 13, 2017

I was going to leave the list indented and remove the bullets, is that good or do you think the theme should have an accordion like feature for the side menu?

Copy link
Collaborator

@pacollins pacollins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

config.toml - Great, logical UX.

navbar.html - I think that the dropdown should reflect what it is doing. site.com/parent/child/ And with that, the link for parent would be site.com/parent instead of #. With that, I'm not sure on whether the sidebar should be a drop down menu or not. I think for longevity, it needs to be a drop down in case someone has a lot of children to the parent menu.

main.css - I think there needs to be some kind of bordering/shadow or something to set it apart from the rest of the content

Thanks for working on this while I work on getting the multilingual going!

@pacollins pacollins added this to the v0.30 milestone Oct 19, 2017
@pacollins
Copy link
Collaborator

@CFaught - Any progress on this? If not, I will make the changes.

@CFaught
Copy link
Author

CFaught commented Oct 23, 2017

The repo should have everything except the collapsing side-menu items and shadowing. Sorry, I've been busy and haven't finished this, but I can probably do this tomorrow.

@pacollins
Copy link
Collaborator

@CFaught - No rush. Was just checking in on it!

@daspiras
Copy link

daspiras commented Aug 5, 2018

Thank you for this. However, this technique prevents you from easily using a fontawesome icon in a parent menu, so I also think moving the fontawesome code to another variable (I used pre) is better since the identifier variable is technically supposed to be a unique ID for each menu item. This allows use of fontawesome icons at any level, including duplicates.

I also agree with @pacollins that the parent should link to a valid URL, which is what I did:

<li>
      {{ if .HasChildren }}
        <a class="dropdown" href="{{ .URL }}"><i class="{{ .Pre }}">&nbsp;</i>{{ .Name }}</a>
                        <ul class="dropdown-content">
                                 {{ range .Children }}
                                         <li><a href="{{ .URL }}"><i class="{{ .Pre }}">&nbsp;</i>{{ .Name }}</a></li>
                                 {{ end }}
                         </ul>
       {{ else }}
            <a href="{{ .URL }}"><i class="{{ .Pre}}">&nbsp;</i>{{ .Name }}</a>
       {{ end  }}
</li>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants