added dropdown after 6 elements

This commit is contained in:
HenzelMoras 2021-03-25 16:54:57 +05:30
parent c0b67d35ff
commit a0976fffac

View file

@ -56,16 +56,29 @@
</li> </li>
{{ if $sections }} {{ if $sections }}
{{ range sort $sections "section.weight" }} {{ range sort $sections "section.weight" }}
{{ if and (.section.enable) (.section.showOnNavbar)}} {{ if and (.section.enable) (.section.showOnNavbar) }}
{{ $sectionID := replace (lower .section.name) " " "-" }} {{ $sectionID := replace (lower .section.name) " " "-" }}
{{ if .section.id }} {{ if .section.id }}
{{ $sectionID = .section.id }} {{ $sectionID = .section.id }}
{{ end }} {{ end }}
<li class="nav-item"> {{ if lt .section.weight 7 }}
<a class="nav-link" href="#{{ $sectionID }}">{{ .section.name }}</a> <li class="nav-item">
</li> <a class="nav-link" href="#{{ $sectionID }}">{{ .section.name }}</a>
</li>
{{ end }}
{{ end }} {{ end }}
{{- end }} {{- end }}
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
More
</a>
<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>
</div>
</li>
{{- end }} {{- end }}
{{ $hasCustomMenus:= false }} {{ $hasCustomMenus:= false }}
{{ if $customMenus }} {{ if $customMenus }}