From 7913086a0f255a8c3a7878a152471270d0b15805 Mon Sep 17 00:00:00 2001
From: Patrick Kollitsch <patrick@davids-neighbour.com>
Date: Sun, 20 Oct 2024 08:58:53 +0000
Subject: [PATCH] theme(fix): add labels and label override functionality
---
layouts/partials/social/follow.html | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/layouts/partials/social/follow.html b/layouts/partials/social/follow.html
index c4c3037..2ac075e 100644
--- a/layouts/partials/social/follow.html
+++ b/layouts/partials/social/follow.html
@@ -14,6 +14,7 @@
{{- $network := $setup.slug -}}
{{- $profile := index $config $network -}}
{{- $rel := $setup.rel | default "noopener" -}}
+ {{- $label := $profile.label | default $setup.label -}}
{{- $link := (printf $setup.profile $profile.username) -}}
{{- with $profile.profilelink -}}
@@ -23,8 +24,8 @@
{{- $languageDirection := cond (eq $.Site.Language.LanguageDirection "rtl") "ml1" "mr1" -}}
<a href="{{ $link }}" target="_blank" rel="{{ $rel }}"
class="{{ .name }} ananke-social-link link-transition stackoverflow link dib z-999 pt3 pt0-l {{ $languageDirection }}"
- title="follow on {{ .label }} - Opens in a new window"
- aria-label="follow on {{ .label }} - Opens in a new window">
+ title="follow on {{ $label }} - Opens in a new window"
+ aria-label="follow on {{ $label }} - Opens in a new window">
{{- with .icon -}}
{{- $icon := resources.Get (printf "ananke/socials/%s.svg" .) -}}
{{- with $icon -}}
@@ -34,7 +35,7 @@
</span>
{{- end -}}
{{- else -}}
- {{- .label -}}
+ {{- $label -}}
{{- end -}}
{{- with $config.follow.new_window_icon -}}
{{- partial "new-window-icon.html" . -}}
--
Gitblit v1.10.0