mirror of
https://github.com/theNewDynamic/gohugo-theme-ananke.git
synced 2025-04-29 20:52:42 +00:00
theme(fix): making sure the noopener rel attribute stays even with other configurations
Signed-off-by: Patrick Kollitsch <patrick@davids-neighbour.com>
This commit is contained in:
parent
7913086a0f
commit
8762f563f9
@ -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">
|
||||
|
Loading…
x
Reference in New Issue
Block a user