Change CSS variable names + create a themer #109

Merged
a3thakra merged 5 commits from adi-create-themer into main 2 years ago
Collaborator

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 2 years ago
a3thakra force-pushed adi-create-themer from 06d6f61ae4 to 8a021f32b2 2 years ago
n3parikh reviewed 2 years ago
n3parikh left a comment
Owner

Looks good to me!

Looks good to me!
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.
Poster
Collaborator

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 2 years ago
b38peng approved these changes 2 years ago
a3thakra merged commit af8c750c0c into main 2 years ago

Reviewers

n3parikh approved these changes 2 years ago
b38peng approved these changes 2 years ago
continuous-integration/drone/push Build is passing
The pull request has been merged as af8c750c0c.
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: www/www-new#109
Loading…
There is no content yet.