mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-11-23 21:02:09 +00:00
Handle "like" webmentions properly
Display a "like" webmention in the format "<Name> liked this" instead of using the standard pingback format.
This commit is contained in:
parent
8a527895a3
commit
552b8c9417
1 changed files with 33 additions and 29 deletions
|
@ -14,9 +14,9 @@
|
|||
<section class="e-content" itemprop="articlebody">
|
||||
{{ partial "processed-content" . -}}
|
||||
</section>
|
||||
</article>
|
||||
<hr>
|
||||
<footer class="comment">
|
||||
</article>
|
||||
<hr>
|
||||
<footer class="comment">
|
||||
{{ with .OutputFormats.Get "gemtext" -}}
|
||||
<p>
|
||||
View this article on <a rel="syndication" class="u-syndication" href="{{replace .Permalink "/gemini" "" 1 | safeURL}}">my Gemini capsule</a>
|
||||
|
@ -35,13 +35,17 @@
|
|||
<li>
|
||||
<time datetime="{{ dateFormat "2006-01-02 15:04:05Z07:00" $webmention.created_at }}">{{ dateFormat "2006-01-02" $webmention.created_at }}</time>
|
||||
<br>
|
||||
{{ if (eq $webmention.type "like") -}}
|
||||
<a href="{{ $webmention.source }}" rel="nofollow">{{ $webmention.author_name }}</a> liked this
|
||||
{{else -}}
|
||||
<a href="{{ $webmention.source }}" rel="nofollow">{{ $webmention.title }}</a>
|
||||
{{- end }}
|
||||
</li>
|
||||
{{ else -}}
|
||||
<li><p>This post doesn't have any approved Webmentions yet.</p></li>
|
||||
{{ end -}}
|
||||
{{- end }}
|
||||
</ul>
|
||||
</section>
|
||||
</footer>
|
||||
</footer>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
|
Loading…
Reference in a new issue