diff options
author | Andrew Godwin | 2022-12-01 18:46:49 -0700 |
---|---|---|
committer | Andrew Godwin | 2022-12-01 18:47:04 -0700 |
commit | 6f2f28a3a752cc47d9dc96bda862ed67cd75c9af (patch) | |
tree | 1165843b5c207d9e50028bf48db399df20cf7552 /templates/activities/_image_uploaded.html | |
parent | a826ae18ea41e44614ce20d5caad9425d76aa60d (diff) | |
download | takahe-6f2f28a3a752cc47d9dc96bda862ed67cd75c9af.tar.gz takahe-6f2f28a3a752cc47d9dc96bda862ed67cd75c9af.tar.bz2 takahe-6f2f28a3a752cc47d9dc96bda862ed67cd75c9af.zip |
Image attachment uploads
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 %} |