From 5bb05a9a235e2d4419b791fa88c21e645421d3c5 Mon Sep 17 00:00:00 2001 From: Iris Lightshard Date: Mon, 18 Mar 2024 12:38:00 -0600 Subject: [PATCH] fix wallpaper reset, file input styling --- static/style.css | 11 ++++++++--- static/theme.js | 6 +++++- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/static/style.css b/static/style.css index 03ffbaf..78a0c07 100644 --- a/static/style.css +++ b/static/style.css @@ -250,7 +250,7 @@ form.editor input, form.build input, form.editor textarea, form.configurator inp text-transform: uppercase; display: inline-block; transition: background 1s, color 1s; - z-index: 2; + z-index: 1; } #theme_cfg label.nohover, #theme_cfg label.nohover:hover { @@ -310,7 +310,7 @@ form.editor input[type="submit"], form.build input[type="submit"], .danger-zone transition: background 1s, color 1s; } -form.editor input[type="submit"]:hover,form.build input[type="submit"]:hover, .danger-zone input[type="submit"]:hover, form.configurator input[type="submit"]:hover, .file-move input[type="submit"]:hover, .uploader input[type="submit"]:hover, .uploader label:hover, .mkdir input[type="submit"]:hover, .uploader button:hover{ +form.editor input[type="submit"]:hover,form.build input[type="submit"]:hover, .danger-zone input[type="submit"]:hover, form.configurator input[type="submit"]:hover, .file-move input[type="submit"]:hover, .uploader input[type="submit"]:hover, .upload-wrapper:hover label, .mkdir input[type="submit"]:hover, .uploader button:hover{ background: var(--fg_color); color: var(--bg_color); } @@ -373,12 +373,17 @@ form input[readonly] { input[type="file"] { opacity: 0; position: absolute; - z-index: 1; + z-index: 2; top: 5px; height: 50px; width: 110px; } +#theme_cfg input[type="file"] { + height: 35px; + width: 120px; +} + input[type="file"]:not(:valid) + .file-feedback::after { content: "No file selected"; height: 1em; diff --git a/static/theme.js b/static/theme.js index abfe56f..7f86401 100644 --- a/static/theme.js +++ b/static/theme.js @@ -139,9 +139,13 @@ function resetBG(screen) { } } - rule.style.setProperty("background", `url('${saveData[screen + "Screen"]}`); + const dataUrl = saveData[screen + "Screen"]; + if (dataUrl) { + + rule.style.setProperty("background", `url('${dataUrl}`); rule.style.setProperty("background-size", "cover"); rule.style.setProperty("background-attachment", "fixed"); + } } function initializeReaders() {