Skip to content

Commit 4c6aa1e

Browse files
committed
Implement dark mode
1 parent e3ba6d7 commit 4c6aa1e

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

app/[locale]/layout/locale-switcher-inner.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ function LocaleHighlighter() {
3434

3535
return (
3636
<span className="pointer-events-none absolute inset-1/2 align-middle">
37-
<span className="absolute -left-5 -top-5 h-10 w-10 rounded-full bg-blue-400 opacity-25 group-visited:bg-purple-400 group-hover:bg-red-400 group-active:bg-red-400" />
37+
<span className="absolute -left-5 -top-5 h-10 w-10 rounded-full bg-blue-400 opacity-25 group-visited:bg-violet-400 group-hover:bg-red-400 group-active:bg-red-400 dark:group-visited:bg-violet-300" />
3838
</span>
3939
);
4040
}

app/[locale]/photos/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ function PhotoSample({ alt }: { alt: string }) {
1616
alt={alt}
1717
src="https://farm8.staticflickr.com/7247/7511763574_d528f4ce04_z_d.jpg"
1818
/>
19-
<span className="absolute right-[1.5rem] bottom-[.5rem] h-0 w-0 origin-bottom-left -rotate-90 overflow-visible whitespace-nowrap text-sm text-white opacity-80 shadow-md drop-shadow-md">
19+
<span className="absolute right-[1.5rem] bottom-[.5rem] h-0 w-0 origin-bottom-left -rotate-90 overflow-visible whitespace-nowrap text-sm !text-white opacity-80 shadow-md drop-shadow-md">
2020
kachkaev.ru/photos
2121
</span>
2222
<span className="absolute inset-x-0 bottom-0 block group-hover:border-t-2 group-hover:border-t-red-500" />

app/[locale]/styles.css

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
@layer base {
66
html {
7-
@apply h-full w-full;
7+
@apply h-full w-full dark:bg-zinc-900 dark:text-gray-100;
88
font: 14px Helvetica, Arial, "Lucida Grande", sans-serif;
99
line-height: 1.4em;
1010
}
@@ -30,16 +30,15 @@
3030
}
3131

3232
a {
33-
@apply border-b-[1px] border-b-blue-600/20 text-blue-600 no-underline;
34-
}
35-
a:visited {
36-
@apply border-b-violet-800/20 text-violet-800;
33+
@apply border-b-[1px] border-b-blue-600/20 text-blue-600 no-underline dark:border-b-blue-400/20 dark:text-blue-400;
3734
}
35+
a:visited,
3836
a:visited > * {
39-
@apply border-b-violet-800/20 text-violet-800;
37+
@apply border-b-violet-800/20 text-violet-800 dark:border-b-violet-400/20 dark:text-violet-400;
4038
}
41-
a:hover {
42-
@apply border-b-red-600/30 text-red-600;
39+
a:hover,
40+
a:hover > * {
41+
@apply border-b-red-600/30 text-red-600 dark:border-b-red-500/30 dark:text-red-500;
4342
}
4443

4544
p {

0 commit comments

Comments
 (0)