summaryrefslogtreecommitdiffstats
path: root/templates/activities/_image_uploaded.html
blob: 36bd7fe685fa9efc205afa479ab41bd40023c9d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<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">
        <a class="button delete left" _="on click remove closest .uploaded-image">Remove</a>
    </div>
</div>
{% if request.htmx %}
<a class="button 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
</a>
{% endif %}