From 6bc114dfac19db6977eca316d851ca1ba35bce2e Mon Sep 17 00:00:00 2001 From: Pinapelz Date: Sat, 8 Feb 2025 18:39:49 -0800 Subject: add scalable svg icons --- static/img/download.svg | 1 + static/img/layout.svg | 1 + static/img/plus-circle.svg | 1 + static/img/trash-2.svg | 1 + static/img/trash.svg | 1 + static/img/upload.svg | 1 + static/img/x-circle.svg | 1 + static/index.js | 6 +++--- static/styles.css | 1 + templates/index.html | 16 ++++++---------- 10 files changed, 17 insertions(+), 13 deletions(-) create mode 100644 static/img/download.svg create mode 100644 static/img/layout.svg create mode 100644 static/img/plus-circle.svg create mode 100644 static/img/trash-2.svg create mode 100644 static/img/trash.svg create mode 100644 static/img/upload.svg create mode 100644 static/img/x-circle.svg diff --git a/static/img/download.svg b/static/img/download.svg new file mode 100644 index 0000000..ffa0e9a --- /dev/null +++ b/static/img/download.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/img/layout.svg b/static/img/layout.svg new file mode 100644 index 0000000..1943229 --- /dev/null +++ b/static/img/layout.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/img/plus-circle.svg b/static/img/plus-circle.svg new file mode 100644 index 0000000..015bb62 --- /dev/null +++ b/static/img/plus-circle.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/img/trash-2.svg b/static/img/trash-2.svg new file mode 100644 index 0000000..ce3947d --- /dev/null +++ b/static/img/trash-2.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/img/trash.svg b/static/img/trash.svg new file mode 100644 index 0000000..38e9c35 --- /dev/null +++ b/static/img/trash.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/img/upload.svg b/static/img/upload.svg new file mode 100644 index 0000000..e09b69f --- /dev/null +++ b/static/img/upload.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/img/x-circle.svg b/static/img/x-circle.svg new file mode 100644 index 0000000..433837f --- /dev/null +++ b/static/img/x-circle.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/index.js b/static/index.js index 2a1835c..ea68d2b 100644 --- a/static/index.js +++ b/static/index.js @@ -504,18 +504,18 @@ function bind_trash_events() { trash.classList.add('droppable'); trash.addEventListener('dragenter', (evt) => { evt.preventDefault(); - evt.target.src = 'trash_bin_open.png'; + evt.target.src = '/static/img/trash-2.svg'; }); trash.addEventListener('dragexit', (evt) => { evt.preventDefault(); - evt.target.src = 'trash_bin.png'; + evt.target.src = '/static/img/trash.svg'; }); trash.addEventListener('dragover', (evt) => { evt.preventDefault(); }); trash.addEventListener('drop', (evt) => { evt.preventDefault(); - evt.target.src = 'trash_bin.png'; + evt.target.src = '/static/img/trash.svg'; if (dragged_image) { let dragged_image_parent = dragged_image.parentNode; if (dragged_image_parent.tagName.toUpperCase() === 'SPAN' && diff --git a/static/styles.css b/static/styles.css index 6f2d5f3..8166a32 100644 --- a/static/styles.css +++ b/static/styles.css @@ -143,6 +143,7 @@ img.draggable.dragged, .button:active { .button img { user-select: none; + width: 100px; } .bottom-container { diff --git a/templates/index.html b/templates/index.html index 4b98bdc..9790869 100644 --- a/templates/index.html +++ b/templates/index.html @@ -20,29 +20,25 @@
@@ -53,10 +49,10 @@
- +
-- cgit v1.2.3