mirror of https://github.com/theNewDynamic/gohugo-theme-ananke.git

Patrick Kollitsch
20.23.2024 8762f563f9bf0d35a1c3ece6bf8bdd1fc63b054c
theme(fix): making sure the noopener rel attribute stays even with other configurations

Signed-off-by: Patrick Kollitsch <patrick@davids-neighbour.com>
1 files modified
4 ■■■■ changed files
layouts/partials/social/follow.html 4 ●●●● patch | view | raw | blame | history
layouts/partials/social/follow.html
@@ -13,7 +13,7 @@
    {{- $setup := . -}}
    {{- $network := $setup.slug -}}
    {{- $profile := index $config $network -}}
    {{- $rel := $setup.rel | default "noopener" -}}
    {{- $rel := $setup.rel | default "" -}}
    {{- $label := $profile.label | default $setup.label -}}
    {{- $link := (printf $setup.profile $profile.username) -}}
@@ -22,7 +22,7 @@
    {{- end -}}
    {{- $languageDirection := cond (eq $.Site.Language.LanguageDirection "rtl") "ml1" "mr1" -}}
    <a href="{{ $link }}" target="_blank" rel="{{ $rel }}"
    <a href="{{ $link }}" target="_blank" rel="noopener{{- with $rel }} {{ . -}}{{- end -}}"
        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">