trwnh.com/unified.test.hugo/layouts/partials/mf2/h-card.html
2024-10-16 02:34:56 -05:00

32 lines
No EOL
707 B
HTML

{{ $name := .name }}
{{- $url := .url }}
{{- $icon := .icon }}
<span class="author-card h-card vcard">
{{- if $url }}
<a class="author-card__link u-url url" href="{{$url}}">
{{- with $icon }}
<img class="author-card__avatar u-photo u-logo photo logo"
src="{{.}}"
alt=""
width="48"
height="48"
aria-hidden="true"
/>
{{- end }}
{{- with $name }}
<span class="author-card__name p-name fn">{{.}}</span>
{{- end }}
</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 }}
</span>