Skip to content

Commit 6755cdc

Browse files
committed
Tint the pics pink
1 parent 929fd5c commit 6755cdc

File tree

5 files changed

+54
-30
lines changed

5 files changed

+54
-30
lines changed

src/app/conf/2025/components/cta-card-section/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export function CtaCardSection({
5555
}}
5656
>
5757
<StripesDecoration
58-
thin
58+
stripeWidth="5.2px"
5959
oddClassName="bg-[linear-gradient(180deg,var(--start)_0%,var(--end)_100%)]"
6060
/>
6161
</div>
Binary file not shown.

src/app/conf/2025/components/testimonials/index.tsx

Lines changed: 37 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1+
import { StripesDecoration } from "@/app/conf/_design-system/stripes-decoration"
12
import { clsx } from "clsx"
23
import Image from "next-image-export-optimizer"
34

5+
import maskBlur from "./mask.webp"
6+
47
export interface TestimonialsProps extends React.HTMLAttributes<HTMLElement> {}
58

69
interface Testimonial {
@@ -80,16 +83,18 @@ export function Testimonials({ className, ...rest }: TestimonialsProps) {
8083
function TestimonialAuthor({ author }: { author: Testimonial["author"] }) {
8184
return (
8285
<div className="relative flex shrink-0 flex-col items-center justify-center whitespace-pre md:px-6 lg:h-full lg:px-8">
83-
{/* todo: pink tint */}
84-
<Image
85-
src={author.avatar}
86-
alt={author.name}
87-
width={128}
88-
height={128}
89-
className="size-16 xl:size-32"
90-
/>
86+
<div className="relative bg-neu-500 dark:bg-neu-200">
87+
<Image
88+
src={author.avatar}
89+
alt={author.name}
90+
width={128}
91+
height={128}
92+
className="size-16 xl:size-32"
93+
/>
94+
<div className="absolute inset-0 z-[1] bg-pri-base mix-blend-plus-lighter" />
95+
<Stripes />
96+
</div>
9197
<AuthorNameAndRole author={author} className="contents md:hidden" />
92-
<div className="absolute inset-y-0 right-0 w-px bg-gradient-to-b from-transparent via-pri-lighter to-transparent max-md:hidden" />
9398
</div>
9499
)
95100
}
@@ -108,3 +113,26 @@ function AuthorNameAndRole({
108113
</div>
109114
)
110115
}
116+
117+
function Stripes() {
118+
const mask = `url(${maskBlur.src})`
119+
return (
120+
<div
121+
role="presentation"
122+
className="pointer-events-none absolute inset-0"
123+
style={{
124+
maskImage: mask,
125+
WebkitMaskImage: mask,
126+
maskSize: "cover",
127+
WebkitMaskSize: "cover",
128+
maskPosition: "left",
129+
WebkitMaskPosition: "left",
130+
}}
131+
>
132+
<StripesDecoration
133+
evenClassName="bg-gradient-to-b from-pri-light/0 to-pri-lighter/25"
134+
stripeWidth="8px"
135+
/>
136+
</div>
137+
)
138+
}
Binary file not shown.

src/app/conf/_design-system/stripes-decoration.tsx

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,39 @@
11
import clsx from "clsx"
22

3-
const maskEvenWide =
4-
"repeating-linear-gradient(to right, transparent, transparent 12px, black 12px, black 24px)"
3+
const maskEven =
4+
"repeating-linear-gradient(to right, transparent, transparent var(--stripe-width), black var(--stripe-width), black calc(var(--stripe-width) * 2))"
55

6-
const maskOddWide =
7-
"repeating-linear-gradient(to right, black, black 12px, transparent 12px, transparent 24px)"
8-
9-
const maskEvenThin =
10-
"repeating-linear-gradient(to right, transparent, transparent 5.2px, black 5.2px, black 10.4px)"
11-
12-
const maskOddThin =
13-
"repeating-linear-gradient(to right, black, black 5.2px, transparent 5.2px, transparent 10.4px)"
6+
const maskOdd =
7+
"repeating-linear-gradient(to right, black, black var(--stripe-width), transparent var(--stripe-width), transparent calc(var(--stripe-width) * 2))"
148

159
export interface StripesDecorationProps {
1610
evenClassName?: string
1711
oddClassName?: string
18-
thin?: boolean
12+
stripeWidth?: string
1913
}
2014

21-
export function StripesDecoration(props: StripesDecorationProps) {
22-
const [maskEven, maskOdd] = props.thin
23-
? [maskEvenThin, maskOddThin]
24-
: [maskEvenWide, maskOddWide]
25-
15+
export function StripesDecoration({
16+
stripeWidth = "12px",
17+
evenClassName,
18+
oddClassName,
19+
}: StripesDecorationProps) {
2620
return (
2721
<>
28-
{props.evenClassName && (
22+
{evenClassName && (
2923
<div
30-
className={clsx("absolute inset-0", props.evenClassName)}
24+
className={clsx("absolute inset-0", evenClassName)}
3125
style={{
26+
...({ "--stripe-width": stripeWidth } as React.CSSProperties),
3227
maskImage: maskEven,
3328
WebkitMaskImage: maskEven,
3429
}}
3530
/>
3631
)}
37-
{props.oddClassName && (
32+
{oddClassName && (
3833
<div
39-
className={clsx("absolute inset-0", props.oddClassName)}
34+
className={clsx("absolute inset-0", oddClassName)}
4035
style={{
36+
...({ "--stripe-width": stripeWidth } as React.CSSProperties),
4137
maskImage: maskOdd,
4238
WebkitMaskImage: maskOdd,
4339
}}

0 commit comments

Comments
 (0)