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

@ -23,7 +23,8 @@
<link rel="stylesheet" href="{{ "/css/sections/projects.css" | relURL }}"/>
<link rel="stylesheet" href="{{ "/css/sections/recent-posts.css" | relURL }}"/>
<link rel="stylesheet" href="{{ "/css/sections/achievements.css" | relURL }}"/>
<link rel="stylesheet" href="{{ "/css/sections/accomplishments.css" | relURL }}"/>
<!-- Add Google Analytics if enabled in configuration -->
{{ if site.GoogleAnalytics }}
{{ template "_internal/google_analytics_async.html" . }}

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

View file

@ -0,0 +1,5 @@
{{ $sectionID := replace (lower .section.name) " " "-" }}
{{ if .section.id }}
{{ $sectionID = .section.id }}
{{ end }}
{{ return $sectionID }}

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

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