vuejs / pinia

🍍 Intuitive, type safe, light and flexible Store for Vue using the composition api with DevTools support
https://pinia.vuejs.org
MIT License
13.07k stars 1.05k forks source link

Dark mode glitch on docs #427

Closed ghost closed 3 years ago

ghost commented 3 years ago

Hi. I have bookmarked https://pinia.esm.dev/introduction.html and it's in dark mode by default. When I visit the main page from there (click logo) then it changes to light mode automatically.

The toggle to switch modes works right only for dark mode. Light mode is not saved properly I think.

posva commented 3 years ago

That's normal, the docs are static, I had to choose a theme by default. I don't think there is a way to handle the rendering without server-side logic, but I'm open to reasonable proposals (e.g. not something about including a service worker 😆 )

posva commented 3 years ago

ooh I see what you mean now: the pages stays in dark mode. Yeah, the dark light mode is a WIP currently it only loads on the main page

posva commented 3 years ago

I think I will focus on integrating dark mode directly into vitepress rather than hack further the layout to add the toggle

ghost commented 3 years ago

There's a toggle but it kinda in a strange place

2021-04-09_130909

posva commented 3 years ago

It will be on the navbar

ghost commented 3 years ago

Is that helpful? https://vueuse.org/core/useDark/