diff options
Diffstat (limited to 'templates/activities/_image_uploaded.html')
-rw-r--r-- | templates/activities/_image_uploaded.html | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/templates/activities/_image_uploaded.html b/templates/activities/_image_uploaded.html new file mode 100644 index 0000000..ad03120 --- /dev/null +++ b/templates/activities/_image_uploaded.html @@ -0,0 +1,19 @@ +<div class="uploaded-image"> + <input type="hidden" name="attachment" value="{{ attachment.pk }}"> + <img src="{{ attachment.thumbnail_url }}"> + <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 beep! length of beep! <.uploaded-image/> > 3 then hide me"> + Add Image +</a> +{% endif %} |