Skip to content

Commit deb7cba

Browse files
committed
feat: Add a photo of myself
1 parent 63e7f25 commit deb7cba

3 files changed

Lines changed: 60 additions & 22 deletions

File tree

src/assets/photo.jpg

30.6 KB
Loading

src/components/About.astro

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ import ferris from "@/assets/ferris.png";
33
import SpotlightCard from "./react/SpotlightCard";
44
import GlowingHeader from "./react/GlowingHeader";
55
import GlowingText from "./react/GlowingText";
6+
import { Image } from "astro:assets";
7+
import photo from "@/assets/photo.jpg";
8+
import StarBorder from "./react/StarBorder";
9+
import { Icon } from "astro-icon/components";
610
711
const infoLeft: Array<{ header: string; content: string }> = [
812
{
@@ -32,7 +36,6 @@ const infoRight: Array<{ header: string; content: string }> = [
3236
<div class="text-center animate-fade-up mb-20">
3337
<GlowingHeader>About</GlowingHeader>
3438
</div>
35-
3639
<div class="grid grid-cols-1 md:grid-cols-3 gap-4">
3740
<SpotlightCard
3841
client:only="react"
@@ -74,4 +77,35 @@ const infoRight: Array<{ header: string; content: string }> = [
7477
}
7578
</SpotlightCard>
7679
</div>
80+
81+
<div class="flex flex-col items-center justify-center relative">
82+
<SpotlightCard
83+
client:only="react"
84+
className="flex flex-col justify-between aspect-9/16 p-0! w-75"
85+
>
86+
<Image src={photo} alt="Photo" />
87+
<div class="flex flex-col my-5 px-5 cursor-default">
88+
<GlowingText client:only="react">
89+
<span class="text-xl font-bold">Short bio</span>
90+
</GlowingText>
91+
I am a crustacean and I love to eat shrimp. Hell yeah long life to
92+
Ferris! Let us feed the Rust community with amazing content.
93+
</div>
94+
<div class="w-full flex justify-end items-end px-3 mb-5">
95+
<a
96+
target="_blank"
97+
href="https://paypal.me/etherbeing"
98+
class="w-full cursor-pointer"
99+
>
100+
<StarBorder
101+
client:only="react"
102+
className="flex flex-row gap-3 justify-center items-center w-full"
103+
>
104+
<span class="font-bold text-sm">Buy me a coffee</span>
105+
<Icon name="simple-icons:buymeacoffee" />
106+
</StarBorder>
107+
</a>
108+
</div>
109+
</SpotlightCard>
110+
</div>
77111
</section>

src/components/react/StarBorder.tsx

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,58 @@
1-
import React from 'react';
1+
import React from "react";
22

3-
type StarBorderProps<T extends React.ElementType> = React.ComponentPropsWithoutRef<T> & {
4-
as?: T;
5-
className?: string;
6-
children?: React.ReactNode;
7-
color?: string;
8-
speed?: React.CSSProperties['animationDuration'];
9-
thickness?: number;
10-
};
3+
type StarBorderProps<T extends React.ElementType> =
4+
React.ComponentPropsWithoutRef<T> & {
5+
as?: T;
6+
className?: string;
7+
children?: React.ReactNode;
8+
color?: string;
9+
speed?: React.CSSProperties["animationDuration"];
10+
thickness?: number;
11+
};
1112

12-
const StarBorder = <T extends React.ElementType = 'button'>({
13+
const StarBorder = <T extends React.ElementType = "button">({
1314
as,
14-
className = '',
15-
color = 'white',
16-
speed = '6s',
15+
className = "",
16+
color = "white",
17+
speed = "6s",
1718
thickness = 1,
1819
children,
1920
...rest
2021
}: StarBorderProps<T>) => {
21-
const Component = as || 'button';
22+
const Component = as || "button";
2223

2324
return (
2425
<Component
25-
className={`relative inline-block overflow-hidden shadow ${className}`}
26+
className={`relative overflow-hidden inline-block shadow ${className}`}
2627
{...(rest as any)}
2728
style={{
2829
padding: `${thickness}px 0`,
29-
...(rest as any).style
30+
...(rest as any).style,
3031
}}
3132
>
3233
<div
33-
className="absolute w-[300%] h-[50%] opacity-70 bottom-[-11px] right-[-250%] rounded-full animate-star-movement-bottom z-0"
34+
className={
35+
"absolute w-[300%] h-[50%] opacity-70 bottom-[-11px] right-[-250%] rounded-full animate-star-movement-bottom z-0"
36+
}
3437
style={{
3538
background: `radial-gradient(circle, ${color}, transparent 10%)`,
36-
animationDuration: speed
39+
animationDuration: speed,
3740
}}
3841
></div>
3942
<div
4043
className="absolute w-[300%] h-[50%] opacity-70 -top-2.5 left-[-250%] rounded-full animate-star-movement-top z-0"
4144
style={{
4245
background: `radial-gradient(circle, ${color}, transparent 10%)`,
43-
animationDuration: speed
46+
animationDuration: speed,
4447
}}
4548
></div>
46-
<div className="relative z-1 bg-linear-to-b from-black to-gray-900 border border-gray-800 text-white text-center text-[16px] py-4 px-[26px] rounded">
49+
<div
50+
className={`relative z-1 bg-linear-to-b from-black to-gray-900 border border-gray-800 text-white text-center text-[16px] py-4 px-[26px] rounded ${className}`}
51+
>
4752
{children}
4853
</div>
4954
</Component>
5055
);
5156
};
5257

5358
export default StarBorder;
54-

0 commit comments

Comments
 (0)