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>
|
</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
|
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
|
||||||
<a class="dropdown-item" href="#achievements">Achievements</a>
|
{{ range sort $sections "section.weight" }}
|
||||||
<a class="dropdown-item" href="#recent-posts">Recent Posts</a>
|
{{ 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>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue