Skip to content

Commit e6965ba

Browse files
committed
Add a lot of stuff
1 parent 060ff49 commit e6965ba

File tree

3 files changed

+81
-3
lines changed

3 files changed

+81
-3
lines changed

app/page.tsx

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import Logo from "@/public/img/logo-foxeddev.png";
66
import Card from "@/components/Card";
77

88
import { SiGithub, SiDiscord } from "react-icons/si";
9+
import { FaClock } from "react-icons/fa";
10+
import Clock from "@/components/Clock";
911

1012
export default function Home() {
1113
const now = new Date();
@@ -18,12 +20,12 @@ export default function Home() {
1820

1921
return (
2022
<div className="flex flex-col justify-end items-center bg-[url(/img/background-arctic-fox.jpg)] bg-cover bg-fixed min-h-screen size-full font-sans text-gray-800 scroll-smooth">
21-
<div className="flex flex-col gap-32 bg-white/75 m-32 mt-128 p-20 w-full max-w-4xl">
23+
<div className="flex flex-col gap-32 bg-white/75 md:m-32 mt-128 md:mt-128 p-4 md:p-20 w-full max-w-4xl">
2224
<section className="flex flex-col items-center gap-16">
2325
<Image src={Logo} alt="" className="-mt-40"></Image>
2426
<div className="flex flex-col items-center gap-2 text-center">
2527
<p className="font-mono text-gray-500 text-4xl">Hi, I&apos;m</p>
26-
<h1 className="font-extrabold text-gray-800 text-9xl">FOXED</h1>
28+
<h1 className="font-extrabold text-gray-800 text-8xl md:text-9xl">FOXED</h1>
2729
<p className="font-mono text-gray-500 text-xl">
2830
I&apos;m a {now.getFullYear() - 2010} year old developer and
2931
designer from Germany.
@@ -126,6 +128,13 @@ export default function Home() {
126128
</p>
127129
</div>
128130
</Card>
131+
<Card>
132+
<Clock hasSeconds showSubtext />
133+
</Card>
134+
<Card>
135+
<FaClock size={48} className="fill-pink-400"></FaClock>
136+
<h3 className="font-medium text-2xl">More stuff coming soon!</h3>
137+
</Card>
129138
</section>
130139
</div>
131140
</div>

components/Card.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export default function Card({
1818

1919
return (
2020
<div
21-
className={`after:bottom-0 after:absolute relative flex flex-col gap-8 col-span-$(cols) bg-white after:bg-sky-300 p-8 ${alignClass}`}
21+
className={`flex flex-col gap-8 col-span-$(cols) bg-white p-8 justify-center ${alignClass}`}
2222
style={{
2323
gridColumnEnd: `span ${cols}`,
2424
gridRowEnd: `span ${rows}`,

components/Clock.tsx

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
"use client";
2+
3+
import { useEffect, useState } from "react";
4+
5+
export default function Clock({
6+
hasSeconds = false,
7+
showSubtext = false,
8+
}: {
9+
hasSeconds?: boolean;
10+
showSubtext?: boolean;
11+
}) {
12+
const getTimeParts = () => {
13+
const now = new Date();
14+
return {
15+
hours: now.getHours().toString().padStart(2, "0"),
16+
minutes: now.getMinutes().toString().padStart(2, "0"),
17+
seconds: now.getSeconds().toString().padStart(2, "0"),
18+
};
19+
};
20+
21+
const [time, setTime] = useState(getTimeParts());
22+
23+
useEffect(() => {
24+
const interval = setInterval(() => {
25+
setTime(getTimeParts());
26+
}, 1000);
27+
return () => clearInterval(interval);
28+
}, []);
29+
30+
return (
31+
<h3 className="flex md:flex-row flex-col gap-4 md:gap-0 font-mono font-bold text-indigo-600 text-5xl">
32+
{/* Hours */}
33+
<span className="relative">
34+
{showSubtext ? (
35+
<small className="-bottom-2.5 absolute text-sm">hours</small>
36+
) : (
37+
""
38+
)}
39+
{time.hours}
40+
</span>
41+
42+
<span className="hidden md:inline">:</span>
43+
44+
{/* Minutes */}
45+
<span className="relative">
46+
{showSubtext && (
47+
<small className="-bottom-2.5 absolute text-sm">minutes</small>
48+
)}
49+
{time.minutes}
50+
</span>
51+
52+
{hasSeconds ? (
53+
<>
54+
<span className="hidden md:inline">:</span>
55+
56+
{/* Seconds */}
57+
<span className="relative">
58+
{showSubtext && (
59+
<small className="-bottom-2.5 absolute text-sm">seconds</small>
60+
)}
61+
{time.seconds}
62+
</span>
63+
</>
64+
) : (
65+
""
66+
)}
67+
</h3>
68+
);
69+
}

0 commit comments

Comments
 (0)