Redesign accomplishment cards + Add necessary translations

Signed-off-by: hossainemruz <hossainemruz@gmail.com>
This commit is contained in:
hossainemruz 2021-03-26 23:40:13 +06:00
parent 904a5c14b0
commit d5c1729c88
17 changed files with 205 additions and 159 deletions

View file

@ -55,40 +55,41 @@
<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 }}
{{ end }}
{{ if lt .section.weight 7 }}
<li class="nav-item">
<a class="nav-link" href="#{{ $sectionID }}">{{ .section.name }}</a>
</li>
{{ end }}
{{ if and (.section.enable) (.section.showOnNavbar)}}
{{ $sectionCount = add $sectionCount 1}}
{{ if lt $sectionCount 5 }}
{{ $sectionID := replace (lower .section.name) " " "-" }}
{{ if .section.id }}
{{ $sectionID = .section.id }}
{{ end }}
<li class="nav-item">
<a class="nav-link" href="#{{ $sectionID }}">{{ .section.name }}</a>
</li>
{{ end }}
{{ end }}
{{- end }}
{{ if gt (len $sections) 6 }}
<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>
{{ end }}
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
{{ 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) }}
{{ if and (.section.enable) (.section.showOnNavbar) }}
{{ $sectionCount = add $sectionCount 1}}
{{ $sectionID := replace (lower .section.name) " " "-" }}
{{ if .section.id }}
{{ $sectionID = .section.id }}
{{ end }}
{{ if gt .section.weight 6 }}
{{ if gt $sectionCount 5 }}
<a class="dropdown-item" href="#{{ $sectionID }}">{{ .section.name }}</a>
{{ end }}
{{ end }}
{{- end }}
</div>
</li>
{{ end }}
{{- end }}
{{ $hasCustomMenus:= false }}
{{ if $customMenus }}