Update social-follow.html

fixed most of the capitalization issues by making use of `lower` hugo command.  The only outstanding problem is that Stack Overflow will render as `StackOverflow` (one word).  This could probably be fixed with a simple `if` statement
This commit is contained in:
zjrohrbach 2020-12-29 22:03:46 -05:00 committed by GitHub
parent 55f6057a35
commit 0fd21e2a3b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,14 +1,14 @@
<!-- TODO: Add follow intents where available TODO: Revisit color and hover color -->
{{ $icon_size := "32px" }}
{{ $social_media := slice "stackoverflow" "facebook" "twitter" "instagram" "youtube" "linkedin" "github" "gitlab" "keybase" "medium" "mastodon" "slack" "rss" }}
{{ $social_media := slice "StackOverflow" "Facebook" "Twitter" "Instagram" "YouTube" "LinkedIn" "GitHub" "GitLab" "Keybase" "Medium" "Mastodon" "Slack" "RSS" }}
{{ $dot_passthrough := . }}
{{ range $social_media }}
{{ $this_key := . }}
{{ with $dot_passthrough.Param . }}
<a href="{{ . }}" target="_blank" class="link-transition {{ $this_key }} link dib z-999 pt3 pt0-l mr1" title="{{ $this_key | humanize}} link" rel="noopener" aria-label="follow on {{ $this_key | humanize}}——Opens in a new window">
{{ partial (print "svg/" $this_key ".svg") (dict "size" $icon_size) }}
<a href="{{ . }}" target="_blank" class="link-transition {{ $this_key | lower }} link dib z-999 pt3 pt0-l mr1" title="{{ $this_key }} link" rel="noopener" aria-label="follow on {{ $this_key }}——Opens in a new window">
{{ partial (print "svg/" ($this_key | lower) ".svg") (dict "size" $icon_size) }}
{{- partial "new-window-icon.html" . -}}
</a>
{{ end }}
{{ end }}
{{ end }}