fixed navbar dropdown function
This commit is contained in:
parent
a35e3b792d
commit
8363889012
1 changed files with 11 additions and 2 deletions
|
@ -75,8 +75,17 @@
|
|||
</a>
|
||||
{{ end }}
|
||||
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
|
||||
<a class="dropdown-item" href="#achievements">Achievements</a>
|
||||
<a class="dropdown-item" href="#recent-posts">Recent Posts</a>
|
||||
{{ range sort $sections "section.weight" }}
|
||||
{{ if and (.section.enable) (.section.showOnNavbar) }}
|
||||
{{ $sectionID := replace (lower .section.name) " " "-" }}
|
||||
{{ if .section.id }}
|
||||
{{ $sectionID = .section.id }}
|
||||
{{ end }}
|
||||
{{ if gt .section.weight 6 }}
|
||||
<a class="dropdown-item" href="#{{ $sectionID }}">{{ .section.name }}</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{- end }}
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue