Skip to content

Commit

Permalink
Support adding verifiable Certification badges in about section (hu…
Browse files Browse the repository at this point in the history
…go-toha#307)

* Fix link to email address

See hugo-toha#7

* ✨ provide ability to show certification badges in about section

Signed-off-by: jbleduigou <[email protected]>

* Merge certifications and sofkSkills under "badges" generic title

Signed-off-by: hossainemruz <[email protected]>

Co-authored-by: Emruz Hossain <[email protected]>
  • Loading branch information
jbleduigou and hossainemruz committed May 17, 2021
1 parent c3405ba commit 466580b
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 0 deletions.
35 changes: 35 additions & 0 deletions layouts/partials/misc/badge.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<div class="col-6 col-lg-4 p-2">
{{ if eq .type "certification" }}
{{/* Verifiable certificate badge from https://www.credly.com */}}
<div class="">
<a href="{{ .url }}" target="_blank" >
<img src="{{ .badge }}" alt="{{ .name }}" />
</a>
</div>
{{ else if eq .type "circular-bar" }}
{{/* Circular bar indicating the level of expertise in a skill */}}
{{ $predefinedColor:= true}}
{{ if hasPrefix .color "#"}}
{{ $predefinedColor = false }}
{{ end }}
<div class="circular-progress {{if $predefinedColor}}{{ .color }}{{end}}">
<span class="circular-progress-left">
<span
class="circular-progress-bar circular-progress-percentage-{{ .percentage }}"
{{ if not $predefinedColor }}
style="border-color: {{.color}};"
{{ end }}
></span>
</span>
<span class="circular-progress-right">
<span
class="circular-progress-bar"
{{ if not $predefinedColor }}
style="border-color: {{.color}};"
{{ end }}
></span>
</span>
<div class="circular-progress-value">{{ .name }}</div>
</div>
{{ end }}
</div>
1 change: 1 addition & 0 deletions layouts/partials/misc/soft-skills.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{/* TODO: Delete this file in version v4+ */}}
<div class="col-6 col-lg-4 p-2">
{{ $predefinedColor:= true}}
{{ if hasPrefix .color "#"}}
Expand Down
5 changes: 5 additions & 0 deletions layouts/partials/sections/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ <h5 class="p-1">
<!-- soft skills circular-progressbar -->
<div class="col-sm-6 pt-5 pl-md-4 pl-sm-3 pt-sm-0">
<div class="row">
{{ range .badges }}
{{ partial "misc/badge.html" . }}
{{ end }}
<!-- TODO: Remove this part in version v4+ -->
<!-- Keep backward compatibility with old configuration -->
{{ range .softSkills }}
{{ partial "misc/soft-skills.html" . }}
{{ end }}
Expand Down

0 comments on commit 466580b

Please sign in to comment.