coh2stats icon indicating copy to clipboard operation
coh2stats copied to clipboard

Enable dark mode / light mode switch

Open petrvecera opened this issue 3 years ago • 2 comments

We could try to add dark mode, there could be a switch in top right corner

https://ant.design/docs/react/customize-theme#Official-Themes-%F0%9F%8C%88

If anyone wants to help with this: I am looking mostly for POC how to nicely swap the themes for both antd and our components.

My POC requires taking out .css files for antd. Which is not very efficient or elegant. Would require to manually do this on every antd update. Could be probably automated with the webpack ?

After adding this we need to verify that all components are displayed correctly. We could have localstorage where persons preference would be stored.

petrvecera avatar Aug 01 '21 09:08 petrvecera

No offence, just a suggestion but you can use styled components to implement that easily something like the top right corner on my portfolio https://divyateja04.github.io

thenicekat avatar Sep 24 '21 06:09 thenicekat

Styled components is a framework to more easily style your specific component. This task is little bit more complicated. We are not building our styling. Most of the components on the site are using default styles from antd component library. Which already provides dark theme.

Building dark theme on our own would be extremely hard job given the components we have. It could definitely help with the components we have for charts maybe - or any other component where we specified our colors / our styling. But this is just fraction of components in compare what we are utilizing from the antd

petrvecera avatar Oct 01 '21 12:10 petrvecera