Initial version of pools
This commit is contained in:
parent
fe7edb93ad
commit
2b6b1f30f4
21 changed files with 577 additions and 36 deletions
25
templates/pool_posts.html
Normal file
25
templates/pool_posts.html
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
<div id="pool-posts">
|
||||
{% if posts.is_empty() %}
|
||||
<span>No posts in pool.</span>
|
||||
{% else %}
|
||||
<ul>
|
||||
{% for post in posts %}
|
||||
<li class="pool-post" data-position="{{ post.position }}">
|
||||
<a href="/post/{{ post.id }}" title="{{ post.tags }}">
|
||||
<img src="/files/{{ post.thumbnail }}" />
|
||||
<div>{{ post.rating | upper }}</div>
|
||||
</a>
|
||||
{% if can_edit %}
|
||||
<button
|
||||
hx-delete="/pool_post/{{ post.pool_post_id }}"
|
||||
hx-target="closest .pool-post"
|
||||
hx-swap="outerHTML"
|
||||
>
|
||||
Remove
|
||||
</button>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</div>
|
||||
Loading…
Add table
Add a link
Reference in a new issue