1502shivam-singh commented on issue #871:
URL: https://github.com/apache/apisix-website/issues/871#issuecomment-1033864478


   > If you open the docs in another tab and switch to dark mode, when you 
return to the home page in the original tab, the home page will also switch to 
dark mode
   
   What I observe is that the dark mode is switching to light mode, as is 
programmed (only not fast, surprisingly). Reason for this I guess is that the 
dark mode context of the documentation section (in other tab) is stored in 
localstorage of browser and the site opening on other tab picks it up as theme. 
   But, to maintain light mode on homepage, the code resets the theme using the 
docusaurus's useThemeContext(), 
   
https://github.com/apache/apisix-website/blob/2b43e5aeff92c2aabac14a540426de555cef238d/website/src/pages/index.js#L28-L41
   
   Only issue, is that this switch is slow on your system, but seems smooth on 
mine 🤔
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to