rushiljain commited on
Commit
1cf61c9
·
verified ·
1 Parent(s): 30f539e

Update src/pages/About.jsx

Browse files
Files changed (1) hide show
  1. src/pages/About.jsx +26 -20
src/pages/About.jsx CHANGED
@@ -54,22 +54,22 @@ function TimelineItem({ align = 'left', year, title, children, lineHeight = 0 })
54
  <div
55
  ref={ref}
56
  className={
57
- 'card relative bg-white p-6 md:p-8 transition ' +
58
  (visible
59
  ? 'shadow-[0_12px_40px_rgba(0,0,0,0.08)] ring-1 ring-brand-600/20'
60
  : 'shadow-card')
61
  }
62
  >
63
- <h3 className="h3">{title}</h3>
64
- <div className="mt-3 text-slate-700">{children}</div>
65
  </div>
66
  );
67
 
68
  const yearBadge = (
69
- <div className="sticky top-28" ref={yearRef}>
70
  <div
71
  className={`inline-flex items-center justify-center rounded-full bg-brand-600 px-3 py-1.5 text-sm font-semibold text-white shadow-lg transition-all duration-500 ease-out ${
72
- isEnlarged ? 'scale-125 md:scale-150' : 'scale-100'
73
  }`}
74
  >
75
  {year}
@@ -81,13 +81,21 @@ function TimelineItem({ align = 'left', year, title, children, lineHeight = 0 })
81
  <div className="relative grid grid-cols-1 items-start gap-4 md:grid-cols-2">
82
  {align === 'left' ? (
83
  <>
84
- <div className="md:pr-8">{card}</div>
85
- <div className="md:pl-8 md:text-left">{yearBadge}</div>
 
 
 
 
 
86
  </>
87
  ) : (
88
  <>
 
 
89
  <div className="order-2 md:order-2 md:pl-8">{card}</div>
90
- <div className="order-1 md:order-1 md:pr-8 md:text-right">{yearBadge}</div>
 
91
  </>
92
  )}
93
  </div>
@@ -179,8 +187,8 @@ export default function About() {
179
  </div>
180
 
181
  {/* Our History */}
182
- <section className="mt-16" aria-labelledby="history-heading">
183
- <div className="container">
184
  <Reveal>
185
  <header className="mb-12 text-center">
186
  <h2 id="history-heading" className="h2">Our History</h2>
@@ -189,9 +197,9 @@ export default function About() {
189
  </Reveal>
190
 
191
  <div className="relative pb-20" ref={historyRef} data-timeline-container>
192
- {/* Vertical timeline line with scroll growth */}
193
  <div
194
- className="pointer-events-none absolute left-1/2 top-0 bottom-16 -translate-x-1/2 w-[3px] bg-brand-600/15"
195
  aria-hidden="true"
196
  >
197
  <div
@@ -199,7 +207,7 @@ export default function About() {
199
  style={{ height: `${lineH}px` }}
200
  />
201
  </div>
202
- <div className="space-y-10">
203
  <Reveal>
204
  <TimelineItem align="left" year="1987" title="The Foundation: R.B. Constructions" lineHeight={lineH}>
205
  <p>
@@ -281,7 +289,7 @@ export default function About() {
281
  <Reveal>
282
  <article className="overflow-hidden rounded-2xl border border-slate-200 bg-gradient-to-br from-brand-50 to-white shadow-card md:mr-auto">
283
  <div className="flex flex-col md:flex-row md:items-center">
284
- <div className="md:w-[38%] flex justify-center md:justify-start p-6 md:pl-10 md:pr-0">
285
  <div className="relative w-full max-w-xs">
286
  <div className="absolute -top-8 -left-6 hidden h-40 w-40 rounded-full bg-brand-200/60 blur-3xl md:block"></div>
287
  <ImageFlex
@@ -291,7 +299,7 @@ export default function About() {
291
  />
292
  </div>
293
  </div>
294
- <div className="relative md:w-[62%] md:pl-10 md:pr-20 md:py-10 p-6">
295
  <div className="mb-2 inline-block rounded-full bg-brand-100 px-3 py-1 text-xs font-semibold text-brand-700">Finance & Strategy</div>
296
  <h3 className="h3">Mr. Bharat B. Jain</h3>
297
  <p className="text-sm font-semibold text-brand-700">The Founder & Financial Strategist</p>
@@ -344,7 +352,7 @@ export default function About() {
344
  <Reveal delay={160}>
345
  <article className="overflow-hidden rounded-2xl border border-slate-200 bg-gradient-to-br from-brand-50 to-white shadow-card md:mr-auto">
346
  <div className="flex flex-col md:flex-row md:items-center">
347
- <div className="md:w-[38%] flex justify-center md:justify-start p-6 md:pl-10 md:pr-0">
348
  <div className="relative w-full max-w-xs">
349
  <div className="absolute -top-6 -left-6 hidden h-40 w-40 rounded-full bg-brand-200/60 blur-3xl md:block"></div>
350
  <ImageFlex
@@ -354,7 +362,7 @@ export default function About() {
354
  />
355
  </div>
356
  </div>
357
- <div className="md:w-[62%] md:pl-10 md:pr-20 md:py-10 p-6">
358
  <div className="mb-2 inline-block rounded-full bg-brand-100 px-3 py-1 text-xs font-semibold text-brand-700">Design & Brand</div>
359
  <h3 className="h3">Mr. Ritesh B. Jain</h3>
360
  <p className="text-sm font-semibold text-brand-700">The Visionary & Design Strategist</p>
@@ -462,6 +470,4 @@ export default function About() {
462
  </section>
463
  </article>
464
  );
465
- }
466
-
467
-
 
54
  <div
55
  ref={ref}
56
  className={
57
+ 'card relative bg-white p-5 md:p-8 transition ' +
58
  (visible
59
  ? 'shadow-[0_12px_40px_rgba(0,0,0,0.08)] ring-1 ring-brand-600/20'
60
  : 'shadow-card')
61
  }
62
  >
63
+ <h3 className="h3 text-lg md:text-2xl">{title}</h3>
64
+ <div className="mt-3 text-sm md:text-base text-slate-700">{children}</div>
65
  </div>
66
  );
67
 
68
  const yearBadge = (
69
+ <div className="md:sticky md:top-28" ref={yearRef}>
70
  <div
71
  className={`inline-flex items-center justify-center rounded-full bg-brand-600 px-3 py-1.5 text-sm font-semibold text-white shadow-lg transition-all duration-500 ease-out ${
72
+ isEnlarged ? 'scale-110 md:scale-150' : 'scale-100'
73
  }`}
74
  >
75
  {year}
 
81
  <div className="relative grid grid-cols-1 items-start gap-4 md:grid-cols-2">
82
  {align === 'left' ? (
83
  <>
84
+ <div className="md:pr-8">
85
+ {/* Mobile: year badge above card */}
86
+ <div className="mb-4 flex justify-center md:hidden">{yearBadge}</div>
87
+ {card}
88
+ </div>
89
+ {/* Desktop: year badge on right */}
90
+ <div className="hidden md:block md:pl-8 md:text-left">{yearBadge}</div>
91
  </>
92
  ) : (
93
  <>
94
+ {/* Mobile: year badge above card */}
95
+ <div className="mb-4 flex justify-center md:hidden">{yearBadge}</div>
96
  <div className="order-2 md:order-2 md:pl-8">{card}</div>
97
+ {/* Desktop: year badge on left */}
98
+ <div className="order-1 hidden md:order-1 md:block md:pr-8 md:text-right">{yearBadge}</div>
99
  </>
100
  )}
101
  </div>
 
187
  </div>
188
 
189
  {/* Our History */}
190
+ <section className="mt-12 md:mt-16" aria-labelledby="history-heading">
191
+ <div className="container px-4 md:px-0">
192
  <Reveal>
193
  <header className="mb-12 text-center">
194
  <h2 id="history-heading" className="h2">Our History</h2>
 
197
  </Reveal>
198
 
199
  <div className="relative pb-20" ref={historyRef} data-timeline-container>
200
+ {/* Vertical timeline line with scroll growth - hidden on mobile */}
201
  <div
202
+ className="pointer-events-none absolute left-1/2 top-0 bottom-16 -translate-x-1/2 w-[3px] bg-brand-600/15 hidden md:block"
203
  aria-hidden="true"
204
  >
205
  <div
 
207
  style={{ height: `${lineH}px` }}
208
  />
209
  </div>
210
+ <div className="space-y-8 md:space-y-10">
211
  <Reveal>
212
  <TimelineItem align="left" year="1987" title="The Foundation: R.B. Constructions" lineHeight={lineH}>
213
  <p>
 
289
  <Reveal>
290
  <article className="overflow-hidden rounded-2xl border border-slate-200 bg-gradient-to-br from-brand-50 to-white shadow-card md:mr-auto">
291
  <div className="flex flex-col md:flex-row md:items-center">
292
+ <div className="order-2 md:order-1 md:w-[38%] flex justify-center md:justify-start p-6 md:pl-10 md:pr-0">
293
  <div className="relative w-full max-w-xs">
294
  <div className="absolute -top-8 -left-6 hidden h-40 w-40 rounded-full bg-brand-200/60 blur-3xl md:block"></div>
295
  <ImageFlex
 
299
  />
300
  </div>
301
  </div>
302
+ <div className="order-1 md:order-2 relative md:w-[62%] md:pl-10 md:pr-20 md:py-10 p-6">
303
  <div className="mb-2 inline-block rounded-full bg-brand-100 px-3 py-1 text-xs font-semibold text-brand-700">Finance & Strategy</div>
304
  <h3 className="h3">Mr. Bharat B. Jain</h3>
305
  <p className="text-sm font-semibold text-brand-700">The Founder & Financial Strategist</p>
 
352
  <Reveal delay={160}>
353
  <article className="overflow-hidden rounded-2xl border border-slate-200 bg-gradient-to-br from-brand-50 to-white shadow-card md:mr-auto">
354
  <div className="flex flex-col md:flex-row md:items-center">
355
+ <div className="order-2 md:order-1 md:w-[38%] flex justify-center md:justify-start p-6 md:pl-10 md:pr-0">
356
  <div className="relative w-full max-w-xs">
357
  <div className="absolute -top-6 -left-6 hidden h-40 w-40 rounded-full bg-brand-200/60 blur-3xl md:block"></div>
358
  <ImageFlex
 
362
  />
363
  </div>
364
  </div>
365
+ <div className="order-1 md:order-2 md:w-[62%] md:pl-10 md:pr-20 md:py-10 p-6">
366
  <div className="mb-2 inline-block rounded-full bg-brand-100 px-3 py-1 text-xs font-semibold text-brand-700">Design & Brand</div>
367
  <h3 className="h3">Mr. Ritesh B. Jain</h3>
368
  <p className="text-sm font-semibold text-brand-700">The Visionary & Design Strategist</p>
 
470
  </section>
471
  </article>
472
  );
473
+ }