Compare commits
9 Commits
0e727ef4fe
...
e6ae7440aa
Author | SHA1 | Date | |
---|---|---|---|
|
e6ae7440aa | ||
|
3f3e5711b6 | ||
|
a416e46139 | ||
|
33c609645c | ||
|
1f58b37b96 | ||
|
1ff5f2803f | ||
|
e91c6dba41 | ||
|
5c99fc6f8d | ||
|
bb6f126811 |
@ -1,7 +1,7 @@
|
||||
<div class="card">
|
||||
<div class="card-content">
|
||||
<div class="row">
|
||||
<span class="card-title">Создай то, о чем будут говорить многие. Ты отвечаешь: <a href="#post-{{ target_post_id }}">>>{{ target_post_id }}</a></span>
|
||||
<span class="card-title">Ты отвечаешь: <a href="#post-{{ target_post_id }}">>>{{ target_post_id }}</a></span>
|
||||
<a class="btn-floating halfway-fab waves-effect waves-light red" href="#post-{{ target_post_id }}"><i class="material-icons">>></i></a>
|
||||
<form hx-encoding='multipart/form-data' _='on htmx:xhr:progress(loaded, total) set #progress.value to (loaded/total)*100'>
|
||||
<div class="input-field col s6">
|
||||
|
@ -30,30 +30,49 @@
|
||||
{% endif %}
|
||||
<p>{{ posto.texto }}</p>
|
||||
|
||||
{% if posto.answers_list[0] | length > 0 %}
|
||||
<!-- {% if posto.answers_list[0] | length > 0 %}
|
||||
<br>
|
||||
<p>Ответы:</p>
|
||||
<div class="collection">
|
||||
{% 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">>>{{ (posto.answers_list[0])[loop.index-1] }} (ответов {{ (posto.answers_list[1])[loop.index-1] }}, длина {{ (posto.answers_list[2])[loop.index-1] }})</a>
|
||||
<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">>>{{ (posto.answers_list[0])[loop.index-1] }} (ответов {{ (posto.answers_list[1])[loop.index-1] }})</a>
|
||||
<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">>>{{ (posto.answers_list[0])[loop.index-1] }}</a>
|
||||
<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 %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %} -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="col s12">
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col s12">
|
||||
<!-- TODO !подгрузка следующего поста в конец треда без перезагрузки всего треда! -->
|
||||
<div class="card-action right">
|
||||
<div class="card-action left">
|
||||
<!-- <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>
|
||||
{% 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>
|
||||
</div>
|
||||
|
@ -9,6 +9,9 @@
|
||||
<div class="col s6 m5" id="neu-posts">
|
||||
{% include 'i-posts.html' %}
|
||||
</div>
|
||||
<div class="col s6 m5" id="thread-viz">
|
||||
<iframe src="https://thread-visualizah-dev.board.vdk2ch.ru/" scrolling="no" frameborder="0" style="position: relative; height: 600px; width: 100%; margin:10px;"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user