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/partials/reply-context.html
Rohan Kumar c3ae952081
Improvements to citations
- Put reply-context in a paragraph
- Allow an itemid for mention-work
2022-08-01 20:55:33 -07:00

25 lines
952 B
HTML

{{- $schemaType := "SocialMediaPosting" -}}
{{- with .replyType -}}
{{- $schemaType = . -}}
{{- end -}}
{{- $replyAuthorType := "Person" -}}
{{- with .replyAuthorType -}}
{{- $replyAuthorType = . -}}
{{- end -}}
{{- $replyAuthorRel := "author" -}}
{{- if eq $replyAuthorType "Organization" -}}
{{- $replyAuthorRel = "publisher" -}}
{{- end -}}
<aside role="note">
<p>
Reply to <span class="h-cite in-reply-to" itemprop="about" itemscope="" itemtype="https://schema.org/{{ $schemaType }}">
<cite itemprop="name" class="p-name">
<a class="u-url" itemprop="url" href="{{ .replyURI }}">{{ .replyTitle | safeHTML}}</a>
</cite> by
<span itemprop="{{ $replyAuthorRel }}" itemscope="" itemtype="https://schema.org/{{ $replyAuthorType }}" class="h-card vcard p-author">
<a itemprop="url" href="{{ .replyAuthorURI }}" class="u-url url">
<span itemprop="name" class="p-name fn n">{{ .replyAuthor }}</span></a>
</span>
</span>
</p>
</aside>