diff options
Diffstat (limited to 'themes/XMin/layouts/partials/foot_custom.html')
-rw-r--r-- | themes/XMin/layouts/partials/foot_custom.html | 21 |
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> |