Change CSS variable names + create a themer #109

Merged
a3thakra merged 5 commits from adi-create-themer into main 2021-08-03 19:37:03 -04:00
Owner

Try it out at https://csclub.uwaterloo.ca/~a3thakra/website-demo/themer/

  • Themes persist across website reloads
  • Individual color reset buttons
  • Reset all colors button
Try it out at https://csclub.uwaterloo.ca/~a3thakra/website-demo/themer/ - Themes persist across website reloads - Individual color reset buttons - Reset all colors button
a3thakra requested review from b38peng 2021-07-27 16:00:47 -04:00
a3thakra force-pushed adi-create-themer from 06d6f61ae4 to 8a021f32b2 2021-08-01 17:31:19 -04:00 Compare
n3parikh reviewed 2021-08-01 17:44:42 -04:00
n3parikh left a comment
Owner

Looks good to me!

Looks good to me!
@ -0,0 +166,4 @@
function getSavedPalette() {
const raw = localStorage.getItem(STORAGE_KEY);
return raw == null ? undefined : (JSON.parse(raw) as Palette);
Owner

Nit: might be better to have this function return the default palette when the it's not found in local storage, so callers don't have to worry about checking for undefined.

Nit: might be better to have this function return the default palette when the it's not found in local storage, so callers don't have to worry about checking for undefined.
Author
Owner

It's only used in 1 place rn (line 102) and I need to check if a saved version exists, so I can assign the theme name correctly. This might change later on when we actually have a dark theme.

It's only used in 1 place rn (line 102) and I need to check if a saved version exists, so I can assign the theme name correctly. This might change later on when we actually have a dark theme.
a3thakra marked this conversation as resolved
n3parikh approved these changes 2021-08-02 20:36:58 -04:00
b38peng approved these changes 2021-08-03 19:11:57 -04:00
a3thakra merged commit af8c750c0c into main 2021-08-03 19:37:03 -04:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: www/www-new#109
No description provided.