Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add light theme + theme switch #13

Open
FaberVitale opened this issue Dec 22, 2022 · 0 comments
Open

add light theme + theme switch #13

FaberVitale opened this issue Dec 22, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@FaberVitale
Copy link
Collaborator

Describe the problem

I want to be able to toggle between light and dark theme.

Describe the proposed solution

1. Add white theme

design a nice light theme then edit https://github.com/Roma-JS/roma-js-on-astro/blob/main/src/styles/main.scss#L144

2. Create theme switcher

add to the navbar a toggle button that on click switches between light and dark theme:

document.documentElement.classList.toggle(...)
  1. Persist user preference

You need to check in a render blocking script that the default theme matches what the user has selected.

Alternatives considered

We could use a drop-down menu of we want to support more than 2 themes... but it does not seem that useful atm.

Importance

nice to have

@FaberVitale FaberVitale added the enhancement New feature or request label Dec 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant