flask-htmx-board1/templates/i-posts.html

40 lines
1.8 KiB
HTML
Raw Normal View History

2023-07-13 19:59:56 +10:00
{% if postos | length > 0 %}
2023-07-13 20:09:26 +10:00
{% for posto in postos %}
2023-07-13 21:34:06 +10:00
{% if posto.root_post %}
<div class="card deep-orange accent-4 darken-1">
{% else %}
<div class="card blue-grey darken-1">
{% endif %}
2023-07-14 01:43:56 +10:00
<div class="row" id="post-{{ posto._key }}">
2023-07-14 12:31:18 +10:00
<div class="col s4">
2023-07-13 21:34:06 +10:00
<div class="card-image">
<div class="hex-main">
<div class="hex-container">
<a href="https://loremflickr.com/g/320/240/paris" target="_blank" ">
<img src="https://loremflickr.com/g/320/240/paris">
</a>
</div>
</div>
2023-07-13 21:26:04 +10:00
</div>
2023-07-13 21:34:06 +10:00
</div>
<div class="col s8">
<div class="card-content white-text">
2023-07-14 01:40:19 +10:00
<span class="card-title">#{{ posto._key }}
2023-07-14 12:34:27 +10:00
{% if posto.parent_post %}
2023-07-14 12:38:22 +10:00
<span class="new badge blue" data-badge-caption=""><a href="#post-{{ posto.parent_post }}">>{{ posto.parent_post }}</a></span>
2023-07-14 12:34:27 +10:00
{% endif %}
2023-07-14 01:40:19 +10:00
<span class="new badge blue" data-badge-caption="">Ответов: {{ posto.answers_num }}</span>
<span class="new badge red" data-badge-caption="">Длина треда: {{ posto.children_num }}</span>
</span>
2023-07-13 21:34:06 +10:00
<p>{{ posto.texto }}</p>
2023-07-13 21:26:04 +10:00
</div>
2023-07-13 21:34:06 +10:00
</div>
<div class="col s12">
<div class="card-action right">
2023-07-13 21:56:36 +10:00
<a href="#" hx-post="/post_my_post/{{ posto._key }}" hx-target="#neu-posts" >Answer me!</a>
2023-07-13 20:23:27 +10:00
</div>
2023-07-13 21:34:06 +10:00
</div>
</div>
2023-07-13 21:26:04 +10:00
</div>
2023-07-13 19:50:45 +10:00
{% endfor %}
{% endif %}