no longer ignore likes, make something up if content is empty

This commit is contained in:
Wouter Groeneveld 2022-04-27 17:33:41 +02:00
parent e720fb9391
commit 460d58dab4
1 changed files with 7 additions and 3 deletions

View File

@ -1,4 +1,4 @@
{{ $mentions := (where (where (where .Site.Data.webmentions "relativeTarget" "==" $.RelPermalink) "content" "!=" "") "type" "!=" "like") }}
{{ $mentions := (where .Site.Data.webmentions "relativeTarget" "==" $.RelPermalink) }}
{{ if $mentions }}
<h4 class="page-header" id="mentions">
@ -13,9 +13,14 @@
<div class="tootlist" style="margin-bottom: -3rem">
{{ range $mentions }}
{{ $name := .author.name | safeHTML }}
<article class="u-comment h-cite toot">
<p class="p-content p-name">
{{ .content | safeHTML }}
{{ if .content }}
{{ .content | safeHTML }}
{{ else }}
{{ $name }} liked this post.
{{ end }}
</p>
<div class="meta">
<svg class='icon icon-text' width='24' height='24'>
@ -27,7 +32,6 @@
</time>
&nbsp;|&nbsp;by&nbsp;
<a rel="author" class="u-author h-card u-url permalink" href="{{ .source }}">
{{ $name := .author.name | safeHTML }}
{{ if isset .author "picture" }}
<div class="avatar">
<img class="u-photo" loading="lazy" src="https://jam.brainbaking.com{{ .author.picture | safeHTML }}" alt="{{ $name }}" />