From 999dc0706fff72fa5b6a04df708a17871e4b5045 Mon Sep 17 00:00:00 2001 From: George Cushen Date: Wed, 1 Nov 2023 18:47:26 +0000 Subject: [PATCH] blocks(accomp): add explicit `icon` field for complex org names We tried to simplify the process by automatically determining icon name, but in some cases with complex org names containing slashes etc, it may not work so well. Closes #3006 --- modules/wowchemy/layouts/partials/blocks/accomplishments.html | 3 ++- starters/academic/content/_index.md | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/wowchemy/layouts/partials/blocks/accomplishments.html b/modules/wowchemy/layouts/partials/blocks/accomplishments.html index f1c1981e..49439968 100644 --- a/modules/wowchemy/layouts/partials/blocks/accomplishments.html +++ b/modules/wowchemy/layouts/partials/blocks/accomplishments.html @@ -15,7 +15,8 @@ {{ range $idx, $key := sort $block.content.items ".date_start" "desc" }}
- {{- $svg_icon := resources.Get (printf "media/icons/brands/%s.svg" (replace (lower .organization) " " "_")) -}} + {{- $icon := .icon | default (replace (lower .organization) " " "_") }} + {{- $svg_icon := resources.Get (printf "media/icons/brands/%s.svg" $icon) -}} {{- if $svg_icon }}
diff --git a/starters/academic/content/_index.md b/starters/academic/content/_index.md index 0da36b49..dece286a 100644 --- a/starters/academic/content/_index.md +++ b/starters/academic/content/_index.md @@ -102,6 +102,7 @@ sections: date_end: '' date_start: '2021-01-25' description: '' + icon: coursera organization: Coursera organization_url: https://www.coursera.org title: Neural Networks and Deep Learning @@ -110,6 +111,7 @@ sections: date_end: '' date_start: '2021-01-01' description: Formulated informed blockchain models, hypotheses, and use cases. + icon: edx organization: edX organization_url: https://www.edx.org title: Blockchain Fundamentals @@ -118,6 +120,7 @@ sections: date_end: '2020-12-21' date_start: '2020-07-01' description: '' + icon: datacamp organization: DataCamp organization_url: https://www.datacamp.com title: 'Object-Oriented Programming in R'