Skip to content

Commit d38f2a8

Browse files
Copilotnwalters512
andcommitted
Fix background on body, improve theme toggle visibility, restore single column layout
Co-authored-by: nwalters512 <1476544+nwalters512@users.noreply.github.com>
1 parent 0fe5f12 commit d38f2a8

File tree

5 files changed

+18
-22
lines changed

5 files changed

+18
-22
lines changed

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
package.json
44
package-lock.json
55
public
6+
next-env.d.ts

src/components/theme-toggle.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ const ThemeToggle: React.FC = () => {
77
return (
88
<button
99
onClick={toggleTheme}
10-
className="p-2 rounded-lg bg-gray-200 dark:bg-gray-700 hover:bg-gray-300 dark:hover:bg-gray-600 transition-colors"
10+
className="p-2 rounded-lg bg-white dark:bg-gray-800 hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors border border-gray-300 dark:border-gray-600"
1111
aria-label="Toggle theme"
1212
>
1313
{theme === "light" ? (
1414
<svg
15-
className="w-5 h-5 text-gray-800"
15+
className="w-5 h-5 text-gray-800 dark:text-gray-200"
1616
fill="none"
1717
stroke="currentColor"
1818
viewBox="0 0 24 24"
@@ -26,7 +26,7 @@ const ThemeToggle: React.FC = () => {
2626
</svg>
2727
) : (
2828
<svg
29-
className="w-5 h-5 text-yellow-300"
29+
className="w-5 h-5 text-yellow-400 dark:text-yellow-300"
3030
fill="none"
3131
stroke="currentColor"
3232
viewBox="0 0 24 24"

src/pages/_app.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@ const sourceSans3 = Source_Sans_3({
1515

1616
const App: React.FC<AppProps> = ({ Component, pageProps }) => {
1717
return (
18-
<div
19-
className={`${sourceSans3.className} min-h-screen bg-white dark:bg-gray-900 transition-colors`}
20-
>
18+
<div className={sourceSans3.className}>
2119
<SEO />
2220
<Header title="Nathan's Cookbook" />
2321
<ContentContainer>

src/pages/index.tsx

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,26 +10,22 @@ interface IndexProps {
1010

1111
const Index: React.FC<IndexProps> = ({ recipes }) => {
1212
return (
13-
<div className="grid gap-4 md:grid-cols-2">
13+
<React.Fragment>
1414
{recipes.map((recipe) => (
15-
<Link
16-
href={`/recipes/${recipe.slug}`}
17-
key={recipe.slug}
18-
className="group"
19-
>
20-
<article className="h-full bg-white dark:bg-gray-800 rounded-lg shadow-md hover:shadow-lg transition-all duration-200 p-4 border border-gray-200 dark:border-gray-700">
21-
<h2 className="text-xl font-bold text-gray-900 dark:text-white mb-2 group-hover:text-orange-600 dark:group-hover:text-orange-400 transition-colors">
15+
<article className="mb-4" key={recipe.slug}>
16+
<Link href={`/recipes/${recipe.slug}`}>
17+
<h2 className="text-2xl hover:text-orange-600 dark:hover:text-orange-400 transition-colors">
2218
{recipe.title}
2319
</h2>
24-
{recipe.description && (
25-
<p className="text-gray-600 dark:text-gray-300 text-sm leading-relaxed">
26-
{recipe.description}
27-
</p>
28-
)}
29-
</article>
30-
</Link>
20+
</Link>
21+
{recipe.description && (
22+
<p className="text-gray-600 dark:text-gray-400">
23+
{recipe.description}
24+
</p>
25+
)}
26+
</article>
3127
))}
32-
</div>
28+
</React.Fragment>
3329
)
3430
}
3531

src/tailwind.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
body {
44
font-family: "Source Sans Pro", serif;
5+
@apply bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100 transition-colors;
56
}
67

78
ol.step-list {

0 commit comments

Comments
 (0)