trwnh.com/unified.test.hugo/layouts/partials/components/author-card.html

25 lines
534 B
HTML
Raw Normal View History

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