Initial progress on styling
This commit is contained in:
parent
c650c27825
commit
2c44a69ec3
38 changed files with 748 additions and 412 deletions
33
templates/fragments/pool_posts.html
Normal file
33
templates/fragments/pool_posts.html
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
<div id="pool-posts">
|
||||
{% if posts.is_empty() %}
|
||||
<span>No posts in pool.</span>
|
||||
{% else %}
|
||||
<ul
|
||||
class="sortable"
|
||||
hx-put="/pool/{{ pool.id }}/sort"
|
||||
hx-trigger="end"
|
||||
hx-vals="js:{old_index: event.oldIndex, new_index: event.newIndex}"
|
||||
hx-target="#pool-posts"
|
||||
hx-swap="outerHTML"
|
||||
>
|
||||
{% for post in posts %}
|
||||
<li class="pool-post">
|
||||
<a href="/post/{{ post.id }}" title="{{ post.tags }}">
|
||||
<img src="/files/{{ post.thumbnail }}" />
|
||||
<div>{{ post.rating | upper }}</div>
|
||||
<div>{{ post.media_type }}</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