diff --git a/src/components/Mentors.jsx b/src/components/Mentors.jsx index 72a50e3..196f301 100644 --- a/src/components/Mentors.jsx +++ b/src/components/Mentors.jsx @@ -1,20 +1,47 @@ +import { useState, useEffect } from 'react' import { mentors, avatarStyles } from '../data/mentors' +const VISIBLE = 4 + export default function Mentors() { + const [startIndex, setStartIndex] = useState(0) + const [fade, setFade] = useState(true) + + useEffect(() => { + const interval = setInterval(() => { + setFade(false) + setTimeout(() => { + setStartIndex((prev) => (prev + VISIBLE) % mentors.length) + setFade(true) + }, 400) + }, 10000) + return () => clearInterval(interval) + }, []) + + const visibleMentors = Array.from({ length: VISIBLE }, (_, i) => + mentors[(startIndex + i) % mentors.length] + ) + + const totalDots = Math.ceil(mentors.length / VISIBLE) + const activeDot = Math.floor(startIndex / VISIBLE) % totalDots + return (
Role Models
-

Women who've walked
this path before you

+

Women who have walked this path before you

- See all mentors → + See all mentors
-
- {mentors.map((mentor) => ( +
+ {visibleMentors.map((mentor, i) => (
{ @@ -29,7 +56,7 @@ export default function Mentors() { }} >
{mentor.initials} @@ -50,15 +77,65 @@ export default function Mentors() { className="inline-flex items-center gap-1.5 text-xs font-semibold no-underline transition-all duration-200" style={{ color: 'var(--purple)' }} > - Connect on LinkedIn → + Connect on LinkedIn
))}
+
+
+ {Array.from({ length: totalDots }).map((_, i) => ( +
+ +
+
- Are you a woman in AI? Join as a mentor → + Are you a woman in AI? Join as a mentor
) } + +function ProgressBar() { + return ( +
+
+ +
+ ) +} \ No newline at end of file diff --git a/src/components/Storyboards.jsx b/src/components/Storyboards.jsx index 9166080..d20c405 100644 --- a/src/components/Storyboards.jsx +++ b/src/components/Storyboards.jsx @@ -1,3 +1,4 @@ +import { useState, useEffect } from 'react' import { Link } from 'react-router-dom' import { storyboards } from '../data/storyboards' import { HighlightedText } from './Tooltip' @@ -9,6 +10,29 @@ const difficultyColors = { } export default function Storyboards() { + const [startIndex, setStartIndex] = useState(0) + const [fade, setFade] = useState(true) + + useEffect(() => { + const interval = setInterval(() => { + setFade(false) + setTimeout(() => { + setStartIndex((prev) => (prev + 3) % storyboards.length) + setFade(true) + }, 400) + }, 10000) + return () => clearInterval(interval) + }, []) + + const visibleConcepts = [ + storyboards[startIndex % storyboards.length], + storyboards[(startIndex + 1) % storyboards.length], + storyboards[(startIndex + 2) % storyboards.length], + ] + + const totalDots = Math.ceil(storyboards.length / 3) + const activeDot = Math.floor(startIndex / 3) % totalDots + return (
@@ -28,10 +52,13 @@ export default function Storyboards() {
-
- {storyboards.slice(0, 3).map((s) => ( +
+ {visibleConcepts.map((s, i) => (
{ @@ -72,6 +99,58 @@ export default function Storyboards() {
))}
+ + {/* Dot indicators + progress bar */} +
+
+ {Array.from({ length: totalDots }).map((_, i) => ( +
+ {/* 10s progress bar */} + +
+ +
+ + View all concepts → + +
) } + +function ProgressBar() { + return ( +
+
+ +
+ ) +} \ No newline at end of file