brainbaking/themes/brainbaking-minimal/layouts/partials/single-webmentions.html

48 lines
1.4 KiB
HTML
Raw Normal View History

2021-03-12 18:48:49 +01:00
{{ if (not .Params.disableComments) }}
2021-03-09 11:55:58 +01:00
2021-03-12 18:48:49 +01:00
{{ $mentions := (where .Site.Data.webmentions "target" "==" $.RelPermalink) }}
2021-03-09 11:55:58 +01:00
2021-03-12 18:48:49 +01:00
{{ if $mentions }}
<h4 class="page-header">
<svg class='icon icon-text' width='24' height='24'>
<title>Discussion</title>
<use xlink:href='#discuss'></use>
</svg>
Mentions and Replies
</h4>
2021-03-09 11:55:58 +01:00
2021-03-12 18:48:49 +01:00
<div class="tootlist" style="margin-bottom: -3rem">
{{ range $mentions }}
<article class="u-comment h-cite toot">
<p class="p-content p-name">
{{ .content | safeHTML }}
</p>
<div class="meta">
<svg class='icon icon-text' width='24' height='24'>
<use xlink:href='#cal1'></use>
</svg>
<time class="dt-published" datetime="{{ .published }}">
{{ .published }}
</time>
&nbsp;|&nbsp;by&nbsp;
<a rel="author" class="u-author h-card u-url" href="{{ .source }}">
{{ $name := .author.name | safeHTML }}
{{ if isset .author "picture" }}
<div class="avatar">
<img class="u-photo" src="{{ .author.picture | safeHTML }}" alt="{{ $name }}" />
</div>
{{ else }}
<div class="avatar">
<img class="u-photo" src="/img/avatar-anonymous.jpg" alt="{{ $name }}" />
</div>
{{ end }}
{{ $name }}
</a>
</div>
</article>
{{ end }}
</div>
<br/>
2021-03-09 11:55:58 +01:00
{{ end }}
{{ end }}