Add acomplishment section
Signed-off-by: hossainemruz <hossainemruz@gmail.com>
This commit is contained in:
parent
b602756e28
commit
5c95132b1e
22 changed files with 266 additions and 12 deletions
17
layouts/partials/cards/accomplishments.html
Normal file
17
layouts/partials/cards/accomplishments.html
Normal file
|
@ -0,0 +1,17 @@
|
|||
<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>
|
5
layouts/partials/helpers/get-section-id.html
Normal file
5
layouts/partials/helpers/get-section-id.html
Normal file
|
@ -0,0 +1,5 @@
|
|||
{{ $sectionID := replace (lower .section.name) " " "-" }}
|
||||
{{ if .section.id }}
|
||||
{{ $sectionID = .section.id }}
|
||||
{{ end }}
|
||||
{{ return $sectionID }}
|
|
@ -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 }}
|
||||
|
|
18
layouts/partials/sections/accomplishments.html
Normal file
18
layouts/partials/sections/accomplishments.html
Normal file
|
@ -0,0 +1,18 @@
|
|||
{{ $sectionID := replace (lower .section.name) " " "-" }}
|
||||
{{ if .section.id }}
|
||||
{{ $sectionID = .section.id }}
|
||||
{{ end }}
|
||||
|
||||
<div class="container-fluid anchor pb-5 accomplishments-section" id="{{ $sectionID }}">
|
||||
{{ if not (.section.hideTitle) }}
|
||||
<h1 class="text-center">{{ .section.name }}</h1>
|
||||
{{ end }}
|
||||
|
||||
<div class="container">
|
||||
<div class="row" id="acomplishment-card-holder">
|
||||
{{ range .accomplishments }}
|
||||
{{ partial "cards/accomplishments" . }}
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue