Fix hcard

This commit is contained in:
Fundor333
2025-01-20 02:50:35 +01:00
parent 39089e962c
commit 5a1b30c268
2 changed files with 8 additions and 10 deletions

View File

@@ -1,16 +1,13 @@
<!-- Default h-card -->
<div class="h-card author">
<p>
<a class="u-url" href="{{ .Site.BaseURL }}"></a>
Created by {{ with .Site.Params.Hcard.Avatar }}<img class="u-photo author-avatar" alt="" src="{{ . | absURL }}"> {{ end }}<span class="p-name" rel="me">{{ .Site.Params.Hcard.FullName }}</span>
<a class="u-url u-uid" href="{{ .Site.BaseURL }}"></a>
Created by {{ with .Site.Params.Hcard.Avatar }}<img class="u-photo author-avatar" style="display: none;" alt="" src="{{ . | absURL }}"> {{ end }}<span class="p-name" rel="me">{{ .Site.Params.Hcard.FullName }}</span>
{{- with .Site.Params.Hcard.Pronouns -}}
{{- $len_pronouns := (len .) }}
({{ range $index, $element := . }}<span class="u-pronoun">{{ $element }}</span>
{{- if eq (add $index 1) $len_pronouns -}}
{{- else -}}
/
{{- end -}}
{{- end }} pronouns
(
<span class="p-pronoun-nominative">{{.nominative}}</span>/<span class="p-pronoun-oblique">{{.oblique}}</span>/<span class="p-pronoun-possessive">{{.possessive}}</span></a> pronouns
{{- end -}}
{{- if isset .Site.Params.Hcard "nickname" -}}
{{- with .Site.Params.Hcard.Pronouns }}, {{ else }}({{ end -}}