diff options
author | Martin Ashby <martin@ashbysoft.com> | 2022-12-30 00:45:57 +0000 |
---|---|---|
committer | Martin Ashby <martin@ashbysoft.com> | 2022-12-30 00:45:57 +0000 |
commit | 671f850c4fb72941c111edb6dff1030839b0dd55 (patch) | |
tree | e2e066891c85aba3eff5bb76c8e0d81a658a2cb9 /themes | |
parent | 9be5acc275711d0a6a717ac5564a86185ec1d613 (diff) | |
download | mfashby.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')
-rw-r--r-- | themes/XMin/layouts/partials/foot_custom.html | 21 | ||||
-rw-r--r-- | themes/XMin/static/css/style.css | 12 |
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 +} |