aboutsummaryrefslogtreecommitdiff
path: root/gn2/wqflask/templates/gnqa_answer.html
diff options
context:
space:
mode:
authorJohn Nduli2024-09-12 16:59:52 +0300
committerBonfaceKilz2024-09-12 18:34:56 +0300
commit63de4403b6e2186c5758443ec9163fc57b8a012f (patch)
tree72da495194787479582492470b7801e70d3bf97b /gn2/wqflask/templates/gnqa_answer.html
parentc71f464c783ca49587a21a52054cb7237b7deb0c (diff)
downloadgenenetwork2-63de4403b6e2186c5758443ec9163fc57b8a012f.tar.gz
fix: stop extending gnqa_answer.html
gnqa_answer.html is used by htmx to return a post result. I revert my change and include this in `gnqa.html` instead, to load results from a GET request.
Diffstat (limited to 'gn2/wqflask/templates/gnqa_answer.html')
-rw-r--r--gn2/wqflask/templates/gnqa_answer.html22
1 files changed, 5 insertions, 17 deletions
diff --git a/gn2/wqflask/templates/gnqa_answer.html b/gn2/wqflask/templates/gnqa_answer.html
index e2e39956..2e182375 100644
--- a/gn2/wqflask/templates/gnqa_answer.html
+++ b/gn2/wqflask/templates/gnqa_answer.html
@@ -1,15 +1,3 @@
-{% extends "base.html" %}
-
-{% block css %}
-<style>
-.linux-libertine-font{
- font-family: 'Linux Libertine','Georgia','Times','Source Serif Pro', 'serif'
-}
-</style>
-{% endblock %}
-
-{% block content %}
-<br/>
<section class="container-fluid answers gnqa-copy">
<div class="row container gnqa-answer" style="margin-bottom: 1em">
<p class="row lead">
@@ -155,9 +143,9 @@
</div>
</div>
</section>
-{% endblock %}
-{% block js %}
- <script>
+
+<script>
+$(document).ready(function() {
function updateRatingHandler(target, responseObj, args){
let {status, response} = responseObj.xhr
if (status == 200 && args == "upvote"){
@@ -189,5 +177,5 @@ htmx.on("#upvote", "click", function(evt){
handler: (target, obj)=> updateRatingHandler(target,obj, "downvote"),
swap:"innerHTML",
values: {'query': query, 'answer': answer}})});
- </script>
-{% endblock %}
+})
+</script>