aboutsummaryrefslogtreecommitdiff
path: root/themes/XMin/layouts/partials
diff options
context:
space:
mode:
authorMartin Ashby <martin@ashbysoft.com>2022-12-30 00:45:57 +0000
committerMartin Ashby <martin@ashbysoft.com>2022-12-30 00:45:57 +0000
commit671f850c4fb72941c111edb6dff1030839b0dd55 (patch)
treee2e066891c85aba3eff5bb76c8e0d81a658a2cb9 /themes/XMin/layouts/partials
parent9be5acc275711d0a6a717ac5564a86185ec1d613 (diff)
downloadmfashby.net-671f850c4fb72941c111edb6dff1030839b0dd55.tar.gz
mfashby.net-671f850c4fb72941c111edb6dff1030839b0dd55.tar.bz2
mfashby.net-671f850c4fb72941c111edb6dff1030839b0dd55.tar.xz
mfashby.net-671f850c4fb72941c111edb6dff1030839b0dd55.zip
Comments are basically functional.
Added example config.
Diffstat (limited to 'themes/XMin/layouts/partials')
-rw-r--r--themes/XMin/layouts/partials/foot_custom.html21
1 files changed, 21 insertions, 0 deletions
diff --git a/themes/XMin/layouts/partials/foot_custom.html b/themes/XMin/layouts/partials/foot_custom.html
index 73b86a3..754b722 100644
--- a/themes/XMin/layouts/partials/foot_custom.html
+++ b/themes/XMin/layouts/partials/foot_custom.html
@@ -11,3 +11,24 @@
<title>RSS</title>
<path d="M4 11a9 9 0 0 1 9 9"></path><path d="M4 4a16 16 0 0 1 16 16"></path><circle cx="5" cy="19" r="1"></circle></svg>
</a>
+
+<h2>comments</h2>
+<div style="visibility: hidden" id="comments">comments go here</div>
+<div style="visibility: hidden" id="comment_form">comment form goes here</div>
+<script>
+ let comments = document.getElementById("comments");
+ fetch(document.location.origin + "/api/comment?url=" + document.location.href)
+ .then((response) => response.text())
+ .then((data) => {
+ comments.innerHTML = data;
+ comments.style.visibility = "visible";
+ });
+ let form = document.getElementById("comment_form");
+ fetch(document.location.origin + "/api/form?url=" + document.location.href)
+ .then((response) => response.text())
+ .then((data) => {
+ form.innerHTML = data;
+ form.style.visibility = "visible";
+ });
+</script>
+<noscript>Comments disabled without javascript!</noscript>