1
0
Fork 0
mirror of https://git.sr.ht/~seirdy/seirdy.one synced 2024-11-14 09:42:09 +00:00
seirdy.one/layouts/shortcodes/indieweb-person.html

18 lines
1.2 KiB
HTML
Raw Normal View History

<span itemscope itemtype="https://schema.org/Person" class="h-card vcard">
<a itemprop="url" href="{{- .Get "url" -}}" class="u-url url">
<span itemprop="name" class="p-name fn n">
{{- if (.Get "first-name") -}}<span itemprop="givenName" class="p-given-name given-name">{{- .Get "first-name" -}}</span>{{- end }}
{{ if (.Get "last-name") -}}<span itemprop="familyName" class="p-family-name family-name">{{- .Get "last-name" -}}{{- end -}}
{{- if (.Get "nickname") -}}<span itemprop="nickname" class="p-nickname nickname">{{- .Get "nickname" -}}</span>{{- end -}}
{{- if (.Get "name") -}}{{- .Get "name" -}}{{- end -}}
</span>{{- /* Strip trailing newline: https://github.com/gohugoio/hugo/issues/1753 */ -}}
</a>{{- /* Strip trailing newline: https://github.com/gohugoio/hugo/issues/1753 */ -}}
{{- if (.Get "org") }}
from <span class="p-org org" itemprop="affiliation" itemscope itemtype="https://schema.org/Organization">
<a itemprop="url" class="organization-name" href="{{- .Get "org-url" -}}">
<span itemprop="name">{{- .Get "org" -}}</span>{{- /* Strip trailing newline: https://github.com/gohugoio/hugo/issues/1753 */ -}}
</a>
</span>
{{- end -}}
</span>{{- /* Strip trailing newline: https://github.com/gohugoio/hugo/issues/1753 */ -}}