From 8ca1ba238cd8bc731bd1549e69682b056a0998df Mon Sep 17 00:00:00 2001 From: blek Date: Fri, 3 Nov 2023 19:35:51 +1000 Subject: [PATCH 1/4] alternative display for header in mobile mode --- filed/templates/base.html | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/filed/templates/base.html b/filed/templates/base.html index 4e23bf8..2c9afeb 100644 --- a/filed/templates/base.html +++ b/filed/templates/base.html @@ -16,6 +16,21 @@ {{ conf.brand.instance_name }} + {%- if cfg!(debug_assertions) -%} @@ -33,7 +48,7 @@ {{- conf.brand.instance_name -}} {%- if conf.brand.instance_motto.len() != 0 -%} {#- Whitespace control is stupid -#} - {{- " - " -}}{{- conf.brand.instance_motto -}} + {{- " - " -}}{{- conf.brand.instance_motto -}} {%- endif -%} -- 2.40.1 From 9d8a7cf97662e1807053e50c39119aecb2833591 Mon Sep 17 00:00:00 2001 From: blek Date: Fri, 3 Nov 2023 19:45:14 +1000 Subject: [PATCH 2/4] improve dragndrop zone size handling on mobile --- filed/static/assets/dragndrop-form.js | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) 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]; -- 2.40.1 From e25bfa4b2aec3f168001e93bb360cbe6d5208148 Mon Sep 17 00:00:00 2001 From: blek Date: Sat, 11 Nov 2023 18:26:56 +1000 Subject: [PATCH 3/4] add html-minifier to rust dev dockerfile --- containers/rust-dev.Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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" ] -- 2.40.1 From abd77c9bc7424fa876b0d95ad964a58248c1198c Mon Sep 17 00:00:00 2001 From: blek Date: Sat, 11 Nov 2023 18:27:32 +1000 Subject: [PATCH 4/4] add animation to the header --- filed/templates/source/base.html | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/filed/templates/source/base.html b/filed/templates/source/base.html index 2c9afeb..b69526f 100644 --- a/filed/templates/source/base.html +++ b/filed/templates/source/base.html @@ -17,14 +17,15 @@