aboutsummaryrefslogtreecommitdiff
path: root/themes
diff options
context:
space:
mode:
Diffstat (limited to 'themes')
-rw-r--r--themes/XMin/layouts/partials/foot_custom.html21
-rw-r--r--themes/XMin/static/css/style.css12
2 files changed, 33 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>
diff --git a/themes/XMin/static/css/style.css b/themes/XMin/static/css/style.css
index 48b563e..6288f17 100644
--- a/themes/XMin/static/css/style.css
+++ b/themes/XMin/static/css/style.css
@@ -49,3 +49,15 @@ table {
table thead th { border-bottom: 1px solid #ddd; }
th, td { padding: 5px; }
thead, tfoot, tr:nth-child(even) { background: #eee; }
+
+ul.comments {
+ list-style: square inside
+ margin: 0;
+ padding: 0;
+}
+span.comment.author {
+ font-weight: bold
+}
+span.comment.timestamp {
+ color: grey
+}