Skip to content

Commit 789f61d

Browse files
committed
responsive
1 parent 49cf672 commit 789f61d

4 files changed

Lines changed: 36 additions & 14 deletions

File tree

src/components/Navigation.tsx

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,13 @@ export function Navigation({ inline = false }: NavigationProps) {
7373
return (
7474
<nav
7575
ref={inlineNavContainerRef}
76-
className="flex flex-nowrap items-center justify-center gap-2 sm:gap-4 overflow-x-auto scroll-smooth"
76+
className="flex flex-nowrap items-center justify-center gap-2 sm:gap-3 md:gap-4 overflow-x-auto scroll-smooth pb-2 -mb-2 w-full"
7777
aria-label="Main navigation"
78+
style={{
79+
scrollbarWidth: 'none',
80+
msOverflowStyle: 'none',
81+
WebkitOverflowScrolling: 'touch'
82+
}}
7883
>
7984
{navLinks.map((link: { path: string; label: string }, index: number) => {
8085
const isActive = location.pathname === link.path;
@@ -83,7 +88,7 @@ export function Navigation({ inline = false }: NavigationProps) {
8388
key={link.path}
8489
ref={(el) => { tabRefs.current[index] = el; }}
8590
to={link.path}
86-
className="relative px-3 sm:px-6 py-3 transition-colors group rounded-lg flex-shrink-0 text-center whitespace-nowrap"
91+
className="relative px-3 sm:px-5 md:px-6 py-2.5 sm:py-3 transition-colors group rounded-lg flex-shrink-0 text-center whitespace-nowrap min-h-[44px] flex items-center justify-center"
8792
>
8893
{isActive && (
8994
<motion.div
@@ -95,8 +100,8 @@ export function Navigation({ inline = false }: NavigationProps) {
95100
<span
96101
className={`relative z-10 font-medium transition-all ${
97102
isActive
98-
? 'text-gray-900 font-semibold opacity-100 text-xl'
99-
: 'text-gray-600 opacity-50 group-hover:text-gray-900 group-hover:opacity-100 text-base'
103+
? 'text-gray-900 font-semibold opacity-100 text-lg sm:text-xl'
104+
: 'text-gray-600 opacity-50 group-hover:text-gray-900 group-hover:opacity-100 text-sm sm:text-base'
100105
}`}
101106
>
102107
{link.label}
@@ -129,6 +134,10 @@ export function Navigation({ inline = false }: NavigationProps) {
129134
<div
130135
ref={topNavContainerRef}
131136
className="hidden lg:flex items-center justify-center gap-2 xl:gap-4 flex-1 flex-nowrap overflow-x-auto scroll-smooth"
137+
style={{
138+
scrollbarWidth: 'none',
139+
msOverflowStyle: 'none'
140+
}}
132141
>
133142
{navLinks.map((link: { path: string; label: string }, index: number) => {
134143
const isActive = location.pathname === link.path;
@@ -183,9 +192,9 @@ export function Navigation({ inline = false }: NavigationProps) {
183192
initial={{ opacity: 0, y: -20 }}
184193
animate={{ opacity: 1, y: 0 }}
185194
exit={{ opacity: 0, y: -20 }}
186-
className="lg:hidden bg-white border-t border-black/10 shadow-lg"
195+
className="lg:hidden bg-white border-t border-gray-200 shadow-lg"
187196
>
188-
<div className="w-full max-w-[90rem] mx-auto px-4 sm:px-6 py-5 space-y-2 text-center">
197+
<div className="w-full max-w-[90rem] mx-auto px-4 sm:px-6 py-4 sm:py-5 space-y-2 text-center">
189198
{navLinks.map((link: { path: string; label: string }) => {
190199
const isActive = location.pathname === link.path;
191200
return (

src/components/pages/About.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import contentData from '../../data/content';
55

66
export function About() {
77
return (
8-
<div className="min-h-screen pt-24 lg:pt-32">
9-
<div className="max-w-3xl mx-auto px-6 lg:px-12 pt-8 lg:pt-12 pb-24 lg:pb-32">
8+
<div className="min-h-screen pt-20 sm:pt-24 lg:pt-32">
9+
<div className="max-w-3xl mx-auto px-4 sm:px-6 lg:px-12 pt-6 sm:pt-8 lg:pt-12 pb-16 sm:pb-24 lg:pb-32">
1010
{/* Main Content */}
1111
<motion.div
1212
initial={{ opacity: 0, y: 20 }}

src/components/pages/Home.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import { Navigation } from '../Navigation';
44

55
export function Home() {
66
return (
7-
<div className="w-full flex flex-col items-center justify-center bg-background py-24">
8-
<div className="max-w-4xl mx-auto px-6 lg:px-12">
7+
<div className="w-full flex flex-col items-center justify-center bg-background py-12 sm:py-16 md:py-24">
8+
<div className="max-w-4xl mx-auto px-4 sm:px-6 lg:px-12">
99
{/* Person Image Section */}
1010
<motion.div
1111
initial={{ opacity: 0, y: -20 }}
@@ -16,8 +16,8 @@ export function Home() {
1616
<img
1717
src={getImageUrl("src/assets/ray.png")}
1818
alt="Regan Maharjan"
19-
className="!h-[20vh] w-auto mx-auto rounded-full object-contain"
20-
style={{ height: '30vh' }}
19+
className="w-auto mx-auto rounded-full object-contain"
20+
style={{ height: 'clamp(200px, 30vh, 400px)' }}
2121
/>
2222
</motion.div>
2323

@@ -28,10 +28,10 @@ export function Home() {
2828
transition={{ duration: 0.6, delay: 0.1 }}
2929
className="text-center"
3030
>
31-
<h1 className="text-4xl md:text-5xl lg:text-6xl font-normal tracking-tight mb-6 text-gray-900">
31+
<h1 className="text-3xl sm:text-4xl md:text-5xl lg:text-6xl font-normal tracking-tight mb-4 sm:mb-6 text-gray-900">
3232
Hello, welcome here,
3333
</h1>
34-
<p className="text-2xl md:text-3xl lg:text-4xl font-normal text-gray-700 mb-12 sm:mb-16">
34+
<p className="text-xl sm:text-2xl md:text-3xl lg:text-4xl font-normal text-gray-700 mb-8 sm:mb-12 md:mb-16">
3535
Namaste (Greetings!)
3636
</p>
3737
<Navigation inline />

src/styles/globals.css

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,19 @@ html {
199199
scroll-behavior: smooth;
200200
}
201201

202+
/* Mobile-specific scrollbar hiding */
203+
@media (max-width: 768px) {
204+
/* Hide scrollbars on mobile for better UX */
205+
.overflow-x-auto::-webkit-scrollbar {
206+
display: none;
207+
}
208+
209+
.overflow-x-auto {
210+
-ms-overflow-style: none;
211+
scrollbar-width: none;
212+
}
213+
}
214+
202215
/* Apple-inspired utility classes */
203216
@layer utilities {
204217
.glassmorphism {

0 commit comments

Comments
 (0)