diff --git a/components/artists-section.tsx b/components/artists-section.tsx index e84df77f6..643adb093 100644 --- a/components/artists-section.tsx +++ b/components/artists-section.tsx @@ -8,31 +8,17 @@ import { Button } from "@/components/ui/button" import { artists } from "@/data/artists" export function ArtistsSection() { + // Minimal animation: fade-in only (no parallax) const [visibleCards, setVisibleCards] = useState([]) - const [scrollY, setScrollY] = useState(0) const sectionRef = useRef(null) - const leftColumnRef = useRef(null) - const centerColumnRef = useRef(null) - const rightColumnRef = useRef(null) const advancedNavAnimations = useFeatureFlag("ADVANCED_NAV_SCROLL_ANIMATIONS_ENABLED") const allArtistIndices = useMemo(() => Array.from({ length: artists.length }, (_, idx) => idx), []) useEffect(() => { if (!advancedNavAnimations) { setVisibleCards(allArtistIndices) - setScrollY(0) - - const columns = [leftColumnRef.current, centerColumnRef.current, rightColumnRef.current] - columns.forEach((column) => { - if (!column) return - column.style.transform = "" - column.querySelectorAll(".artist-image").forEach((img) => { - ;(img as HTMLElement).style.transform = "" - }) - }) return } - setVisibleCards([]) }, [advancedNavAnimations, allArtistIndices]) @@ -47,77 +33,32 @@ export function ArtistsSection() { } }) }, - { threshold: 0.2, rootMargin: "0px 0px 0px 0px" }, + { threshold: 0.2, rootMargin: "0px 0px -10% 0px" }, ) const cards = sectionRef.current?.querySelectorAll("[data-index]") cards?.forEach((card) => observer.observe(card)) return () => observer.disconnect() }, [advancedNavAnimations]) - useEffect(() => { - if (!advancedNavAnimations) return - let ticking = false - const handleScroll = () => { - if (!ticking) { - requestAnimationFrame(() => { - const scrollTop = window.pageYOffset - setScrollY(scrollTop) - ticking = false - }) - ticking = true - } - } - window.addEventListener("scroll", handleScroll, { passive: true }) - return () => window.removeEventListener("scroll", handleScroll) - }, [advancedNavAnimations]) - - useEffect(() => { - if (!advancedNavAnimations) return - if (leftColumnRef.current && centerColumnRef.current && rightColumnRef.current) { - const sectionTop = sectionRef.current?.offsetTop || 0 - const relativeScroll = scrollY - sectionTop - - leftColumnRef.current.style.transform = `translateY(${relativeScroll * -0.025}px)` - centerColumnRef.current.style.transform = `translateY(0px)` - rightColumnRef.current.style.transform = `translateY(${relativeScroll * 0.025}px)` - - const leftImages = leftColumnRef.current.querySelectorAll(".artist-image") - const centerImages = centerColumnRef.current.querySelectorAll(".artist-image") - const rightImages = rightColumnRef.current.querySelectorAll(".artist-image") - - leftImages.forEach((img) => { - ;(img as HTMLElement).style.transform = `translateY(${relativeScroll * -0.01}px)` - }) - centerImages.forEach((img) => { - ;(img as HTMLElement).style.transform = `translateY(${relativeScroll * -0.0075}px)` - }) - rightImages.forEach((img) => { - ;(img as HTMLElement).style.transform = `translateY(${relativeScroll * -0.005}px)` - }) - } - }, [advancedNavAnimations, scrollY]) - const cardVisibilityClass = (index: number) => { - if (!advancedNavAnimations) { - return "opacity-100 translate-y-0" - } - return visibleCards.includes(index) ? "opacity-100 translate-y-0" : "opacity-0 translate-y-8" + if (!advancedNavAnimations) return "opacity-100 translate-y-0" + return visibleCards.includes(index) ? "opacity-100 translate-y-0" : "opacity-0 translate-y-6" } const cardTransitionDelay = (index: number) => { - if (!advancedNavAnimations) { - return undefined - } - return `${index * 50}ms` + if (!advancedNavAnimations) return undefined + return `${index * 40}ms` } - // Better distribution for visual balance - const leftColumn = [artists[0], artists[3], artists[6]] // Christy, Donovan, John - const centerColumn = [artists[1], artists[4], artists[7]] // Angel, EJ, Pako - const rightColumn = [artists[2], artists[5], artists[8]] // Amari, Heather, Sole + // Vary aspect ratio to create a subtle masonry rhythm + const aspectFor = (i: number) => { + const variants = ["aspect-[3/4]", "aspect-[4/5]", "aspect-square"] + return variants[i % variants.length] + } return (
+ {/* Faint logo texture */}
-
-
-
+ {/* Header */} +
+
+
-

ARTISTS

-

+

ARTISTS

+

Our exceptional team of tattoo artists, each bringing unique expertise and artistic vision to create your perfect tattoo.

@@ -140,7 +82,7 @@ export function ArtistsSection() {
@@ -149,261 +91,94 @@ export function ArtistsSection() {
-
-
-
-
- {leftColumn.map((artist) => { - const globalIndex = artists.indexOf(artist) - const transitionDelay = cardTransitionDelay(globalIndex) - return ( -
-
-
- {/* Portfolio background - full width */} -
- {`${artist.name} - {/* Darkening overlay to push background further back */} -
-
+ {/* Masonry grid */} +
+
+ {/* columns-based masonry; tighter spacing and wider section */} +
+ {artists.map((artist, i) => { + const transitionDelay = cardTransitionDelay(i) + return ( +
+
+ {/* Imagery */} +
+ {`${artist.name} +
- {/* Artist portrait - with proper feathered mask */} -
- {`${artist.name} -
+ {/* Portrait with feathered mask */} +
+ {`${artist.name}
+
-
-
- - {artist.experience} - -
+ {/* Softer hover wash (replaces heavy overlay) */} +
-
-

{artist.name}

-

{artist.specialty}

-

{artist.bio}

+ {/* Top-left experience pill */} +
+ + {artist.experience} + +
-
- - -
-
+ {/* Minimal footer */} +
+

{artist.name}

+

{artist.specialty}

+ +
+ +
- ) - })} -
- -
- {centerColumn.map((artist) => { - const globalIndex = artists.indexOf(artist) - const transitionDelay = cardTransitionDelay(globalIndex) - return ( -
-
-
- {/* Portfolio background - full width */} -
- {`${artist.name} - {/* Darkening overlay to push background further back */} -
-
- - {/* Artist portrait - with proper feathered mask */} -
- {`${artist.name} -
-
- -
-
- - {artist.experience} - -
- -
-

{artist.name}

-

{artist.specialty}

-

{artist.bio}

- -
- - -
-
-
-
-
- ) - })} -
- -
- {rightColumn.map((artist) => { - const globalIndex = artists.indexOf(artist) - const transitionDelay = cardTransitionDelay(globalIndex) - return ( -
-
-
- {/* Portfolio background - full width */} -
- {`${artist.name} - {/* Darkening overlay to push background further back */} -
-
- - {/* Artist portrait - with proper feathered mask */} -
- {`${artist.name} -
-
- -
-
- - {artist.experience} - -
- -
-

{artist.name}

-

{artist.specialty}

-

{artist.bio}

- -
- - -
-
-
-
-
- ) - })} -
+
+ ) + })}
-
-
+ {/* CTA Footer */} +
+

READY?

Choose your artist and start your tattoo journey with United Tattoo.