2022-05-11 18:31:42 +02:00
|
|
|
{{ $mentions := (where (where (where .Site.Data.webmentions "relativeTarget" "==" $.RelPermalink) "content" "!=" "") "type" "!=" "like") }}
|
2022-04-29 14:16:57 +02:00
|
|
|
{{ $wmServer := .Site.Params.webmentionServer }}
|
2021-03-09 11:55:58 +01:00
|
|
|
|
2021-06-21 14:10:15 +02:00
|
|
|
{{ if $mentions }}
|
2022-11-12 21:29:17 +01:00
|
|
|
<h3 class="page-header" id="mentions">
|
2021-06-21 14:10:15 +02:00
|
|
|
<a href="#mentions">
|
|
|
|
<svg class='icon icon-text' width='24' height='24'>
|
|
|
|
<title>Discussion</title>
|
|
|
|
<use xlink:href='#discuss'></use>
|
|
|
|
</svg>
|
|
|
|
</a>
|
|
|
|
Mentions and Replies
|
2022-11-12 21:29:17 +01:00
|
|
|
</h3>
|
2021-03-09 11:55:58 +01:00
|
|
|
|
2022-11-13 15:21:40 +01:00
|
|
|
<small>
|
2021-06-21 14:10:15 +02:00
|
|
|
<div class="tootlist" style="margin-bottom: -3rem">
|
2022-11-13 15:21:40 +01:00
|
|
|
{{ $i := 0 }}
|
|
|
|
{{ $done := 0 }}
|
2021-06-21 14:10:15 +02:00
|
|
|
{{ range $mentions }}
|
2022-11-13 15:21:40 +01:00
|
|
|
{{ $i = add $i 1 }}
|
|
|
|
{{ if and (gt $i 5) (eq $done 0) }}
|
|
|
|
{{ $done = 1 }}
|
|
|
|
<a href="#morementions"><button>Show {{ add (sub (len $mentions) $i) 1 }} more...</button></a>
|
|
|
|
<div id="morementions">
|
|
|
|
{{ end }}
|
|
|
|
|
2021-06-21 14:10:15 +02:00
|
|
|
<article class="u-comment h-cite toot">
|
2022-11-13 15:21:40 +01:00
|
|
|
{{ $name := .author.name | safeHTML }}
|
2021-06-21 14:10:15 +02:00
|
|
|
<p class="p-content p-name">
|
2022-04-27 17:33:41 +02:00
|
|
|
{{ if .content }}
|
|
|
|
{{ .content | safeHTML }}
|
|
|
|
{{ else }}
|
|
|
|
{{ $name }} liked this post.
|
|
|
|
{{ end }}
|
2021-06-21 14:10:15 +02:00
|
|
|
</p>
|
|
|
|
<div class="meta">
|
2022-11-13 15:21:40 +01:00
|
|
|
<svg class='icon icon-small'>
|
2021-06-21 14:10:15 +02:00
|
|
|
<use xlink:href='#cal1'></use>
|
|
|
|
</svg>
|
|
|
|
<time class="dt-published" datetime="{{ .published }}">
|
|
|
|
{{- $publishedAsDate := .published | time -}}
|
|
|
|
{{ partial "reldate" $publishedAsDate }}
|
|
|
|
</time>
|
|
|
|
| by
|
|
|
|
<a rel="author" class="u-author h-card u-url permalink" href="{{ .source }}">
|
|
|
|
{{ $name }}
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</article>
|
2021-03-09 11:55:58 +01:00
|
|
|
{{ end }}
|
2022-11-13 15:21:40 +01:00
|
|
|
{{ if gt $i 5 }}
|
|
|
|
<a href="#mentions"><button>Collapse mentions</button></a>
|
|
|
|
</div>
|
|
|
|
{{ end }}
|
2021-06-21 14:10:15 +02:00
|
|
|
</div>
|
2022-11-13 15:21:40 +01:00
|
|
|
</small>
|
2021-06-21 14:10:15 +02:00
|
|
|
<br/>
|
2021-03-09 11:55:58 +01:00
|
|
|
{{ end }}
|
2021-06-21 14:10:15 +02:00
|
|
|
|