[feature] add microformat support

Related: #2959
Signed-off-by: Luca Matei Pintilie <luca@lucamatei.com>
This commit is contained in:
Luca Matei Pintilie 2025-02-28 21:44:09 +01:00
commit ba72cceec8
No known key found for this signature in database
GPG key ID: F25C376E6E6BA508
5 changed files with 25 additions and 20 deletions

View file

@ -18,18 +18,20 @@
*/ -}}
{{- with .Account }}
<address>
<address class="p-author h-card">
{{- if $.Local }}
<a
href="{{- .URL -}}"
rel="author"
title="Open profile"
class="u-url u-uid"
>
{{- else }}
<a
href="{{- .URL -}}"
rel="author nofollow noreferrer noopener" target="_blank"
title="Open remote profile (opens in a new window)"
class="u-url u-uid"
>
{{- end }}
<picture
@ -47,10 +49,11 @@
src="{{- .Avatar -}}"
alt="Avatar for {{ .Username -}}"
title="Avatar for {{ .Username -}}"
class="u-photo"
>
</picture>
<div class="author-strap">
<span class="displayname text-cutoff">
<span class="displayname text-cutoff p-name">
{{- if .DisplayName -}}
{{- emojify .Emojis (escape .DisplayName) -}}
{{- else -}}
@ -58,7 +61,7 @@
{{- end -}}
</span>
<span class="sr-only">,</span>
<span class="username text-cutoff">@{{- .Acct -}}</span>
<span class="username text-cutoff p-nickname">@{{- .Acct -}}</span>
</div>
<span class="sr-only">(open profile)</span>
</a>