1
0
Fork 0

Properly show replies

This commit is contained in:
Sebastian Schulze 2020-07-10 02:28:14 +02:00
parent fa06ef9892
commit 57315c0b5d
Signed by: bascht
GPG Key ID: 5BCB1D3B4D38A35A
1 changed files with 12 additions and 2 deletions

View File

@ -5,8 +5,9 @@
{{ $webmentions = $webmentions | append $webmentions_data }}
{{ end }}
{{ $likes := where $webmentions ".post.wm-property" "like-of"}}
{{ $mentions := where $webmentions ".post.wm-property" "mention-of"}}
{{ $likes := where $webmentions ".post.wm-property" "like-of" }}
{{ $mentions := where $webmentions ".post.wm-property" "mention-of" }}
{{ $replies := where $webmentions ".post.wm-property" "in-reply-to" }}
{{ if $likes }}
<h3>Reaktionen</h3>
@ -21,3 +22,12 @@
<a href="{{ $mention.post.author.url }}"><img style="width: 30px" src="{{ $mention.post.author.photo }}"></a> auf <a href="{{ $mention.post.url }}">{{ $mention.post.url }}</a>
{{ end }}
{{ end }}
{{ if $replies }}
<h3>Antworten</h3>
{{ range sort $replies "post.published" "asc" }}
<ul style="list-style-type:none">
<li><a href="{{ .post.author.url }}"><img style="width: 30px" src="{{ .post.author.photo }}"></a> {{ .post.content.text }}</li>
</ul>
{{ end }}
{{ end }}