Support comment webmentions
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
ee77a866a6
commit
c6616ae9df
@ -282,6 +282,18 @@ table.music th:nth-child(3) {
|
|||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-size: 90%;
|
font-size: 90%;
|
||||||
}
|
}
|
||||||
|
.comment {
|
||||||
|
padding: 12px;
|
||||||
|
margin: 32px 0 0;
|
||||||
|
background-color: var(--clr-bg-alt);
|
||||||
|
}
|
||||||
|
.comment .quote {
|
||||||
|
margin: 0 0 12px;
|
||||||
|
font-family: 'Lora', Georgia, Times, serif;
|
||||||
|
}
|
||||||
|
.comment .sub {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
.subsection {
|
.subsection {
|
||||||
margin: 64px 0 0;
|
margin: 64px 0 0;
|
||||||
border-top: 3px dashed rgba(0,0,0,0.5);
|
border-top: 3px dashed rgba(0,0,0,0.5);
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
extends layout
|
extends layout
|
||||||
|
|
||||||
mixin webmention($item)
|
mixin webmention($item)
|
||||||
|
if (!array_key_exists('type', $item))
|
||||||
p
|
p
|
||||||
if (array_key_exists('title', $item))
|
if (array_key_exists('title', $item))
|
||||||
a(href="{$item['source']}") !{$item['title']}
|
a(href="{$item['source']}") !{$item['title']}
|
||||||
@ -12,6 +13,18 @@ mixin webmention($item)
|
|||||||
| on !{$item['date']}
|
| on !{$item['date']}
|
||||||
if (array_key_exists('time', $item))
|
if (array_key_exists('time', $item))
|
||||||
| at !{$item['time']} UTC
|
| at !{$item['time']} UTC
|
||||||
|
else if ($item['type'] == "comment")
|
||||||
|
.comment
|
||||||
|
p.quote
|
||||||
|
| !{$item['title']}
|
||||||
|
p.sub
|
||||||
|
a(href="{$item['source']}") Commented
|
||||||
|
if (array_key_exists('author_name', $item))
|
||||||
|
| by !{$item['author_name']}
|
||||||
|
if (array_key_exists('date', $item))
|
||||||
|
| on !{$item['date']}
|
||||||
|
if (array_key_exists('time', $item))
|
||||||
|
| at !{$item['time']} UTC
|
||||||
|
|
||||||
mixin discussionLink($item)
|
mixin discussionLink($item)
|
||||||
p
|
p
|
||||||
|
|||||||
@ -1,5 +1,31 @@
|
|||||||
extends layout
|
extends layout
|
||||||
|
|
||||||
|
mixin webmention($item)
|
||||||
|
if (!array_key_exists('type', $item))
|
||||||
|
p
|
||||||
|
if (array_key_exists('title', $item))
|
||||||
|
a(href="{$item['source']}") !{$item['title']}
|
||||||
|
else
|
||||||
|
a(href="{$item['source']}") !{$item['source']}
|
||||||
|
if (array_key_exists('author_name', $item))
|
||||||
|
| by !{$item['author_name']}
|
||||||
|
if (array_key_exists('date', $item))
|
||||||
|
| on !{$item['date']}
|
||||||
|
if (array_key_exists('time', $item))
|
||||||
|
| at !{$item['time']} UTC
|
||||||
|
else if ($item['type'] == "comment")
|
||||||
|
.comment
|
||||||
|
p.quote
|
||||||
|
| !{$item['title']}
|
||||||
|
p.sub
|
||||||
|
a(href="{$item['source']}") Commented
|
||||||
|
if (array_key_exists('author_name', $item))
|
||||||
|
| by !{$item['author_name']}
|
||||||
|
if (array_key_exists('date', $item))
|
||||||
|
| on !{$item['date']}
|
||||||
|
if (array_key_exists('time', $item))
|
||||||
|
| at !{$item['time']} UTC
|
||||||
|
|
||||||
block content
|
block content
|
||||||
header
|
header
|
||||||
nav
|
nav
|
||||||
@ -21,3 +47,11 @@ block content
|
|||||||
| :
|
| :
|
||||||
br
|
br
|
||||||
| !{$reply['content']}
|
| !{$reply['content']}
|
||||||
|
|
||||||
|
.webmentions.subsection
|
||||||
|
h2 Webmentions
|
||||||
|
if ($reply['hasWebmentions'])
|
||||||
|
each $item in $reply["webmentions"]
|
||||||
|
+webmention($item)
|
||||||
|
else
|
||||||
|
p This post has not been mentioned yet.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user