Skip to content

Commit 2c7ba20

Browse files
committed
fixed the timeline issue
1 parent b374aaf commit 2c7ba20

File tree

2 files changed

+25
-8
lines changed

2 files changed

+25
-8
lines changed

pages/about.tsx

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { LuExternalLink } from "react-icons/lu";
77
import { motion, AnimatePresence, PanInfo } from 'framer-motion';
88
import { useState, useEffect } from 'react';
99
import { BsArrowLeftCircle, BsArrowRightCircle } from 'react-icons/bs';
10+
import { BsStackOverflow } from "react-icons/bs";
1011

1112
import Container from 'components/Container';
1213
import avatar from 'public/headshot-dev.jpg';
@@ -144,6 +145,9 @@ export default function About() {
144145
<Link href="https://www.linkedin.com/in/idevprakaash" className="p-1.5 bg-gray-100 dark:bg-gray-800 rounded-lg hover:bg-gray-200 dark:hover:bg-gray-700 transition-all">
145146
<FaLinkedin className="w-4 h-4 text-[#0077b5]" />
146147
</Link>
148+
<Link href="https://stackoverflow.com/users/13662843/codewithdev" className="p-1.5 bg-gray-100 dark:bg-gray-800 rounded-lg hover:bg-gray-200 dark:hover:bg-gray-700 transition-all">
149+
<BsStackOverflow className='w-4 h-4 text-[#0077b5]'/>
150+
</Link>
147151
</div>
148152
<p>Technical Writer and Open Source Developer</p>
149153
<h3 className="mb-1">Work Experience</h3>
@@ -180,21 +184,34 @@ export default function About() {
180184
key={index}
181185
initial={false}
182186
animate={{
183-
scale: offset === 0 ? 1 : 0.8,
184-
x: offset * (windowWidth < 768 ? 160 : 260),
185-
opacity: 1 - Math.abs(offset) * 0.3,
186-
zIndex: 2 - Math.abs(offset)
187+
scale: offset === 0 ? 1 : 0.6,
188+
x: offset * (windowWidth < 768 ? 120 : 260),
189+
opacity: offset === 0 ? 1 : 0.15,
190+
zIndex: offset === 0 ? 2 : 0,
191+
filter: offset === 0 ? 'blur(0px)' : 'blur(4px)',
187192
}}
188193
transition={{
189-
duration: 0.5
194+
duration: 0.5,
195+
ease: "easeInOut"
190196
}}
191197
drag="x"
192198
dragConstraints={{ left: 0, right: 0 }}
193199
dragElastic={1}
194200
onDragEnd={handleDragEnd}
195-
className="absolute w-[90vw] sm:w-full max-w-[300px]"
201+
className={`absolute w-[90vw] sm:w-full max-w-[300px] ${
202+
offset === 0
203+
? 'pointer-events-auto backdrop-blur-none'
204+
: 'pointer-events-none backdrop-blur-sm'
205+
}`}
196206
>
197-
<div className={`${timeline[index].bgColor} p-3 md:p-4 rounded-lg shadow-sm dark:border dark:border-gray-700 transition-colors duration-300 relative overflow-hidden`}>
207+
<div className={`${timeline[index].bgColor} p-3 md:p-4 rounded-lg
208+
dark:border dark:border-gray-700 transition-colors duration-300
209+
relative overflow-hidden ${
210+
offset === 0
211+
? 'shadow-lg ring-1 ring-gray-900/5 dark:ring-white/10'
212+
: 'shadow-none opacity-50'
213+
}`}
214+
>
198215
<div className="flex flex-col items-start space-y-0.5">
199216
<span className="text-xs text-gray-500 dark:text-gray-400">{timeline[index].period}</span>
200217
<h4 className="text-base text-gray-900 dark:text-white">{timeline[index].company}</h4>

pages/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export default function Home() {
5757
<div className="bg-white dark:bg-gray-900 rounded-lg px-4 py-3 shadow-sm border border-gray-200 dark:border-gray-800">
5858
<div className="flex items-center justify-between">
5959
<div className="flex items-center space-x-2">
60-
<svg className="w-5 h-5 text-gray-500" fill="none" stroke="currentColor" viewBox="0 0 24 24">
60+
<svg className="w-5 h-5 text-[#F48024]" fill="none" stroke="currentColor" viewBox="0 0 24 24">
6161
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z" />
6262
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M15 11a3 3 0 11-6 0 3 3 0 016 0z" />
6363
</svg>

0 commit comments

Comments
 (0)