Browse Source

quick test of cactus comments

master
jk 3 years ago
parent
commit
da28fba016
  1. 7
      themes/nipponalba/layouts/_default/single.html
  2. 2
      themes/nipponalba/layouts/partials/head.html

7
themes/nipponalba/layouts/_default/single.html

@ -59,7 +59,7 @@
{{ if isset $mention_ids 0}} {{ if isset $mention_ids 0}}
{{ $mentions := apply $mention_ids "index" $.Site.Data.mentions "." }} {{ $mentions := apply $mention_ids "index" $.Site.Data.mentions "." }}
{{ $mentions := sort $mentions "wm-received" }} {{ $mentions := sort $mentions "wm-received" }}
<section href="webmentions" id="webmentions">
<section id="webmentions">
<section class="like interaction"><h4>Likes</h4>{{ range $mentions }}{{ if eq (index . "wm-property") "like-of" }} <section class="like interaction"><h4>Likes</h4>{{ range $mentions }}{{ if eq (index . "wm-property") "like-of" }}
<a href="{{ .author.url }}"><img class="remote_profile" src="{{ .author.photo }}" title="{{ .author.name }}" alt="{{ .author.name }}" /></a>{{ end}} <a href="{{ .author.url }}"><img class="remote_profile" src="{{ .author.photo }}" title="{{ .author.name }}" alt="{{ .author.name }}" /></a>{{ end}}
{{ end }}</section> {{ end }}</section>
@ -68,11 +68,8 @@
{{ end }}</section> {{ end }}</section>
<h4>Comments & Replies</h4>{{ partial "webmention.html" $mentions }} <h4>Comments & Replies</h4>{{ partial "webmention.html" $mentions }}
</section>{{ end }}</section> </section>{{ end }}</section>
<section id="comments_frame"><script type="text/javascript" src="https://latest.cactus.chat/cactus.js"></script>
<link rel="stylesheet" href="https://latest.cactus.chat/style.css" type="text/css">
<section id="comments_frame">
<div id="comment-section"></div> <div id="comment-section"></div>
<script> <script>
initComments({ initComments({
node: document.getElementById("comment-section"), node: document.getElementById("comment-section"),

2
themes/nipponalba/layouts/partials/head.html

@ -8,6 +8,8 @@
<link rel="preload" as="font" href="/fonts/Inter-Regular.woff2" type="font/woff2" crossorigin="anonymous" /> <link rel="preload" as="font" href="/fonts/Inter-Regular.woff2" type="font/woff2" crossorigin="anonymous" />
<link rel="preload" as="font" href="/fonts/Inter-Regular.woff" type="font/woff" crossorigin="anonymous" /> <link rel="preload" as="font" href="/fonts/Inter-Regular.woff" type="font/woff" crossorigin="anonymous" />
<base href="{{ .Site.BaseURL }}"> <base href="{{ .Site.BaseURL }}">
<script type="text/javascript" src="https://latest.cactus.chat/cactus.js"></script>
<link rel="stylesheet" href="https://latest.cactus.chat/style.css" type="text/css">
<!-- indieweb stuff --> <!-- indieweb stuff -->
<link rel="me" href="https://social.nipponalba.scot/users/jk" /> <link rel="me" href="https://social.nipponalba.scot/users/jk" />
<link rel="me" href="http://px.nipponalba.scot/jk" /> <link rel="me" href="http://px.nipponalba.scot/jk" />