Open CFaught opened 7 years ago
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?
@CFaught - Any progress on this? If not, I will make the changes.
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.
@CFaught - No rush. Was just checking in on it!
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 }}"> </i>{{ .Name }}</a>
<ul class="dropdown-content">
{{ range .Children }}
<li><a href="{{ .URL }}"><i class="{{ .Pre }}"> </i>{{ .Name }}</a></li>
{{ end }}
</ul>
{{ else }}
<a href="{{ .URL }}"><i class="{{ .Pre}}"> </i>{{ .Name }}</a>
{{ end }}
</li>
Make sure to style it in the mobile pop-out menu as well. Check your site on mobile.