Skip to content

Commit f2c5022

Browse files
committed
simplify icon logic
1 parent 02c9bcf commit f2c5022

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

data/sponsors.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ years:
88
dark: /images/sponsors/cyberloop-dark.svg
99
light: /images/sponsors/cyberloop-light.svg
1010
links:
11-
site: https://cyberloop.it
11+
link: https://cyberloop.it
1212
linkedin: https://linkedin.com/company/cyberloop

layouts/shortcodes/sponsors.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,8 @@ <h2 style="margin-top:2rem">{{ $year.year }}</h2>
5252
<div class="sponsor-links">
5353
{{ range $k, $v := . }}
5454
{{ $key := (lower $k) }}
55-
{{ $icon := (cond (or (eq $key "website") (eq $key "sito")) "link" (cond (or (eq $key "twitter") (eq $key "x")) (cond (in (lower $v) "x.com") "x" "twitter") (cond (eq $key "linkedin") "linkedin" $key))) }}
5655
<a href="{{ $v }}" target="_blank" rel="noopener" aria-label="{{ $k }}" title="{{ $k }}">
57-
{{ partial "svg.html" (dict "name" $icon) }}
56+
{{ partial "svg.html" (dict "name" $key) }}
5857
</a>
5958
{{ end }}
6059
</div>

0 commit comments

Comments
 (0)