diff --git a/containers/rust-dev.Dockerfile b/containers/rust-dev.Dockerfile index 2b73867..e36e897 100644 --- a/containers/rust-dev.Dockerfile +++ b/containers/rust-dev.Dockerfile @@ -7,6 +7,6 @@ RUN cargo install cargo-watch && \ RUN apt update && \ apt install nodejs npm -y --no-install-recommends && \ - npm i -g uglify-js + npm i -g uglify-js html-minifier CMD [ "/opt/code/dev-entry.sh" ] diff --git a/filed/static/assets/dragndrop-form.js b/filed/static/assets/dragndrop-form.js index c0cbb7c..c6068ad 100644 --- a/filed/static/assets/dragndrop-form.js +++ b/filed/static/assets/dragndrop-form.js @@ -8,8 +8,24 @@ const root_drag_rop = document.getElementsByClassName('file-drag-n-drop')[0]; // make the root drag&drop element an ideal circle - root_drag_rop.style.width = root_drag_rop.offsetWidth + 'px'; - root_drag_rop.style.height = root_drag_rop.offsetWidth + 'px'; + + function updateDragNDrop() { + + if (document.body.scrollWidth < 667) { + // mobile + delete root_drag_rop.style.width; + delete root_drag_rop.style.height; + return + } + + const width = root_drag_rop.offsetWidth; + + root_drag_rop.style.width = width + 'px'; + root_drag_rop.style.height = width + 'px'; + } + + updateDragNDrop(); + document.onresize = updateDragNDrop(); /** @type {HTMLElement} */ const drag_rop = document.getElementsByClassName('file-drag-n-drop-inside')[0]; diff --git a/filed/templates/source/base.html b/filed/templates/source/base.html index 4e23bf8..b69526f 100644 --- a/filed/templates/source/base.html +++ b/filed/templates/source/base.html @@ -16,6 +16,22 @@