mirror of
https://github.com/jointakahe/takahe.git
synced 2024-11-13 02:41:08 +00:00
19 lines
619 B
HTML
19 lines
619 B
HTML
<div class="uploaded-image">
|
|
<input type="hidden" name="attachment" value="{{ attachment.pk }}">
|
|
<img src="{{ attachment.thumbnail_url.relative }}">
|
|
<p>
|
|
{{ attachment.name|default:"(no description)" }}
|
|
</p>
|
|
<div class="buttons">
|
|
<button class="button delete left" _="on click remove closest .uploaded-image">Remove</button>
|
|
</div>
|
|
</div>
|
|
{% if request.htmx %}
|
|
<button class="add-image"
|
|
hx-get='{% url "compose_image_upload" %}'
|
|
hx-target="this"
|
|
hx-swap="outerHTML"
|
|
_="on load if length of <.uploaded-image/> > 3 then hide me">
|
|
Add Image
|
|
</button>
|
|
{% endif %}
|