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 dark mode #3

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

add dark mode #3

wants to merge 2 commits into from

Conversation

dalkommatt
Copy link

No description provided.

Copy link

vercel bot commented Jan 12, 2024

@dalkommatt is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

vercel bot commented Jan 12, 2024

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

Name Status Preview Comments Updated (UTC)
next-ai-news ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 14, 2024 0:24am

@rauchg
Copy link
Owner

rauchg commented Jan 12, 2024

Looks amazing. I'd love to merge it if we can tune the colors a bit more (e.g.: white on orange in the nav bar is too harsh, the search input look n feel, etc)

@emekaorji
Copy link

Dark mode looks awesome!

Copy link

@babarkamal114 babarkamal114 left a comment

Choose a reason for hiding this comment

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

Consider leveraging Tailwind CSS utility classes for colors instead of hardcoded values. To enhance readability and maintainability, utilize the predefined Tailwind color classes. Additionally, for any unique project-specific colors, it's advisable to add them to the tailwind.config.js file. This centralized approach streamlines color management, making the code more readable and easier to maintain.

@@ -85,7 +85,7 @@ export default async function ItemPage({
<div className="flex-grow">
{story.url != null ? (
<a
className="text-[#000000] hover:underline"
className="text-[#000000] dark:text-[#ffffff] hover:underline"

Choose a reason for hiding this comment

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

Consider using Tailwind CSS utility classes like text-white and text-black instead of hardcoded color values (#000000 and #ffffff) for improved readability and maintainability.

@@ -96,19 +96,19 @@ export default async function ItemPage({
<Link
prefetch={true}
href={`/item/${story.id.replace(/^story_/, "")}`}
className="text-[#000000] hover:underline"
className="text-[#000000] dark:text-[#ffffff] hover:underline"

Choose a reason for hiding this comment

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

Same here

{story.domain && (
<span className="text-xs ml-1 text-[#666] md:text-[#828282]">

Choose a reason for hiding this comment

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

Consider enhancing code maintainability by adding unique project colors to the Tailwind CSS configuration file (tailwind.config.js). This not only centralizes color definitions but also makes the code more readable and consistent. Utilizing named colors from the configuration file provides a single source of truth for color choices, making it easier for developers to manage and update the project's color palette.

<Suspense fallback={null}>
<AuthNav />
</Suspense>
</div>
</header>

<main className="py-4 px-1 md:px-2 flex-grow bg-[#f6f6ef]">
<main className="py-4 px-1 md:px-2 flex-grow bg-[#f6f6ef] dark:bg-[#1b1d20]">

Choose a reason for hiding this comment

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

same here

{children}
</main>

<footer
className="flex flex-col items-center justify-center p-4 border-t-2 border-t-[#FF9966]
text-black bg-[#f6f6ef]"
text-black bg-[#f6f6ef] dark:bg-[#1b1d20] dark:text-white"

Choose a reason for hiding this comment

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

same here

<div tw="bg-[#f6f6ef] flex h-full w-full" style={font("Inter 300")}>
<div
tw="bg-[#f6f6ef] dark:bg-[#1b1d20] flex h-full w-full"
style={font("Inter 300")}

Choose a reason for hiding this comment

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

same here

@dalkommatt
Copy link
Author

Consider leveraging Tailwind CSS utility classes for colors instead of hardcoded values. To enhance readability and maintainability, utilize the predefined Tailwind color classes. Additionally, for any unique project-specific colors, it's advisable to add them to the tailwind.config.js file. This centralized approach streamlines color management, making the code more readable and easier to maintain.

Agreed this is preferable. This PR was made to match the current styling as-is but if @rauchg would like to update to css variables I'd be happy to add it.

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.

4 participants