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

@ -1,35 +1,17 @@
<div
class="col-sm-12 col-md-6 col-lg-4 p-2 filtr-item"
>
<div class="card mt-1">
<div class="card">
<a class="card-header">
<div>
<div class="d-flex">
{{ if .logo }}
{{ $logoImage:= resources.Get .logo}}
{{ if $logoImage }}
{{ $logoImage := $logoImage.Fit "24x24" }}
<img class="card-img-xs" src="{{ $logoImage.RelPermalink }}" alt="{{ .name }}" />
{{ end }}
{{ end }}
<h6 class="card-title mb-0">{{ .name }}</h6>
</div>
<div class="sub-title ml-2 pl-4 ">
<span>{{ .organization }}</span>
<span>{{ .timeline }}</span>
</div>
</div>
</a>
<div class="card-body text-justify pt-1 pb-1">
<p class="ml-2 mb-2 pl-2 ">{{ .overview | markdownify }}</p>
<!-- Display certificate discription and link -->
<a class="btn btn-outline-info ml-1 pl-2 mb-2" href="{{ if .url }}{{ .url }}{{ else }}#accomplishments{{ end }}" target="_blank" role="button">see certificate</a>
<div class="col-md-12 col-lg-6 p-2">
<div class="card mt-3">
<div class="card-header">
<h5 class="card-title mb-0">{{ .name }}</h5>
<div class="sub-title">
<span><a href="{{ .organization.url }}">{{ .organization.name }}</a></span>
<span class="ml-2">{{ .timeline }}</span>
</div>
</div>
<div class="card-body">
<p>{{ .courseOverview | markdownify }}</p>
</div>
<div class="card-footer">
<a class="btn btn-outline-info ml-1 pl-2 mb-2" href="{{ .certificateURL | default "#"}}" target="_blank" role="button">{{ i18n "view_certificate"}}</a>
</div>
</div>
</div>

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 }}

View file

@ -10,7 +10,7 @@
<div class="container">
<div class="row" id="acomplishment-card-holder">
{{ range .certificates }}
{{ range .accomplishments }}
{{ partial "cards/accomplishments" . }}
{{ end }}
</div>