Skip to content

Commit bba57c5

Browse files
committed
feat(): Adding the sections
1 parent 8da5ef0 commit bba57c5

36 files changed

Lines changed: 675 additions & 355 deletions

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
"react-dom": "^18.2.0",
5252
"react-helmet-async": "^2.0.5",
5353
"react-i18next": "^14.1.1",
54+
"react-player": "^2.16.0",
5455
"react-router-dom": "^6.23.1",
5556
"react-scripts": "5.0.1",
5657
"react-social-icons": "^6.16.0",
13.1 MB
Binary file not shown.
271 KB
Loading
216 KB
Loading
192 KB
Loading

src/components/3dPin/3dPin.tsx

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
'use client';
2-
import React, { useRef, useState } from 'react';
2+
import React, { useState } from 'react';
33
import { motion } from 'framer-motion';
4-
import { useCursor } from '../Cursor';
54
import { Box, Link } from '@chakra-ui/react';
65

76
const ThreeDPin = ({
@@ -25,12 +24,10 @@ const ThreeDPin = ({
2524
};
2625

2726
return (
28-
<Link
27+
<Box
2928
className={'relative group/pin z-50 cursor-pointer'}
3029
onMouseEnter={onMouseEnter}
3130
onMouseLeave={onMouseLeave}
32-
href={href}
33-
isExternal
3431
>
3532
<div
3633
style={{
@@ -49,29 +46,25 @@ const ThreeDPin = ({
4946
</div>
5047
</div>
5148
<PinPerspective title={title} href={href} />
52-
</Link>
49+
</Box>
5350
);
5451
};
5552

5653
const PinPerspective = ({ title, href }: { title?: string; href?: string }) => {
5754
return (
58-
<motion.div className="pointer-events-none w-96 h-96 flex items-center justify-center opacity-0 group-hover/pin:opacity-100 z-[60] transition duration-500">
55+
<motion.div className="w-96 h-96 flex items-center justify-center opacity-0 group-hover/pin:opacity-100 z-[102] transition duration-500">
5956
<div className=" w-full h-full -mt-7 flex-none inset-0">
6057
<div className="absolute top-0 inset-x-0 flex justify-center">
61-
<a
58+
<Link
6259
href={href}
6360
className="relative flex space-x-2 items-center z-10 rounded-full bg-zinc-950 py-0.5 px-4 ring-1 ring-white/10 "
64-
target="_blank"
65-
rel="noopener noreferrer"
66-
onClick={() => {
67-
console.log('onClick');
68-
}}
61+
isExternal
6962
>
70-
<span className="relative z-20 text-white text-xs font-bold inline-block py-0.5">
63+
<span className="relative z-103 text-white text-xs font-bold inline-block py-0.5">
7164
{title}
7265
</span>
7366
<span className="absolute -bottom-0 left-[1.125rem] h-px w-[calc(100%-2.25rem)] bg-gradient-to-r from-emerald-400/0 via-violet-400/90 to-emerald-400/0 transition-opacity duration-500 group-hover/btn:opacity-40"></span>
74-
</a>
67+
</Link>
7568
</div>
7669
<div
7770
style={{
@@ -143,7 +136,6 @@ const PinPerspective = ({ title, href }: { title?: string; href?: string }) => {
143136
></motion.div>
144137
</>
145138
</div>
146-
147139
<>
148140
<motion.div className="absolute right-1/2 bottom-1/2 bg-gradient-to-b from-transparent to-cyan-500 translate-y-[14px] w-px h-20 group-hover/pin:h-40 blur-[2px]" />
149141
<motion.div className="absolute right-1/2 bottom-1/2 bg-gradient-to-b from-transparent to-cyan-500 translate-y-[14px] w-px h-20 group-hover/pin:h-40 " />

src/components/CardComponent/CardExport.tsx

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ import { useRef } from 'react';
22
import { useCursor } from '../Cursor';
33
import { CardBasic, Icon } from './Card';
44
import { CardExportProps } from './types';
5+
import { Wrap } from '@chakra-ui/react';
56

6-
const Card = ({ titleText, chipText, centerText }: CardExportProps) => {
7+
const Card = ({ titleText, chips: chipText, centerText }: CardExportProps) => {
78
const ref = useRef<HTMLDivElement>(null);
89
const { setCursorInsets } = useCursor();
910
return (
@@ -18,7 +19,7 @@ const Card = ({ titleText, chipText, centerText }: CardExportProps) => {
1819
})
1920
}
2021
onMouseLeave={() => setCursorInsets(undefined)}
21-
className="border border-black/[0.2] dark:border-white/[0.2] flex flex-col items-start max-w-sm mx-auto p-4 relative h-[30rem]"
22+
className="border border-black/[0.2] dark:border-white/[0.2] flex flex-col items-start max-w-sm p-4 relative h-[30rem]"
2223
>
2324
<CardBasic text={centerText} />
2425
<Icon className="absolute h-6 w-6 -top-3 -left-3 dark:text-white text-black" />
@@ -28,9 +29,16 @@ const Card = ({ titleText, chipText, centerText }: CardExportProps) => {
2829
<h2 className="dark:text-white text-black mt-4 text-md font-light">
2930
{titleText}
3031
</h2>
31-
<p className="text-sm border font-light dark:border-white/[0.2] border-black/[0.2] rounded-full mt-4 text-black dark:text-white px-2 py-0.5">
32-
{chipText}
33-
</p>
32+
<Wrap mt={2}>
33+
{chipText?.map((chipText) => (
34+
<p
35+
key={chipText}
36+
className="text-sm border font-light dark:border-white/[0.2] border-black/[0.2] rounded-full text-black dark:text-white px-1 "
37+
>
38+
{chipText}
39+
</p>
40+
))}
41+
</Wrap>
3442
</div>
3543
);
3644
};

src/components/CardComponent/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ export type CardExportProps = {
22
centerText?: string;
33
titleText?: string;
44
subtitleText?: string;
5-
chipText?: string;
5+
chips?: string[];
66
};
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
import { useScroll, useTransform, motion } from 'framer-motion';
2+
import { useEffect, useRef, useState } from 'react';
3+
import { TimelineEntry } from './types';
4+
5+
const Timeline = ({ data }: { data: TimelineEntry[] }) => {
6+
const ref = useRef<HTMLDivElement>(null);
7+
const containerRef = useRef<HTMLDivElement>(null);
8+
const [height, setHeight] = useState(0);
9+
10+
useEffect(() => {
11+
if (ref.current) {
12+
const rect = ref.current.getBoundingClientRect();
13+
setHeight(rect.height);
14+
}
15+
}, [ref]);
16+
17+
const { scrollYProgress } = useScroll({
18+
target: containerRef,
19+
offset: ['start 10%', 'end 50%'],
20+
});
21+
22+
const heightTransform = useTransform(scrollYProgress, [0, 1], [0, height]);
23+
const opacityTransform = useTransform(scrollYProgress, [0, 0.1], [0, 1]);
24+
25+
return (
26+
<div
27+
className="w-full bg-white dark:bg-neutral-950 font-sans md:px-10"
28+
ref={containerRef}
29+
>
30+
<div className="max-w-7xl mx-auto py-20 px-4 md:px-8 lg:px-10">
31+
<h2 className="text-lg md:text-4xl mb-4 text-black dark:text-white max-w-4xl">
32+
Changelog from my journey
33+
</h2>
34+
<p className="text-neutral-700 dark:text-neutral-300 text-sm md:text-base max-w-sm">
35+
I&apos;ve been working on Aceternity for the past 2 years. Here&apos;s
36+
a timeline of my journey.
37+
</p>
38+
</div>
39+
40+
<div ref={ref} className="relative max-w-7xl mx-auto pb-20">
41+
{data.map((item, index) => (
42+
<div
43+
key={index}
44+
className="flex justify-start pt-10 md:pt-40 md:gap-10"
45+
>
46+
<div className="sticky flex flex-col md:flex-row z-40 items-center top-40 self-start max-w-xs lg:max-w-sm md:w-full">
47+
<div className="h-10 absolute left-3 md:left-3 w-10 rounded-full bg-white dark:bg-black flex items-center justify-center">
48+
<div className="h-4 w-4 rounded-full bg-neutral-200 dark:bg-neutral-800 border border-neutral-300 dark:border-neutral-700 p-2" />
49+
</div>
50+
<h3 className="hidden md:block text-xl md:pl-20 md:text-5xl font-bold text-neutral-500 dark:text-neutral-500 ">
51+
{item.title}
52+
</h3>
53+
</div>
54+
55+
<div className="relative pl-20 pr-4 md:pl-4 w-full">
56+
<h3 className="md:hidden block text-2xl mb-4 text-left font-bold text-neutral-500 dark:text-neutral-500">
57+
{item.title}
58+
</h3>
59+
{item.content}{' '}
60+
</div>
61+
</div>
62+
))}
63+
<div
64+
style={{
65+
height: height + 'px',
66+
}}
67+
className="absolute md:left-8 left-8 top-0 overflow-hidden w-[2px] bg-[linear-gradient(to_bottom,var(--tw-gradient-stops))] from-transparent from-[0%] via-neutral-200 dark:via-neutral-700 to-transparent to-[99%] [mask-image:linear-gradient(to_bottom,transparent_0%,black_10%,black_90%,transparent_100%)] "
68+
>
69+
<motion.div
70+
style={{
71+
height: heightTransform,
72+
opacity: opacityTransform,
73+
}}
74+
className="absolute inset-x-0 top-0 w-[2px] bg-gradient-to-t from-purple-500 via-blue-500 to-transparent from-[0%] via-[10%] rounded-full"
75+
/>
76+
</div>
77+
</div>
78+
</div>
79+
);
80+
};
81+
82+
export default Timeline;

src/components/Timeline/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export { default as Timeline } from './Timeline';
2+
export * from './Timeline';

0 commit comments

Comments
 (0)