aboutsummaryrefslogtreecommitdiffstats
path: root/edaweb/templates
diff options
context:
space:
mode:
authorjwansek <eddie.atten.ea29@gmail.com>2026-03-24 18:33:56 +0000
committerjwansek <eddie.atten.ea29@gmail.com>2026-03-24 18:33:56 +0000
commit4303ff93359c42e61cb7362932a4433d4d51cf1b (patch)
treec82b6dd3240f28158da924e0c7c8ea5d5bcb0262 /edaweb/templates
parentd0d10ab1c7179ab15a440f711909765140436851 (diff)
downloadboymoder.blog-4303ff93359c42e61cb7362932a4433d4d51cf1b.tar.gz
boymoder.blog-4303ff93359c42e61cb7362932a4433d4d51cf1b.zip
Added page for each question
Diffstat (limited to 'edaweb/templates')
-rw-r--r--edaweb/templates/question.html.j222
-rw-r--r--edaweb/templates/questions.html.j26
2 files changed, 23 insertions, 5 deletions
diff --git a/edaweb/templates/question.html.j2 b/edaweb/templates/question.html.j2
new file mode 100644
index 0000000..a9c7a0c
--- /dev/null
+++ b/edaweb/templates/question.html.j2
@@ -0,0 +1,22 @@
+{% extends "template.html.j2" %}
+{% block content %}
+ <aside>
+ {% if qna["previous"] != None %}
+ <a href="/question?id={{ qna['previous'] }}">← Previous</a>
+ {% endif %}
+ {% if qna["next"] != None %}
+ <a href="/question?id={{ qna['next'] }}">→ Next</a>
+ {% endif %}
+ <br>
+ <a href="/questions#{{ qna['qna'][0] }}">All questions</a>
+ </aside>
+
+ <h4><a href="{{ qnas_link }}">ask a question!</a></h4>
+ <dl>
+ <dt class="qnaheader">ID:</dt><dd>{{ qna["qna"][0] }}</dd>
+ <dt class="qnaheader">Question source:</dt><dd>{{ qna["qna"][-1] }}</dd>
+ <dt class="qnaheader">Answered at:</dt><dd>{{ qna["qna"][2] }}</dd>
+ <dt class="qnaheader">Question:</dt><dd>{{ qna["qna"][3] }}</dd>
+ <dt class="qnaheader">Answer:</dt><dd>{{ qna["qna"][4] }}</dd>
+ </dl>
+{% endblock %} \ No newline at end of file
diff --git a/edaweb/templates/questions.html.j2 b/edaweb/templates/questions.html.j2
index eb58380..a800941 100644
--- a/edaweb/templates/questions.html.j2
+++ b/edaweb/templates/questions.html.j2
@@ -3,11 +3,7 @@
<h4><a href="{{ qnas_link }}">ask a question!</a></h4>
<dl>
{% for id_, link, dt, question, answer, host in qnas %}
- {% if host == "curiouscat" %}
- <dt class="qnaheader"><a href="{{ link }}">{{ dt.isoformat() }}</a> - {{ host }}</dt>
- {% else %}
- <dt class="qnaheader">{{ dt.isoformat() }} - {{ host }}</dt>
- {% endif %}
+ <dt class="qnaheader" id="{{ id_ }}"><a href="question?id={{ id_ }}">{{ dt.isoformat() }}</a> - {{ host }}</dt>
<dd>
<dt class="question"><p>{{ question }}</p></dt>
<dd class="answer"><p>{{ answer }}</p></dd>