forked from drowl87/hextra_mirror
chore: add rel="me" attribute to Mastodon navbar icon (#243)
* Add rel="me" attribute to Mastodon navbar icon The rel="me" attribute enables verified links on the linked Mastodon profile * Set $rel based on icon name
This commit is contained in:
parent
10f1d85ab4
commit
f5e4283961
@ -42,7 +42,8 @@
|
||||
|
||||
{{/* Display icon menu item */}}
|
||||
{{- if .Params.icon -}}
|
||||
<a class="p-2 text-current" {{ if $external }}target="_blank" rel="noreferer"{{ end }} href="{{ $link }}" title="{{ or (T .Identifier) .Name | safeHTML }}">
|
||||
{{- $rel := cond (eq .Params.icon "mastodon") "noreferer me" "noreferer" }}
|
||||
<a class="p-2 text-current" {{ if $external }}target="_blank" rel="{{ $rel }}"{{ end }} href="{{ $link }}" title="{{ or (T .Identifier) .Name | safeHTML }}">
|
||||
{{- partial "utils/icon.html" (dict "name" .Params.icon "attributes" "height=24") -}}
|
||||
<span class="sr-only">{{ or (T .Identifier) .Name | safeHTML }}</span>
|
||||
</a>
|
||||
|
Loading…
x
Reference in New Issue
Block a user