trwnh.com/unified.test.hugo/layouts/partials/mf2/h-card.html

30 lines
678 B
HTML
Raw Normal View History

{{ $name := .name }}
{{- $url := .url }}
{{- $icon := .icon }}
2024-10-12 18:45:14 +00:00
<span class="author-card h-card vcard">
{{- if $url }}
<a class="author-card__link u-url url" href="{{$url}}">
{{- with $icon }}
2024-10-12 18:45:14 +00:00
<img class="author-card__avatar u-photo u-logo photo logo"
src="{{.}}"
2024-10-12 18:45:14 +00:00
alt=""
aria-hidden="true"
2024-10-05 06:27:07 +00:00
/>
{{- end }}
{{- with $name }}
<span class="author-card__name p-name fn">{{.}}</span>
{{- end }}
2024-10-05 06:27:07 +00:00
</a>
{{- else }}
{{- with $icon }}
<img class="author-card__avatar u-photo u-logo photo logo"
src="{{.}}"
alt=""
aria-hidden="true"
/>
{{- end }}
{{- with $name }}
<span class="author-card__name p-name fn">{{.}}</span>
{{- end }}
{{- end }}
2024-10-05 06:27:07 +00:00
</span>