From e3ec163ad7e4d88b0caa360c7b6ef76137275582 Mon Sep 17 00:00:00 2001 From: sHa Date: Sat, 21 Feb 2026 16:27:34 +0200 Subject: [PATCH] feat: implement GuideController for evolution guide panel - Added GuideController to manage the evolution guide panel, including event listeners for opening/closing the panel and spawning entities. - Introduced a new guide.js file with the GuideController implementation. - Created guide.css for styling the guide panel and its elements. - Updated main.js to initialize the GuideController and link it with the EvolutionController. - Enhanced settings.js to include functionality for resetting settings to defaults and saving state to localStorage. - Modified modal.css to improve the layout and styling of the modal footer and reset button. - Adjusted main.css to unify button styles for settings and guide buttons. - Updated icons.css to add animations for entity interactions. - Refactored gradient.js to utilize constants for default values. --- .claude/settings.local.json | 9 + index.html | 215 ++++++++++++++++++---- src/data/icons.json | 20 ++- src/icons/bacteria-new.svg | 15 ++ src/icons/bug.svg | 2 +- src/icons/bug_new.svg | 23 +++ src/icons/virus-filled.svg | 2 +- src/icons/virus-new.svg | 18 ++ src/js/constants.js | 26 +++ src/js/entity.js | 152 ++++++++++++++-- src/js/evolution.js | 349 ++++++++++++++++++++++++++++++++++-- src/js/gradient.js | 8 +- src/js/guide.js | 150 ++++++++++++++++ src/js/main.js | 8 + src/js/settings.js | 156 ++++++++++++++-- src/styles/guide.css | 237 ++++++++++++++++++++++++ src/styles/icons.css | 35 ++++ src/styles/main.css | 39 ++-- src/styles/modal.css | 76 +++++++- 19 files changed, 1428 insertions(+), 112 deletions(-) create mode 100644 .claude/settings.local.json create mode 100644 src/icons/bacteria-new.svg create mode 100644 src/icons/bug_new.svg create mode 100644 src/icons/virus-new.svg create mode 100644 src/js/guide.js create mode 100644 src/styles/guide.css diff --git a/.claude/settings.local.json b/.claude/settings.local.json new file mode 100644 index 0000000..08fd1d3 --- /dev/null +++ b/.claude/settings.local.json @@ -0,0 +1,9 @@ +{ + "permissions": { + "allow": [ + "Bash(/Users/sha/Developer/sha.dev/devpage/src/icons/bacteria.svg:*)", + "Bash(/Users/sha/Developer/sha.dev/devpage/src/styles/guide.css:*)", + "Bash(/Users/sha/Developer/sha.dev/devpage/src/js/guide.js:*)" + ] + } +} diff --git a/index.html b/index.html index 51f8aab..75d3165 100644 --- a/index.html +++ b/index.html @@ -11,11 +11,12 @@ - + + @@ -23,13 +24,107 @@ -
+ + + + + +