move answers
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Simple_Not 2024-01-29 02:08:44 +10:00
parent 1f58b37b96
commit 33c609645c

View File

@ -51,6 +51,23 @@
</div>
<div class="col s12">
<!-- TODO !подгрузка следующего поста в конец треда без перезагрузки всего треда! -->
<div class="card-action left">
<!-- <a href="#" hx-post="/post_my_post/{{ posto._key }}" hx-target="#neu-posts" >Answer me!</a> -->
{% if posto.answers_list[0] | length > 0 %}
<p>Ответы:</p>
{% for ans in posto.answers_list[0] %}
{% if (posto.answers_list[1])[loop.index-1] > 0 %}
{% if (posto.answers_list[2])[loop.index-1] > 0 %}
<a href="#post-{{ (posto.answers_list[0])[loop.index-1] }}" class="collection-item" style="padding: 2px 2px;">>>{{ (posto.answers_list[0])[loop.index-1] }} (ответов {{ (posto.answers_list[1])[loop.index-1] }}, длина {{ (posto.answers_list[2])[loop.index-1] }})</a>,
{% else %}
<a href="#post-{{ (posto.answers_list[0])[loop.index-1] }}" class="collection-item" style="padding: 2px 2px;">>>{{ (posto.answers_list[0])[loop.index-1] }} (ответов {{ (posto.answers_list[1])[loop.index-1] }})</a>,
{% endif %}
{% else %}
<a href="#post-{{ (posto.answers_list[0])[loop.index-1] }}" class="collection-item" style="padding: 2px 2px;">>>{{ (posto.answers_list[0])[loop.index-1] }}</a>,
{% endif %}
{% endfor %}
{% endif %}
</div>
<div class="card-action right">
<!-- <a href="#" hx-post="/post_my_post/{{ posto._key }}" hx-target="#neu-posts" >Answer me!</a> -->
<a href="#answer-post" hx-post="/answer_post/{{ posto._key }}" hx-target="#answer-post" >Ответить этому.</a>