Skip to content

Commit 9aedbcd

Browse files
author
rxyhn
committed
fix: colors
1 parent 9d89129 commit 9aedbcd

21 files changed

+116
-68
lines changed

public/robots.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
User-agent: *
2+
Allow: /
3+
4+
Sitemap: http://localhost:4321/sitemap-index.xml

src/components/BaseHead.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ const { title, description } = Astro.props;
5050
document.addEventListener("astro:before-swap", (e) =>
5151
[
5252
...(e as TransitionBeforeSwapEvent).newDocument.head.querySelectorAll(
53-
'link[as="font"]',
53+
'link[as="font"]'
5454
),
55-
].forEach((link) => link.remove()),
55+
].forEach((link) => link.remove())
5656
);
5757
</script>

src/components/Boxes.tsx

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -46,23 +46,26 @@ export default function Boxes({ className = "" }: GridProps) {
4646
<section className="relative h-screen w-full">
4747
<div
4848
ref={containerRef}
49-
className={`absolute flex h-full w-full justify-center overflow-hidden bg-black ${className}`}
50-
style={{ height: `${dimensions.height}px`, zIndex: -1 }}
49+
className={`absolute flex h-full w-full justify-center overflow-hidden bg-white dark:bg-black ${className}`}
50+
style={{ height: `${dimensions.height}px`, zIndex: 0 }}
5151
>
5252
{/* Left gradient overlay */}
5353
<div className="absolute left-0 top-0 h-full w-1/2">
54-
<div className="absolute inset-0 z-50 bg-gradient-to-tl from-black from-50% via-transparent via-90% to-transparent to-100%" />
55-
<div className="flex h-full w-full flex-col divide-y divide-white/25 border-l border-t border-black">
54+
<div className="absolute inset-0 z-50 bg-gradient-to-tl from-white from-50% via-transparent via-90% to-transparent to-100% dark:from-black" />
55+
<div className="flex h-full w-full flex-col divide-y divide-black/25 border-l border-t border-white dark:divide-white/25 dark:border-black">
5656
{Array.from({ length: rows }).map((_, rowIndex) => (
5757
<div
5858
key={rowIndex}
59-
className="relative flex w-full divide-x divide-white/25"
59+
className="relative flex w-full divide-x divide-black/25 dark:divide-white/25"
6060
style={{ height: `${cellSize}px` }}
6161
>
6262
{Array.from({ length: Math.ceil(columns / 2) }).map(
6363
(_, colIndex) => (
64-
<div key={colIndex} className="relative w-full bg-black">
65-
<div className="absolute inset-0.5 bg-black" />
64+
<div
65+
key={colIndex}
66+
className="relative w-full bg-white dark:bg-black"
67+
>
68+
<div className="absolute inset-0.5 bg-white dark:bg-black" />
6669
</div>
6770
),
6871
)}
@@ -74,17 +77,20 @@ export default function Boxes({ className = "" }: GridProps) {
7477
{/* Right gradient overlay */}
7578
<div className="absolute right-0 top-0 h-full w-1/2">
7679
<div className="absolute inset-0 z-50 bg-gradient-to-tr from-black from-50% via-transparent via-90% to-transparent to-100%" />
77-
<div className="flex h-full w-full flex-col divide-y divide-white/25 border-l border-t border-black">
80+
<div className="flex h-full w-full flex-col divide-y divide-black/25 border-l border-t border-white dark:divide-white/25 dark:border-black">
7881
{Array.from({ length: rows }).map((_, rowIndex) => (
7982
<div
8083
key={rowIndex}
81-
className="relative flex w-full divide-x divide-white/25"
84+
className="relative flex w-full divide-x divide-black/25 dark:divide-white/25"
8285
style={{ height: `${cellSize}px` }}
8386
>
8487
{Array.from({ length: Math.ceil(columns / 2) }).map(
8588
(_, colIndex) => (
86-
<div key={colIndex} className="relative w-full bg-black">
87-
<div className="absolute inset-0.5 bg-black" />
89+
<div
90+
key={colIndex}
91+
className="relative w-full bg-white dark:bg-black"
92+
>
93+
<div className="absolute inset-0.5 bg-white dark:bg-black" />
8894
</div>
8995
),
9096
)}

src/components/Button.astro

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,20 @@ import { Icon } from "astro-icon/components";
44
type Props = {
55
icon: string;
66
href: string;
7+
label: string; // Add a label prop for accessibility
78
};
89
9-
const { icon, href } = Astro.props;
10+
const { icon, href, label } = Astro.props;
1011
---
1112

1213
<a
1314
href={href}
1415
target="_blank"
15-
class="blend group flex w-fit items-center gap-2 rounded border border-neutral-700 px-3 py-2 hover:bg-neutral-800"
16+
class="blend group flex w-fit items-center gap-2 rounded border border-neutral-300 px-3 py-2 hover:bg-neutral-200 dark:border-neutral-700 dark:hover:bg-neutral-800"
17+
aria-label={label}
1618
>
1719
<span
18-
class="blend text-sm capitalize text-neutral-400 group-hover:text-white"
20+
class="blend text-sm capitalize text-neutral-600 group-hover:text-black dark:text-neutral-400 dark:group-hover:text-white"
1921
>
2022
<Icon name={icon} size={20} />
2123
</span>

src/components/Card.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,13 @@ const { url, name, description, highlights, technologies } = Astro.props;
4747
</div>
4848
<div class="mt-2 flex flex-col gap-2">
4949
<p class="text-sm">{description}</p>
50-
<p class="text-sm text-white/50">
50+
<p class="text-sm text-black/50 dark:text-white/50">
5151
{highlights.join(" ")}
5252
</p>
5353
<ul class="flex flex-wrap gap-2">
5454
{
5555
technologies.map((name) => (
56-
<li class="flex items-center gap-1 rounded-md border border-white/25 bg-neutral-800/50 px-2 py-1 text-xs">
56+
<li class="flex items-center gap-1 rounded-md border border-black/25 bg-neutral-200/50 px-2 py-1 text-xs dark:border-white/25 dark:bg-neutral-800/50">
5757
<span>{name}</span>
5858
</li>
5959
))

src/components/Drawer.astro

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
---
2+
import { Icon } from "astro-icon/components";
23
import { LINKS } from "@/consts";
34
import { cn } from "@/lib/utils";
45
const { pathname } = Astro.url;
@@ -7,7 +8,7 @@ const subpath = pathname.match(/[^/]+/g);
78

89
<div
910
id="drawer"
10-
class="fixed inset-0 z-40 flex h-0 flex-col items-center justify-center overflow-hidden bg-black/50 backdrop-blur-md transition-[height] duration-300 ease-in-out md:hidden"
11+
class="fixed inset-0 z-40 flex h-0 flex-col items-center justify-center overflow-hidden bg-neutral-100 transition-[height] duration-300 ease-in-out md:hidden dark:bg-neutral-900"
1112
>
1213
<nav class="flex flex-col items-center space-y-2">
1314
{
@@ -16,12 +17,12 @@ const subpath = pathname.match(/[^/]+/g);
1617
href={LINK.HREF}
1718
class={cn(
1819
"flex items-center justify-center rounded-full px-3 py-1",
19-
"text-current hover:text-white",
20-
"hover:bg-white/20",
20+
"text-current hover:text-black dark:hover:text-white",
21+
"hover:bg-black/5 dark:hover:bg-white/20",
2122
"transition-colors duration-300 ease-in-out",
2223
pathname === LINK.HREF || "/" + subpath?.[0] === LINK.HREF
23-
? "pointer-events-none bg-white text-black"
24-
: "",
24+
? "pointer-events-none bg-black text-white dark:bg-white dark:text-black"
25+
: ""
2526
)}
2627
>
2728
{LINK.TEXT}

src/components/ExpandButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export default function ExpandButton({ children }: ExpandButtonProps) {
1919
</div>
2020
<button
2121
onClick={() => setExpanded(!expanded)}
22-
className="group/more flex w-fit cursor-pointer items-center justify-center gap-1.5 text-xs underline transition-all hover:text-white"
22+
className="group/more flex w-fit cursor-pointer items-center justify-center gap-1.5 text-xs underline transition-all hover:text-black dark:hover:text-white"
2323
>
2424
<span>{expanded ? "Show less" : "Show more"}</span>
2525
<svg

src/components/Footer.astro

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@ import { SITE } from "@/consts";
33
import Container from "@/components/Container.astro";
44
---
55

6-
<footer class="relative bg-black">
7-
<section class="overflow-hidden border-t border-white/25 py-3">
6+
<footer class="relative bg-white dark:bg-black">
7+
<section
8+
class="overflow-hidden border-t border-black/25 py-3 dark:border-white/25"
9+
>
810
<Container size="md">
911
<div class="flex h-full items-center justify-center">
1012
<p class="text-center text-sm">

src/components/Header.astro

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
---
2+
import Container from "@/components/Container.astro";
3+
import { Icon } from "astro-icon/components";
24
import { SITE, LINKS } from "@/consts";
35
import { cn } from "@/lib/utils";
46
const { pathname } = Astro.url;
57
const subpath = pathname.match(/[^/]+/g);
6-
import Container from "@/components/Container.astro";
78
---
89

910
<header id="header" class="fixed top-0 z-50 h-16 w-full">
1011
<Container size="md">
1112
<div class="relative h-full w-full">
1213
<div
13-
class="absolute left-0 top-1/2 flex -translate-y-1/2 gap-1 font-bold"
14+
class="absolute left-0 top-1/2 flex -translate-y-1/2 gap-1 font-semibold"
1415
>
1516
<a
1617
href="/"
17-
class="flex gap-1 text-current transition-colors duration-300 ease-in-out hover:text-white"
18+
class="flex gap-1 text-current transition-colors duration-300 ease-in-out hover:text-black dark:hover:text-white"
1819
>
1920
<div class="font-bold uppercase">
2021
{SITE.TITLE}
@@ -33,8 +34,8 @@ import Container from "@/components/Container.astro";
3334
"flex items-center justify-center",
3435
"transition-colors duration-300 ease-in-out",
3536
pathname === LINK.HREF || "/" + subpath?.[0] === LINK.HREF
36-
? "bg-white text-black"
37-
: "hover:bg-white/20 hover:text-white",
37+
? "bg-black text-white dark:bg-white dark:text-black"
38+
: "hover:bg-black/5 hover:text-black dark:hover:bg-white/20 dark:hover:text-white"
3839
)}
3940
>
4041
{LINK.TEXT}
@@ -43,17 +44,18 @@ import Container from "@/components/Container.astro";
4344
}
4445
</nav>
4546
</div>
47+
4648
<div class="buttons absolute right-0 top-1/2 flex -translate-y-1/2 gap-1">
4749
<button
4850
id="header-drawer-button"
4951
aria-label={`Toggle drawer open and closed`}
5052
class={cn(
5153
"flex md:hidden",
5254
"size-9 rounded-full p-2 items-center justify-center",
53-
"bg-transparent hover:bg-white/20",
54-
"stroke-current hover:stroke-white",
55-
"border border-white/25",
56-
"transition-colors duration-300 ease-in-out",
55+
"bg-transparent hover:bg-black/5 dark:hover:bg-white/20",
56+
"stroke-current hover:stroke-black hover:dark:stroke-white",
57+
"border border-black/10 dark:border-white/25",
58+
"transition-colors duration-300 ease-in-out"
5759
)}
5860
>
5961
<svg

src/components/Heading.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const { title, description, highlight } = Astro.props;
1111
<header class="flex flex-col items-center gap-4 text-center">
1212
<div>
1313
<h1
14-
class="bg-opacity-50 bg-gradient-to-b from-neutral-50 to-neutral-400 bg-clip-text text-4xl font-bold tracking-tight text-transparent lg:text-5xl"
14+
class="bg-opacity-50 bg-gradient-to-b from-neutral-900 to-neutral-600 bg-clip-text text-4xl font-bold tracking-tight text-transparent lg:text-5xl dark:from-neutral-50 dark:to-neutral-400"
1515
>
1616
{title}.
1717
</h1>

0 commit comments

Comments
 (0)