From c3405ba75b114e1fb877031625eb7a9f9d50858f Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Le Duigou Date: Mon, 17 May 2021 13:56:16 +0200 Subject: [PATCH 1/3] Mailchimp (#308) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix link to email address See https://github.com/hossainemruz/toha/issues/7 * ✨ adding mailchimp newsletter feature Signed-off-by: jbleduigou * Make possible to support different newsletter service in future Signed-off-by: hossainemruz Co-authored-by: Emruz Hossain --- layouts/partials/footer.html | 68 ++++++++++++++++++++++++------------ 1 file changed, 45 insertions(+), 23 deletions(-) diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index c3ba9b0..d4bde35 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -7,10 +7,12 @@ {{ $disclaimerEnabled := site.Params.footer.disclaimer.enable | default false }} {{/* Keep backward compatibility for the newsletter function */}} -{{ if site.Params.newsletter.enable }} - {{ $newsletterEnabled = true }} -{{ else }} - {{ $newsletterEnabled = false }} +{{ if site.Params.newsletter }} + {{ if site.Params.newsletter.enable }} + {{ $newsletterEnabled = true }} + {{ else }} + {{ $newsletterEnabled = false }} + {{ end }} {{ end }} {{ if $footerEnabled }} @@ -89,26 +91,46 @@ {{ end }} + {{ if $newsletterEnabled }} -
- -

{{ i18n "newsletter_text" }}

-
-
- - {{ i18n "newsletter_warning" }} -
- -
-
+ {{ $provider := site.Params.footer.newsletter.provider }} +
+

{{ i18n "newsletter_text" }}

+ {{ if and (eq $provider "mailchimp") site.Params.footer.newsletter.mailchimpURL }} +
+
+ + {{ i18n "newsletter_warning" }} +
+ +
+ {{ else }} + +
+
+ + {{ i18n "newsletter_warning" }} +
+ +
+ {{ end }} +
{{ end }} From 466580b57b53f33aba2e52a57a4b1566d0d194ca Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Le Duigou Date: Mon, 17 May 2021 18:50:37 +0200 Subject: [PATCH 2/3] Support adding verifiable `Certification` badges in about section (#307) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix link to email address See https://github.com/hossainemruz/toha/issues/7 * ✨ provide ability to show certification badges in about section Signed-off-by: jbleduigou * Merge certifications and sofkSkills under "badges" generic title Signed-off-by: hossainemruz Co-authored-by: Emruz Hossain --- layouts/partials/misc/badge.html | 35 ++++++++++++++++++++++++++ layouts/partials/misc/soft-skills.html | 1 + layouts/partials/sections/about.html | 5 ++++ 3 files changed, 41 insertions(+) create mode 100644 layouts/partials/misc/badge.html diff --git a/layouts/partials/misc/badge.html b/layouts/partials/misc/badge.html new file mode 100644 index 0000000..2a46299 --- /dev/null +++ b/layouts/partials/misc/badge.html @@ -0,0 +1,35 @@ +
+{{ if eq .type "certification" }} + {{/* Verifiable certificate badge from https://www.credly.com */}} +
+ + {{ .name }} + +
+{{ else if eq .type "circular-bar" }} + {{/* Circular bar indicating the level of expertise in a skill */}} + {{ $predefinedColor:= true}} + {{ if hasPrefix .color "#"}} + {{ $predefinedColor = false }} + {{ end }} +
+ + + + + + +
{{ .name }}
+
+{{ end }} +
diff --git a/layouts/partials/misc/soft-skills.html b/layouts/partials/misc/soft-skills.html index cbdc0ae..1517564 100644 --- a/layouts/partials/misc/soft-skills.html +++ b/layouts/partials/misc/soft-skills.html @@ -1,3 +1,4 @@ +{{/* TODO: Delete this file in version v4+ */}}
{{ $predefinedColor:= true}} {{ if hasPrefix .color "#"}} diff --git a/layouts/partials/sections/about.html b/layouts/partials/sections/about.html index 2999b99..3bb02d6 100644 --- a/layouts/partials/sections/about.html +++ b/layouts/partials/sections/about.html @@ -48,6 +48,11 @@
+ {{ range .badges }} + {{ partial "misc/badge.html" . }} + {{ end }} + + {{ range .softSkills }} {{ partial "misc/soft-skills.html" . }} {{ end }} From 6a01c1ea4b4c876b544bca92a28f4a3107527134 Mon Sep 17 00:00:00 2001 From: hossainemruz Date: Mon, 17 May 2021 23:01:36 +0600 Subject: [PATCH 3/3] Rename "circular-bar" into "soft-skill-indicator" Signed-off-by: hossainemruz --- layouts/partials/misc/badge.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/partials/misc/badge.html b/layouts/partials/misc/badge.html index 2a46299..08d90f5 100644 --- a/layouts/partials/misc/badge.html +++ b/layouts/partials/misc/badge.html @@ -6,7 +6,7 @@ {{ .name }}
-{{ else if eq .type "circular-bar" }} +{{ else if eq .type "soft-skill-indicator" }} {{/* Circular bar indicating the level of expertise in a skill */}} {{ $predefinedColor:= true}} {{ if hasPrefix .color "#"}}