mirror of
https://codeberg.org/catask-org/catask.git
synced 2025-04-20 05:43:41 -05:00
use new render_markdown()
function in question card, simplify template
This commit is contained in:
parent
92e4fa9e82
commit
502534131b
1 changed files with 14 additions and 16 deletions
|
@ -1,12 +1,11 @@
|
||||||
{% if multipleAnswers %}
|
{% if multipleAnswers %}
|
||||||
{% for answer in answers %}
|
{% for answer in answers %}
|
||||||
<div class="card mt-3 mb-3{% if question.pinned %} border-2{% endif %}" id="question-{{ question.id }}">
|
<div class="card mt-3 mb-3{% if question.pinned %} border-2{% endif %}" id="question-{{ question.id }}">
|
||||||
<div class="position-relative">
|
|
||||||
<div class="card-header{% if question.pinned %} border-2{% endif %}">
|
<div class="card-header{% if question.pinned %} border-2{% endif %}">
|
||||||
<div class="d-flex justify-content-between align-items-center flex-wrap text-break">
|
<div class="d-flex justify-content-between align-items-center flex-wrap text-break">
|
||||||
<h3 class="h5 card-title my-1 markdown-content">
|
<h3 class="h5 card-title my-1 markdown-content w-75">
|
||||||
{% if question.from_who %}
|
{% if question.from_who %}
|
||||||
{{ question.from_who | render_markdown }}
|
{{ render_markdown(question.from_who, fromWho=True) }}
|
||||||
{% else %}
|
{% else %}
|
||||||
<i class="bi bi-incognito" data-bs-toggle="tooltip" data-bs-title="This question was asked anonymously" data-bs-placement="top"></i> {{ cfg.anonName }}
|
<i class="bi bi-incognito" data-bs-toggle="tooltip" data-bs-title="This question was asked anonymously" data-bs-placement="top"></i> {{ cfg.anonName }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -17,8 +16,7 @@
|
||||||
{% include 'snippets/q-card-text.html' %}
|
{% include 'snippets/q-card-text.html' %}
|
||||||
{% endwith %}
|
{% endwith %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="card-body markdown-content" id="a-{{ question.id }}-content">
|
||||||
<div class="card-body">
|
|
||||||
{% if answer.cw %}
|
{% if answer.cw %}
|
||||||
<div class="text-center mb-2 fw-bold cw-text markdown-content">{{ answer.cw | render_markdown }}</div>
|
<div class="text-center mb-2 fw-bold cw-text markdown-content">{{ answer.cw | render_markdown }}</div>
|
||||||
<div class="collapse question-cw markdown-content" id="answer-cw-{{ answer.id }}">
|
<div class="collapse question-cw markdown-content" id="answer-cw-{{ answer.id }}">
|
||||||
|
|
Loading…
Add table
Reference in a new issue