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/dark theme to articles #432

Closed
Tracked by #63
NiallJoeMaher opened this issue Sep 27, 2023 · 10 comments · Fixed by #559
Closed
Tracked by #63

Add light/dark theme to articles #432

NiallJoeMaher opened this issue Sep 27, 2023 · 10 comments · Fixed by #559
Assignees
Labels
enhancement New feature or request hacktoberfest

Comments

@NiallJoeMaher
Copy link
Contributor

Context

So we can give a better user experience we are working on a light/dark mode.

Expected Behavior

We use Tailwind so we should enable this by having a default light mode and dark mode with the dark: prefix.
You can see how this is done here: https://tailwindcss.com/docs/dark-mode

Current Behavior

By default, we only use a dark theme.
You can see an example post here: https://www.codu.co/articles/hactoberfest-2023-with-cod-jh-6jzte

Additional info

The background for light mode should be: bg-neutral-100
The text should be: text-neutral-900

@NiallJoeMaher NiallJoeMaher added enhancement New feature or request hacktoberfest labels Sep 27, 2023
@NiallJoeMaher NiallJoeMaher changed the title Add light/dark theme to blog posts Add light/dark theme to articles Sep 27, 2023
@Mrst12
Copy link
Contributor

Mrst12 commented Sep 29, 2023

Can I work on this please 😊 just need to know which page to code on as there is various pages linked to article (sorry to be thick dont want to step on anyones toes, and first time doing open source so want to put code in the right file)

@NiallJoeMaher
Copy link
Contributor Author

Not a problem! We will help out if you get stuck.

It’s here: https://github.com/codu-code/codu/blob/develop/pages/articles/%5Bslug%5D.tsx

@Shrenik0321
Copy link

hey @NiallJoeMaher , would love to work on this issue if there weren't any updates

@Mrst12
Copy link
Contributor

Mrst12 commented Oct 5, 2023

hi @NiallJoeMaher ive had a play around with dev tools to find out how to change the light/dark for the articles page ive attached the screenshots when i uncheck the box it has the right styles for light but not dark when its checked it has the right styles for dark but not light i have searched everywhere where can i change this code for light and dark mode it seems to be inherited from the components in the global css line 18 attached screenshot file, sorry but im not sure how to proceed as dont know where to change this inherited code 🤔
dev-tools-light
dev-light
dev-tools-dark

dev-dark css-18

@NiallJoeMaher
Copy link
Contributor Author

Let me take a look into it for you. Great job so far so don't panic. 🦾

@abhijeetgurle
Copy link
Contributor

I can take this up @NiallJoeMaher.

@NiallJoeMaher
Copy link
Contributor Author

Thanks, I haven't gotten around to it yet. 🦾

@NiallJoeMaher
Copy link
Contributor Author

@abhijeetgurle, how is it going? Anything I can help with?

@abhijeetgurle
Copy link
Contributor

@NiallJoeMaher I couldn't work on this issue yesterday. Will work on it today. Will let you know if help is needed.

@abhijeetgurle
Copy link
Contributor

abhijeetgurle commented Oct 17, 2023

Can you check the PR @NiallJoeMaher ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request hacktoberfest
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants