Skip to content

Commit f72598e

Browse files
committed
Refactor card component and styles; update metadata and improve selection styling
1 parent 1eabaa5 commit f72598e

File tree

5 files changed

+64
-84
lines changed

5 files changed

+64
-84
lines changed

app/globals.css

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,19 @@ body {
5252
-moz-osx-font-smoothing: grayscale;
5353
}
5454

55+
::selection {
56+
background-color: var(--secondary);
57+
}
58+
5559
a {
5660
color: var(--primary);
5761
}
5862

63+
a:not(p a) {
64+
color: var(--text);
65+
text-decoration: none;
66+
}
67+
5968
img {
6069
object-fit: cover;
6170
width: 100%;
@@ -85,14 +94,9 @@ h3 {
8594
font-weight: 500;
8695
}
8796

88-
h3 a {
89-
text-decoration: none;
90-
}
91-
9297
mark {
9398
color: var(--primary);
9499
background-color: transparent;
95-
cursor: copy;
96100
}
97101

98102
p {

app/layout.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ const spaceMono = Space_Mono({
2020

2121
export const metadata: Metadata = {
2222
metadataBase: new URL("https://foxeddev.github.io"),
23-
title: { default: "Hi, I'm Foxed.", template: "%s | FoxedDev" },
24-
description: "I'm a 15 year old developer and designer from Germany.",
23+
title: { default: "Hi, I'm Foxed!", template: "%s | FoxedDev" },
24+
description: "I'm a Minecraft data pack creator and web developer from Germany.",
2525
openGraph: {
2626
type: "website",
2727
url: "https://foxeddev.github.io",
28-
title: "Hi, I'm Foxed.",
29-
description: "I'm a 15 year old developer and designer from Germany.",
28+
title: "Hi, I'm Foxed!",
29+
description: "I'm a Minecraft data pack creator and web developer from Germany.",
3030
siteName: "FoxedDev",
3131
images: [{ url: "https://foxeddev.github.io/img/logo.png" }],
3232
},

app/page.tsx

Lines changed: 42 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import Link from "next/link";
44
import Image from "next/image";
55
import Logo from "@/components/Logo";
6-
import Card from "@/components/Card";
76
import { SiGithub, SiDiscord, SiGmail } from "react-icons/si";
87
import { FaClock } from "react-icons/fa";
98
import FoxFaceplant from "@/public/img/fox_faceplant.gif";
@@ -12,10 +11,9 @@ import Footer from "@/components/Footer";
1211
import toast from "react-hot-toast";
1312
import headerIconStyles from "@/styles/headerIcon.module.css";
1413
import titleStyles from "@/styles/title.module.css";
14+
import cardStyles from "@/styles/card.module.css";
1515

1616
export default function Home() {
17-
const now = new Date();
18-
1917
const copy = (text: string) => {
2018
navigator.clipboard.writeText(text);
2119
toast("Copied to clipboard!", {
@@ -32,50 +30,63 @@ export default function Home() {
3230
<p className={titleStyles.tagline}>Hi, I&apos;m</p>
3331
<h1>FOXED</h1>
3432
<p className={titleStyles.subtitle}>
35-
I&apos;m a {now.getFullYear() - 2010} year old developer and
36-
designer from Germany.
33+
I&apos;m a Minecraft data pack creator and web developer from
34+
Germany.
3735
</p>
3836
</div>
3937
</section>
4038
</header>
4139
<main>
4240
<section className="grid">
43-
<Card>
41+
<Link
42+
className={cardStyles.card}
43+
href={"https://github.com/foxeddev"}
44+
target="_blank"
45+
>
4446
<SiGithub />
4547
<h3>
46-
GitHub:{" "}
47-
<Link href={"https://github.com/foxeddev"} target="_blank">
48-
FoxedDev
49-
</Link>
48+
GitHub: <mark>FoxedDev</mark>
5049
</h3>
51-
</Card>
52-
<Card>
50+
</Link>
51+
<div
52+
className={cardStyles.card}
53+
style={{ cursor: "pointer" }}
54+
onClick={() => copy("foxeddev")}
55+
>
5356
<SiDiscord />
5457
<h3>
55-
Discord: <mark onClick={() => copy("foxeddev")}>FoxedDev</mark>
58+
Discord: <mark>FoxedDev</mark>
5659
</h3>
57-
</Card>
58-
<Card rows={2} noPad>
59-
<Image src={FoxFaceplant} alt={""} unoptimized />
60-
</Card>
61-
<Card>
60+
</div>
61+
<Image
62+
className={cardStyles.card}
63+
src={FoxFaceplant}
64+
alt={""}
65+
style={{ gridRowEnd: `span 2` }}
66+
unoptimized
67+
/>
68+
<Link
69+
className={cardStyles.card}
70+
href={"mailto:foxed.dev@gmail.com"}
71+
target="_blank"
72+
>
6273
<SiGmail />
6374
<h3>
64-
Mail:{" "}
65-
<Link href={"mailto:foxed.dev@gmail.com"} target="_blank">
66-
foxed.dev@gmail.com
67-
</Link>
75+
Mail: <mark>foxed.dev@gmail.com</mark>
6876
</h3>
69-
</Card>
70-
<Card align="left">
77+
</Link>
78+
<div className={`${cardStyles.card} ${cardStyles.left}`}>
7179
<h3>🌱 I&apos;m currently learning</h3>
7280
<p>
7381
React <br />
7482
NextJS <br />
7583
TailwindCSS <br />
7684
</p>
77-
</Card>
78-
<Card cols={2} align="left">
85+
</div>
86+
<div
87+
className={`${cardStyles.card} ${cardStyles.left}`}
88+
style={{ gridColumnEnd: `span 2` }}
89+
>
7990
<h3>💻 Tech Stack</h3>
8091
<p>
8192
OS:{" "}
@@ -107,14 +118,14 @@ export default function Home() {
107118
Prism Launcher
108119
</Link>
109120
</p>
110-
</Card>
111-
<Card>
121+
</div>
122+
<div className={cardStyles.card}>
112123
<Clock showSeconds showSubtext />
113-
</Card>
114-
<Card>
124+
</div>
125+
<div className={cardStyles.card}>
115126
<FaClock />
116127
<h3>More stuff coming soon!</h3>
117-
</Card>
128+
</div>
118129
</section>
119130
</main>
120131
<Footer />

components/Card.tsx

Lines changed: 0 additions & 36 deletions
This file was deleted.
Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,22 @@
22
display: flex;
33
flex-direction: column;
44
justify-content: center;
5+
background-color: var(--bg);
6+
text-align: center;
7+
align-items: center;
8+
}
9+
10+
.card:has(*) {
511
gap: 32px;
612
padding: 32px;
7-
background-color: var(--bg);
813
}
914

1015
@media screen and (max-width: 900px) {
1116
.card {
1217
gap: 16px;
1318
}
1419
}
20+
1521
.card svg:nth-child(1) {
1622
fill: var(--accent);
1723
width: 48px;
@@ -20,15 +26,10 @@
2026

2127
.card.left {
2228
text-align: left;
23-
align-items: left;
29+
align-items: start;
2430
}
2531

2632
.card.right {
2733
text-align: right;
28-
align-items: right;
29-
}
30-
31-
.card.center {
32-
text-align: center;
33-
align-items: center;
34+
align-items: end;
3435
}

0 commit comments

Comments
 (0)