Datasets:
File size: 3,264 Bytes
d77bae9 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 | import { useRef } from 'react'
import Reveal from './Reveal.jsx'
import { TurnArrow } from './Icons.jsx'
function ArrowLink({ label, className = '', style }) {
const ref = useRef(null)
const handleClick = (event) => {
event.preventDefault()
const el = ref.current
if (!el) return
el.classList.remove('pulsed')
// restart the pulse animation on every click
void el.offsetWidth
el.classList.add('pulsed')
}
return (
<a
ref={ref}
className={`arrow-link ${className}`}
style={style}
href="#"
aria-label={label}
onClick={handleClick}
>
<TurnArrow />
</a>
)
}
function WorkTitle({ eyebrow, lines, eyebrowIndent = 0 }) {
return (
<>
<p className="eyebrow" style={{ '--indent': eyebrowIndent }}>
{eyebrow}
</p>
<h2 className="work-title">
{lines.map(([text, indent]) => (
<span key={text} className="line" style={{ '--indent': indent }}>
{text}
</span>
))}
</h2>
</>
)
}
export default function Works() {
return (
<section className="works" id="works">
<Reveal as="article" className="work work-zoniou">
<img
className="work-media"
src="/images/work-perfume.jpg"
alt="Zoniou Perfumes — black fragrance diffuser bottle photographed on rippling dark liquid"
width="766"
height="957"
loading="lazy"
/>
<div className="work-text">
<WorkTitle
eyebrow="Zoniou Perfumes"
lines={[
['A WAY', 0],
['TO LABEL', 100],
['SCENTS', 0],
]}
/>
<ArrowLink label="View the Zoniou Perfumes case" />
</div>
</Reveal>
<Reveal as="article" className="work work-shook">
<div className="shook-head">
<WorkTitle
eyebrow="Shook Radio"
lines={[
['SOMETHING TO', 113],
['TUNE IN', 0],
['GENERATION Z', 113],
]}
/>
<ArrowLink label="View the Shook Radio case" className="shook-arrow" />
</div>
<img
className="shook-media"
src="/images/work-ringlight.jpg"
alt="Shook Radio — host in a pale green sweater speaking behind a ring light, in front of an op-art striped backdrop"
width="1920"
height="814"
loading="lazy"
/>
</Reveal>
<Reveal as="article" className="work work-onoma">
<div className="onoma-text">
<WorkTitle
eyebrow="Onoma Hotel"
eyebrowIndent={96}
lines={[
['A STORY OF AN', 96],
['INSTAGRAMMABLE', 0],
['HOTEL', 96],
]}
/>
</div>
<img
className="onoma-media"
src="/images/work-bearbrick.jpg"
alt="Onoma Hotel — black bear figurine carrying a duffel bag over a giant letter S on a yellow poster"
width="766"
height="959"
loading="lazy"
/>
<ArrowLink label="View the Onoma Hotel case" className="onoma-arrow" />
</Reveal>
</section>
)
}
|