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

Possible light/dark mode for the page :) #38

Merged
merged 6 commits into from
Feb 11, 2024

Conversation

ivanosquis10
Copy link

Hi Midu, friends dev. I don't know if you like the idea but I still present it. I based it on the dark mode of another midu's project. Feel free to improve the code later if necessary 💯

portfolio dev: https://github.com/midudev/porfolio.dev/blob/main/src/components/ThemeToggle.astro

light:
image

dark:
image

Copy link

vercel bot commented Feb 9, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
tailwind-animations ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 9, 2024 5:23pm

<div
class='absolute inset-0 -z-10 h-full w-full bg-white bg-[linear-gradient(to_right,#8080800a_1px,transparent_1px),linear-gradient(to_bottom,#8080800a_1px,transparent_1px)] bg-[size:14px_24px]'
class='absolute inset-0 -z-10 h-full w-full bg-white dark:bg-zinc-950 bg-[linear-gradient(to_right,#8080800a_1px,transparent_1px),linear-gradient(to_bottom,#8080800a_1px,transparent_1px)] bg-[size:14px_24px]'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ivanosquis10 I would recommend a bg-zinc-900 as almost full black might not be best for dark mode.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should change it here..

</button>
<div
id="themes-menu"
class="absolute opacity-0 scale-80 top-8 right-0 text-sm p-1 min-w-[8rem] rounded-md border border-gray-100 bg-white/90 dark:bg-zinc-900/70 dark:border-gray-500/20 shadow-[0_3px_10px_rgb(0,0,0,0.2)] backdrop-blur-md z-50"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ivanosquis10 I would recommend a bg-zinc-900 as almost full black might not be best for dark mode.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ivanosquis10 I would recommend a bg-zinc-900 as almost full black might not be best for dark mode.

you say in the layout?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one is fine..

Copy link
Contributor

@luis-cicada luis-cicada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would recommend a bg-zinc-900 | bg-slate-900 as almost full black might not be best for dark mode.

<style is:global></style>
<style is:global>
:root {
color-scheme: light;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ivanosquis10 we should add color-scheme: light dark;

}

body {
color:rgba(0, 0, 0, 0.9)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ivanosquis10 instead of full black something like background: #212121;

Copy link
Contributor

@luis-cicada luis-cicada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added some comments

@ivanosquis10
Copy link
Author

I added some comments

nice, thanks for the help :)

…d the color of the body to a less strong black
@midudev midudev merged commit b047e72 into midudev:main Feb 11, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants