Skip to content

Commit 233d724

Browse files
committed
feat: New Logo
1 parent c69e826 commit 233d724

File tree

6 files changed

+165
-57
lines changed

6 files changed

+165
-57
lines changed

public/assets/logo-dark.svg

Lines changed: 49 additions & 0 deletions
Loading

public/assets/logo-light.svg

Lines changed: 49 additions & 0 deletions
Loading

public/assets/photo.png

-29.2 KB
Binary file not shown.

src/components/Logo.tsx

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
"use client";
2+
3+
import { motion } from "framer-motion";
4+
5+
interface PhotoCircleProps {
6+
lightSrc: string;
7+
darkSrc: string;
8+
alt: string;
9+
sizeClasses?: string;
10+
}
11+
12+
export default function Logo({
13+
lightSrc,
14+
darkSrc,
15+
alt,
16+
sizeClasses = "w-72 h-72 xl:w-96 xl:h-96",
17+
}: PhotoCircleProps) {
18+
return (
19+
<div className={`relative ${sizeClasses}`}>
20+
<div className="h-full w-full">
21+
<img
22+
src={lightSrc}
23+
alt={alt}
24+
className="block h-full w-full rounded-full object-cover dark:hidden"
25+
/>
26+
<img
27+
src={darkSrc}
28+
alt={alt}
29+
className="hidden h-full w-full rounded-full object-cover dark:block"
30+
/>
31+
</div>
32+
<motion.svg
33+
className="absolute left-1/2 top-1/2 h-[calc(100%+1rem)] w-[calc(100%+1rem)] -translate-x-1/2 -translate-y-1/2"
34+
fill="transparent"
35+
viewBox="0 0 506 506"
36+
xmlns="http://www.w3.org/2000/svg"
37+
>
38+
<motion.circle
39+
cx="253"
40+
cy="253"
41+
r="250"
42+
stroke="currentColor"
43+
strokeWidth="4"
44+
strokeLinecap="round"
45+
strokeLinejoin="round"
46+
initial={{ strokeDasharray: "24 10 0 0" }}
47+
animate={{
48+
strokeDasharray: ["15 120 25 25", "16 25 92 72", "4 250 22 22"],
49+
rotate: [120, 360],
50+
}}
51+
transition={{
52+
duration: 20,
53+
repeat: Infinity,
54+
repeatType: "reverse",
55+
}}
56+
/>
57+
</motion.svg>
58+
</div>
59+
);
60+
}

src/components/Photo.tsx

Lines changed: 0 additions & 53 deletions
This file was deleted.

src/pages/index.astro

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
import Button from "@/components/Button.astro";
3-
import Photo from "@/components/Photo";
3+
import Logo from "@/components/Logo.tsx";
44
import BaseLayout from "@/layouts/BaseLayout.astro";
55
import { SITE } from "@/consts";
66
import { basics } from "@cv";
@@ -12,7 +12,6 @@ const { name, label, summary, socials } = basics;
1212
<div class="flex h-full items-center justify-center">
1313
<div class="container mx-auto my-24 xl:my-0">
1414
<div class="flex flex-col items-center justify-between xl:flex-row">
15-
<!-- Text Section -->
1615
<div class="order-2 text-center xl:order-none xl:text-left">
1716
<span class="text-xl">Hi, my name is</span>
1817
<h1 class="mb-6">
@@ -40,9 +39,13 @@ const { name, label, summary, socials } = basics;
4039
}
4140
</div>
4241
</div>
43-
<!-- Photo Section -->
4442
<div class="order-1 mb-8 xl:order-none xl:mb-0">
45-
<Photo client:load imageSrc="/assets/photo.png" imageAlt={name} />
43+
<Logo
44+
client:load
45+
lightSrc="/assets/logo-light.svg"
46+
darkSrc="/assets/logo-dark.svg"
47+
alt={name}
48+
/>
4649
</div>
4750
</div>
4851
</div>

0 commit comments

Comments
 (0)