From 93e0766bead8cb4b229dee46135c182c1dc26581 Mon Sep 17 00:00:00 2001 From: Morris Brodersen Date: Sun, 29 Dec 2024 14:27:21 +0100 Subject: [PATCH] add dark mode --- README.md | 1 + es5/.eslintrc.json | 25 -------------- es5/.stylelintrc.json | 10 ------ es5/public/styles/app-footer.css | 1 - public/scripts/AppIcon.js | 4 ++- public/scripts/TodoApp.js | 31 +++++++++++++++++ public/styles/app-date-picker.css | 3 -- public/styles/app-footer.css | 1 - public/styles/base.css | 5 ++- public/styles/todo-custom-list.css | 4 ++- public/styles/todo-item-input.css | 1 + public/styles/todo-item.css | 1 + public/styles/vars.css | 53 ++++++++++++++++++++++++++++++ 13 files changed, 95 insertions(+), 45 deletions(-) delete mode 100644 es5/.eslintrc.json delete mode 100644 es5/.stylelintrc.json diff --git a/README.md b/README.md index dbd7de6..b3adb12 100644 --- a/README.md +++ b/README.md @@ -889,6 +889,7 @@ Thanks! ### 12/2024 +- Add dark mode - Add Playwright config for testing more browsers - Update dependencies diff --git a/es5/.eslintrc.json b/es5/.eslintrc.json deleted file mode 100644 index 1067005..0000000 --- a/es5/.eslintrc.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "root": true, - "extends": ["eslint:recommended", "plugin:compat/recommended"], - "globals": { - "Set": "readonly", - "Map": "readonly" - }, - "env": { - "browser": true - }, - "parserOptions": { - "ecmaVersion": 5 - }, - "rules": {}, - "settings": { - "polyfills": [ - "Set", - "Map", - "fetch", - "Object.assign", - "requestAnimationFrame", - "performance.now" - ] - } -} diff --git a/es5/.stylelintrc.json b/es5/.stylelintrc.json deleted file mode 100644 index c62cda0..0000000 --- a/es5/.stylelintrc.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": ["stylelint-config-standard", "stylelint-rscss/config"], - "rules": { - "property-no-vendor-prefix": null, - "selector-class-pattern": "[a-z\\-][a-z0-9\\-]+", - "media-feature-range-notation": "prefix", - "color-function-notation": "legacy", - "declaration-block-no-redundant-longhand-properties": null - } -} diff --git a/es5/public/styles/app-footer.css b/es5/public/styles/app-footer.css index ccc584c..7dea98f 100644 --- a/es5/public/styles/app-footer.css +++ b/es5/public/styles/app-footer.css @@ -5,7 +5,6 @@ color: #999; } -/* stylelint-disable-next-line rscss/no-descendant-combinator */ .app-footer a { color: #999; } diff --git a/public/scripts/AppIcon.js b/public/scripts/AppIcon.js index a804e4b..34e2d8e 100644 --- a/public/scripts/AppIcon.js +++ b/public/scripts/AppIcon.js @@ -7,9 +7,11 @@ const cache = {}; * @param {HTMLElement} el */ export function AppIcon(el) { - if (el.children.length > 0) return; + if (el.dataset.lid === el.dataset.id) return; const id = el.dataset.id; + el.dataset.lid = id; + let promise = cache[id]; if (!promise) { diff --git a/public/scripts/TodoApp.js b/public/scripts/TodoApp.js index cc1ee0a..acdbd55 100644 --- a/public/scripts/TodoApp.js +++ b/public/scripts/TodoApp.js @@ -18,6 +18,9 @@ export function TodoApp(el) { VANILLA TODO

+