From 502534131b48fffd1cc821c5a60437e42d23955b Mon Sep 17 00:00:00 2001 From: mst Date: Mon, 16 Dec 2024 16:52:27 +0300 Subject: [PATCH] use new `render_markdown()` function in question card, simplify template --- templates/snippets/layout/question_card.html | 30 +++++++++----------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/templates/snippets/layout/question_card.html b/templates/snippets/layout/question_card.html index 5232fc5..dcc4176 100644 --- a/templates/snippets/layout/question_card.html +++ b/templates/snippets/layout/question_card.html @@ -1,24 +1,22 @@ {% if multipleAnswers %} {% for answer in answers %}
-
-
-
-

- {% if question.from_who %} - {{ question.from_who | render_markdown }} - {% else %} - {{ cfg.anonName }} - {% endif %} -

-

{{ formatRelativeTime(str(question.creation_date)) }}

-
- {% with question=question %} - {% include 'snippets/q-card-text.html' %} - {% endwith %} +
+
+

+ {% if question.from_who %} + {{ render_markdown(question.from_who, fromWho=True) }} + {% else %} + {{ cfg.anonName }} + {% endif %} +

+

{{ formatRelativeTime(str(question.creation_date)) }}

+ {% with question=question %} + {% include 'snippets/q-card-text.html' %} + {% endwith %}
-
+
{% if answer.cw %}
{{ answer.cw | render_markdown }}