Compare commits

...

9 Commits

Author SHA1 Message Date
Simple_Not
e6ae7440aa re post
All checks were successful
continuous-integration/drone/push Build is passing
2024-01-29 02:13:25 +10:00
Simple_Not
3f3e5711b6 move answers
All checks were successful
continuous-integration/drone/push Build is passing
2024-01-29 02:11:01 +10:00
Simple_Not
a416e46139 move answers
All checks were successful
continuous-integration/drone/push Build is passing
2024-01-29 02:09:55 +10:00
Simple_Not
33c609645c move answers
All checks were successful
continuous-integration/drone/push Build is passing
2024-01-29 02:08:44 +10:00
Simple_Not
1f58b37b96 checking threads viz
All checks were successful
continuous-integration/drone/push Build is passing
2024-01-29 02:03:20 +10:00
Simple_Not
1ff5f2803f checking threads viz
All checks were successful
continuous-integration/drone/push Build is passing
2024-01-29 01:44:22 +10:00
Simple_Not
e91c6dba41 checking threads viz
All checks were successful
continuous-integration/drone/push Build is passing
2024-01-29 01:42:37 +10:00
Simple_Not
5c99fc6f8d checking threads viz
All checks were successful
continuous-integration/drone/push Build is passing
2024-01-29 01:39:59 +10:00
Simple_Not
bb6f126811 checking threads viz
All checks were successful
continuous-integration/drone/push Build is passing
2024-01-29 01:35:08 +10:00
3 changed files with 30 additions and 8 deletions

View File

@ -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">

View File

@ -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>

View File

@ -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>