From af5c67f22fde2753ca56df57a5c2484ad2ec4f40 Mon Sep 17 00:00:00 2001 From: Yarmo Mackenbach Date: Thu, 25 Jun 2020 10:29:11 +0200 Subject: [PATCH] Improve comment mixin --- views/post.pug | 6 +++++- views/reply.pug | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/views/post.pug b/views/post.pug index 0349b65..1a6426a 100644 --- a/views/post.pug +++ b/views/post.pug @@ -16,7 +16,11 @@ mixin webmention($item) else if ($item['type'] == "comment") .comment p.quote - | !{$item['title']} + if (array_key_exists('title', $item)) + strong !{$item['title']} + br + if (array_key_exists('content', $item)) + | !{$item['content']} p.sub a(href="{$item['source']}") Commented if (array_key_exists('author_name', $item)) diff --git a/views/reply.pug b/views/reply.pug index 5d11c93..1cbfa92 100644 --- a/views/reply.pug +++ b/views/reply.pug @@ -16,7 +16,11 @@ mixin webmention($item) else if ($item['type'] == "comment") .comment p.quote - | !{$item['title']} + if (array_key_exists('title', $item)) + strong !{$item['title']} + br + if (array_key_exists('content', $item)) + | !{$item['content']} p.sub a(href="{$item['source']}") Commented if (array_key_exists('author_name', $item))