Skip to content
Snippets Groups Projects
Unverified Commit a6874e4a authored by Olivia Simonet's avatar Olivia Simonet Committed by GitHub
Browse files

Ajouter la détection des liens externes aux boutons du hero (#633)

parent b506f521
No related branches found
No related tags found
No related merge requests found
......@@ -47,7 +47,10 @@
{{ with $button }}
{{ if and .display .target .label }}
<a href="{{ .target }}" class="btn">{{ .label }}</a>
{{ $title := .label }}
{{ $isExternal := .external | default false }}
{{ $link_title := cond $isExternal (safeHTML (i18n "commons.link.blank_aria" (dict "Title" $title))) $title}}
<a href="{{ .target }}" title ="{{ $link_title }}" class="btn" {{ if $isExternal -}} target="_blank" rel="noopener" {{- end }}>{{ .label }}</a>
{{ end }}
{{ end }}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment