Skip to content

Commit 5f40526

Browse files
Improved the data and SOMe of the UI of mltiple components.
1 parent 7be8443 commit 5f40526

File tree

13 files changed

+640
-176
lines changed

13 files changed

+640
-176
lines changed

TODO.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# TODO: Improve Mobile Navbar UX
2+
3+
- [x] Step 1: Add smooth animations for menu open/close transitions.
4+
- [x] Step 2: Improve button styling with better visual feedback (hover, active states).
5+
- [x] Step 3: Add overlay background when menu is open for better focus.
6+
- [x] Step 4: Enhance accessibility with better focus management.
7+
- [x] Step 5: Add swipe gestures or better touch interactions if needed.

package-lock.json

Lines changed: 89 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,21 @@
1313
"preview": "vite preview"
1414
},
1515
"dependencies": {
16+
"@studio-freight/lenis": "^1.0.42",
1617
"clsx": "^2.1.1",
1718
"emailjs-com": "^3.2.0",
1819
"framer-motion": "^11.18.2",
20+
"gsap": "^3.13.0",
21+
"lenis": "^1.3.11",
1922
"lucide-react": "^0.344.0",
2023
"react": "^18.3.1",
2124
"react-dom": "^18.3.1",
2225
"react-hook-form": "^7.51.0",
2326
"react-icons": "^5.5.0",
2427
"react-intersection-observer": "^9.8.1",
2528
"react-router-dom": "^6.22.3",
26-
"react-syntax-highlighter": "^15.5.0"
29+
"react-syntax-highlighter": "^15.5.0",
30+
"react-tooltip": "^5.30.0"
2731
},
2832
"devDependencies": {
2933
"@eslint/js": "^9.9.1",

src/App.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,27 @@ import ProjectDetail from './pages/ProjectDetail';
1111
import Contact from './pages/Contact';
1212
import RequestCV from './pages/RequestCV';
1313
import AboutMe from './pages/aboutme';
14+
import { useLenis } from './hooks/useLenis';
1415

1516

1617
const ScrollToTop = () => {
1718
const { pathname } = useLocation();
19+
const lenis = useLenis();
1820

1921
useEffect(() => {
20-
window.scrollTo(0, 0);
21-
}, [pathname]);
22+
if (lenis) {
23+
lenis.scrollTo(0, { immediate: true });
24+
} else {
25+
window.scrollTo(0, 0);
26+
}
27+
}, [pathname, lenis]);
2228

2329
return null;
2430
};
2531

2632
function App() {
33+
useLenis(); // Initialize Lenis for smooth scrolling
34+
2735
return (
2836
<Router>
2937
<ScrollToTop />

src/components/Education.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,11 @@ const educationData: EducationItem[] = [
2525
id: 1,
2626
institution: "Indian Institute of Technology, Kharagpur",
2727
location: "Kharagpur, West Bengal, India",
28-
degree: "Integrated Dual Degree in Chemical Engineering",
28+
degree: "Integrated Dual Degree (B.Tech + M.Tech) in Chemical Engineering",
2929
duration: "2022 - 2027",
3030
description: [
31-
"Specialized in Chemical Engineering with a focus on process design and optimization.",
32-
"Completed coursework in advanced mathematics, thermodynamics, and data analysis.",
33-
"Engaged in research projects related to machine learning applications in chemical processes."
31+
"Focused on process design, simulation, and optimization, applying chemical engineering principles to industrial-scale systems.",
32+
"Research Experience: Worked on projects integrating machine learning with chemical process modeling, including simulation-based optimization and predictive analytics for process efficiency."
3433
],
3534
gpa: "8.46/10",
3635
link: "https://www.iitkgp.ac.in/"

src/components/Experience.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ const experiences: ExperienceItem[] = [
7272
},
7373
{
7474
id: 4,
75-
company: "Students' Branding and Relations Cell",
75+
company: "Students' Branding and Relations Cell, IIT Kharagpur",
7676
link: "https://sbrc.iitkgp.ac.in",
7777
location: "IIT Kharagpur, Kharagpur, West Bengal",
7878
totalDuration: "Feb 2023 - Feb 2024",
@@ -85,7 +85,7 @@ const companyIcons: Record<string, JSX.Element> = {
8585
"Developers' Society, IIT-Kharagpur": <img src={devsocLogo} alt="Developers' Society logo" className="w-10 h-11 rounded-full" />,
8686
"Public Policy and Governance Society, IIT-Kharagpur": <img src={ppgsLogo} alt="Public Policy and Governance Society logo" className="w-10 h-10 rounded-full" />,
8787
"Chemical Engineering Association, IIT-Kharagpur": <img src={cheaLogo} alt="Chemical Engineering Association logo" className="w-10 h-10 rounded-full" />,
88-
"Students' Branding and Relations Cell": <img src={sbrcLogo} alt="Students' Branding and Relations Cell logo" className="w-10 h-10 rounded-full" />,
88+
"Students' Branding and Relations Cell, IIT Kharagpur": <img src={sbrcLogo} alt="Students' Branding and Relations Cell logo" className="w-10 h-10 rounded-full" />,
8989
};
9090

9191
// const skillIcons: Record<string, JSX.Element> = {

src/components/Header.tsx

Lines changed: 30 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import React, { useState, useEffect, useRef } from 'react';
22
import { Link, useLocation } from 'react-router-dom';
3-
import { Menu, X } from 'lucide-react';
43
import clsx from 'clsx';
54

65
const navLinks = [
@@ -94,33 +93,54 @@ const Header: React.FC = () => {
9493

9594
<button
9695
onClick={toggleMenu}
97-
className="md:hidden z-50"
96+
className="md:hidden z-50 p-2 rounded-md hover:bg-gray-100 active:bg-gray-200 transition-colors duration-200"
9897
aria-expanded={isMenuOpen}
9998
aria-controls="mobile-menu"
10099
aria-label={isMenuOpen ? 'Close navigation menu' : 'Open navigation menu'}
101100
>
102-
{isMenuOpen ? <X size={24} /> : <Menu size={24} />}
101+
<div className="relative w-6 h-6 flex flex-col justify-center items-center">
102+
<span className={`block h-0.5 w-6 bg-gray-600 transform transition duration-300 ease-in-out ${isMenuOpen ? 'rotate-45 translate-y-1' : '-translate-y-1'}`}></span>
103+
<span className={`block h-0.5 w-6 bg-gray-600 transform transition duration-300 ease-in-out ${isMenuOpen ? 'opacity-0' : 'opacity-100'}`}></span>
104+
<span className={`block h-0.5 w-6 bg-gray-600 transform transition duration-300 ease-in-out ${isMenuOpen ? '-rotate-45 -translate-y-1' : 'translate-y-1'}`}></span>
105+
</div>
103106
</button>
104107
</div>
105108

106-
{/* Mobile menu remains the same */}
109+
{/* Mobile menu with improved UX */}
110+
{isMenuOpen && (
111+
<div
112+
className="md:hidden fixed inset-0 bg-black/60 backdrop-blur-md z-40 transition-all duration-500"
113+
onClick={() => setIsMenuOpen(false)}
114+
/>
115+
)}
107116
<div
108117
id="mobile-menu"
109118
className={clsx(
110-
'md:hidden fixed top-0 left-0 w-full bg-white transition-transform duration-300 ease-in-out',
111-
{ 'translate-x-0': isMenuOpen, '-translate-x-full': !isMenuOpen }
119+
'md:hidden fixed top-0 left-0 w-full h-screen bg-gradient-to-b from-white to-gray-50 transition-all duration-500 ease-out z-50',
120+
{
121+
'translate-x-0 opacity-100': isMenuOpen,
122+
'-translate-x-full opacity-0': !isMenuOpen
123+
}
112124
)}
113125
>
114-
<nav className="flex flex-col items-center justify-center h-screen space-y-8">
115-
{navLinks.map((link) => (
116-
<Link key={link.href} to={link.href} className="text-2xl text-gray-800">
126+
<nav className="flex flex-col items-center justify-center h-full space-y-10 px-4">
127+
{navLinks.map((link, index) => (
128+
<Link
129+
key={link.href}
130+
to={link.href}
131+
className="text-3xl font-medium text-gray-800 hover:text-blue-600 transition-all duration-300 transform hover:scale-110 hover:-translate-y-1"
132+
style={{
133+
animationDelay: `${index * 150}ms`,
134+
animation: isMenuOpen ? 'slideInFromLeft 0.4s ease-out forwards' : 'none'
135+
}}
136+
>
117137
{link.label}
118138
</Link>
119139
))}
120140
{/* <a
121141
href="/request-cv"
122142
// download
123-
className="text-2xl bg-blue-600 text-white px-6 py-3 rounded-lg"
143+
className="text-2xl bg-blue-600 text-white px-6 py-3 rounded-lg hover:bg-blue-700 transition-colors"
124144
>
125145
Download CV
126146
</a> */}

src/components/ProjectCard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const ProjectCard: React.FC<ProjectCardProps> = ({
2424
title,
2525
description,
2626
image,
27-
tags,
27+
tag,
2828
githubLink,
2929
articleLink,
3030
liveDemoLink,

0 commit comments

Comments
 (0)