summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--layouts/_partials/posts/webmention-mentions.html13
1 files changed, 9 insertions, 4 deletions
diff --git a/layouts/_partials/posts/webmention-mentions.html b/layouts/_partials/posts/webmention-mentions.html
index 8019fe6e..2af5f79d 100644
--- a/layouts/_partials/posts/webmention-mentions.html
+++ b/layouts/_partials/posts/webmention-mentions.html
@@ -4,13 +4,18 @@
{{ range . }}
{{ if index . "microformats" }}
{{ $mf := index . "microformats" "properties" }}
- {{ $author := index (index (index $mf "author") 0) "properties" }}
+ {{ $author := (index (index ($mf.author) 0) "properties") }}
+ {{ if eq (index .microformats.type 0) "h-card" }}
+ {{ $author = $mf }}
+ {{ end }}
{{ $photo := or (index . "extra" "proxied-photo")
(index $author.photo 0) }}
- <li class="flex gap-2"><img src="{{ $photo }}" class="h-5 w-5 rd-full w-auto inline m-0">
+ <li class="flex gap-2">
+ <img src="{{ $photo }}" class="h-5 w-5 rd-full w-auto inline m-0">
<a href="{{ index $author.url 0 }}">{{ index $author.name 0 }}</a>
- <a href="{{ .webmention.source }}">{{ T "webmention.mentionedThisPost" . }}</a></li>
- {{ else }}
+ <a href="{{ .webmention.source }}">{{ T "webmention.mentionedThisPost" . }}</a>
+ </li>
+ {{ else }}
<li><a href="{{ .webmention.source }}" target="_blank">{{ .webmention.source }}</a></li>
{{ end }}
{{ end }}