|
| 1 | +import { Fragment } from "react" |
| 2 | + |
| 3 | +import { Marquee } from "@/app/conf/_design-system/marquee" |
| 4 | + |
| 5 | +import CodeIcon from "../../pixelarticons/code.svg?svgr" |
| 6 | + |
| 7 | +import blurWave from "./blur.webp" |
| 8 | +import { StripesDecoration } from "@/app/conf/_design-system/stripes-decoration" |
| 9 | + |
| 10 | +const keywords = [ |
| 11 | + ["COMMUNITY", "DEVELOPER EXPERIENCE", "APIs", "TOOLS & LIBRARIES"], |
| 12 | + ["OPEN SOURCE", "FEDERATION", "ECOSYSTEMS", "TRACING & OBSERVABILITY"], |
| 13 | + ["BEST PRACTICES", "WORKSHOPS", "SCHEMAS", "SECURITY"], |
| 14 | +] |
| 15 | + |
| 16 | +export function MarqueeUnderHero() { |
| 17 | + return ( |
| 18 | + <section className="relative pt-4 font-mono text-xl/none text-pri-base max-sm:pb-1 sm:pt-6 md:space-y-2 md:pt-12 md:text-[56px]/none xl:pt-16"> |
| 19 | + <Stripes /> |
| 20 | + {keywords.map((row, i) => ( |
| 21 | + <Marquee |
| 22 | + key={i} |
| 23 | + gap={16} |
| 24 | + speed={35} |
| 25 | + speedOnHover={15} |
| 26 | + className="relative *:select-none" |
| 27 | + reverse={i % 2 === 1} |
| 28 | + drag |
| 29 | + > |
| 30 | + {row.map((keyword, j) => ( |
| 31 | + <Fragment key={keyword}> |
| 32 | + <span>{keyword}</span> |
| 33 | + {j !== row.length - 1 && ( |
| 34 | + <CodeIcon className="size-8 text-pri-dark dark:text-pri-light md:size-10" /> |
| 35 | + )} |
| 36 | + </Fragment> |
| 37 | + ))} |
| 38 | + </Marquee> |
| 39 | + ))} |
| 40 | + </section> |
| 41 | + ) |
| 42 | +} |
| 43 | + |
| 44 | +function Stripes() { |
| 45 | + return ( |
| 46 | + <div |
| 47 | + role="presentation" |
| 48 | + // prettier-ignore |
| 49 | + // false positive |
| 50 | + // eslint-disable-next-line tailwindcss/no-contradicting-classname |
| 51 | + className="pointer-events-none absolute inset-0 -bottom-1/2 |
| 52 | +
|
| 53 | + [--start:hsl(var(--color-pri-light)/.6)] |
| 54 | + [--end:hsl(var(--color-pri-lighter)/.05)] |
| 55 | + dark:[--start:hsl(320_86_20/.6)] |
| 56 | + dark:[--end:hsl(var(--color-pri-base)/.025)] |
| 57 | +
|
| 58 | + [mask-size:400%_100%] |
| 59 | + sm:[mask-size:cover] |
| 60 | + " |
| 61 | + style={{ |
| 62 | + maskImage: `url(${blurWave.src})`, |
| 63 | + WebkitMaskImage: `url(${blurWave.src})`, |
| 64 | + maskRepeat: "no-repeat", |
| 65 | + WebkitMaskRepeat: "no-repeat", |
| 66 | + }} |
| 67 | + > |
| 68 | + <StripesDecoration oddClassName="bg-[linear-gradient(180deg,var(--start)_0%,var(--end)_100%)]" /> |
| 69 | + </div> |
| 70 | + ) |
| 71 | +} |
0 commit comments