Add acomplishment section

Signed-off-by: hossainemruz <hossainemruz@gmail.com>
This commit is contained in:
hossainemruz 2021-03-28 00:55:39 +06:00
parent b602756e28
commit 5c95132b1e
22 changed files with 266 additions and 12 deletions

View file

@ -55,17 +55,33 @@
<a class="nav-link" href="#home">{{ i18n "home" }}</a>
</li>
{{ if $sections }}
{{ $sectionCount := 0}}
{{ range sort $sections "section.weight" }}
{{ if and (.section.enable) (.section.showOnNavbar)}}
{{ $sectionID := replace (lower .section.name) " " "-" }}
{{ if .section.id }}
{{ $sectionID = .section.id }}
{{ $sectionCount = add $sectionCount 1}}
{{ if lt $sectionCount 5 }}
<li class="nav-item">
<a class="nav-link" href="#{{ partial "helpers/get-section-id.html" . }}">{{ .section.name }}</a>
</li>
{{ end }}
<li class="nav-item">
<a class="nav-link" href="#{{ $sectionID }}">{{ .section.name }}</a>
</li>
{{ end }}
{{- end }}
{{ if gt $sectionCount 5 }}
<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">{{i18n "more" }}</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
{{ $sectionCount := 0 }}
{{ range sort $sections "section.weight" }}
{{ if and (.section.enable) (.section.showOnNavbar) }}
{{ $sectionCount = add $sectionCount 1}}
{{ if gt $sectionCount 5 }}
<a class="dropdown-item" href="#{{ partial "helpers/get-section-id.html" . }}">{{ .section.name }}</a>
{{ end }}
{{ end }}
{{- end }}
</div>
</li>
{{ end }}
{{- end }}
{{ $hasCustomMenus:= false }}
{{ if $customMenus }}