|
| 1 | +import { ImageLoaded } from "@/app/conf/2025/components/image-loaded" |
| 2 | +import { Button } from "@/app/conf/_design-system/button" |
| 3 | +import { SectionLabel } from "@/app/conf/_design-system/section-label" |
| 4 | +import CheckIcon from "@/app/conf/_design-system/pixelarticons/check.svg?svgr" |
| 5 | + |
| 6 | +import blurBean from "./blur-bean.webp" |
| 7 | +import { StripesDecoration } from "@/app/conf/_design-system/stripes-decoration" |
| 8 | + |
| 9 | +export function ProvenSolution() { |
| 10 | + return ( |
| 11 | + <section className="dark relative overflow-hidden bg-pri-dark text-white dark:bg-pri-darker"> |
| 12 | + <Stripes /> |
| 13 | + <div className="gql-container py-8 xl:py-16"> |
| 14 | + <div className="gql-section relative"> |
| 15 | + <SectionLabel className="mb-6 !text-sec-light"> |
| 16 | + Business perspective |
| 17 | + </SectionLabel> |
| 18 | + <h2 className="typography-h2 mb-6 lg:mb-16"> |
| 19 | + A proven solution for startups and enterprises |
| 20 | + </h2> |
| 21 | + <div className="mb-12 grid gap-y-6 lg:grid-cols-3 lg:backdrop-blur-[6.4px] lg:[&>*:not(:first-child)]:border-l-0"> |
| 22 | + <ProvenSolutionCard |
| 23 | + title={ |
| 24 | + <> |
| 25 | + The best user{" "} |
| 26 | + <br className="@[530px]/card:hidden max-lg:hidden" /> |
| 27 | + experience |
| 28 | + </> |
| 29 | + } |
| 30 | + description="Deliver high-performing user experiences at scale. The world’s leading apps use GraphQL to create faster, more responsive digital experiences." |
| 31 | + bullets={[ |
| 32 | + "Faster data retrieval and load times", |
| 33 | + "Improved bandwith efficiency", |
| 34 | + ]} |
| 35 | + /> |
| 36 | + <ProvenSolutionCard |
| 37 | + title={ |
| 38 | + <> |
| 39 | + Stability &{" "} |
| 40 | + <br className="@[530px]/card:hidden max-lg:hidden" /> |
| 41 | + Security |
| 42 | + </> |
| 43 | + } |
| 44 | + description="Protect your APIs while maintaining full visibility into data consumption. GraphQL allows you to monitor, secure, and optimize API usage while ensuring compliance." |
| 45 | + bullets={[ |
| 46 | + "Stronger access control", |
| 47 | + "Improved business intelligence & cost analysis", |
| 48 | + ]} |
| 49 | + /> |
| 50 | + <ProvenSolutionCard |
| 51 | + title={ |
| 52 | + <> |
| 53 | + Efficient distributed{" "} |
| 54 | + <br className="@[530px]/card:hidden max-lg:hidden" /> |
| 55 | + development |
| 56 | + </> |
| 57 | + } |
| 58 | + description="Let your teams ship faster with GraphQL’s flexible, decoupled architecture. GraphQL allows frontend and backend teams to work independently and efficiently." |
| 59 | + bullets={[ |
| 60 | + "More rapid iterations", |
| 61 | + "Improved cross-team collaboration", |
| 62 | + ]} |
| 63 | + /> |
| 64 | + </div> |
| 65 | + <Button |
| 66 | + className="mx-auto mt-8 w-fit lg:mt-16" |
| 67 | + // todo: this should link to the Business Agregator page |
| 68 | + href="/learn" |
| 69 | + > |
| 70 | + Learn more |
| 71 | + </Button> |
| 72 | + </div> |
| 73 | + </div> |
| 74 | + </section> |
| 75 | + ) |
| 76 | +} |
| 77 | + |
| 78 | +function ProvenSolutionCard({ |
| 79 | + title, |
| 80 | + description, |
| 81 | + bullets, |
| 82 | +}: { |
| 83 | + title: React.ReactNode |
| 84 | + description: React.ReactNode |
| 85 | + bullets: string[] |
| 86 | +}) { |
| 87 | + return ( |
| 88 | + <div className="flex flex-col border border-pri-light bg-pri-lighter/20 @container/card dark:bg-pri-base/20 max-lg:backdrop-blur-[6.4px]"> |
| 89 | + <h3 className="border-b border-pri-light p-6 text-2xl @[331px]/card:typography-h3"> |
| 90 | + {title} |
| 91 | + </h3> |
| 92 | + <p className="typography-body-lg p-6">{description}</p> |
| 93 | + <ul className="typography-body-md mt-auto flex flex-col gap-2 p-6 pt-0"> |
| 94 | + {bullets.map(bullet => ( |
| 95 | + <li key={bullet} className="flex items-center gap-2"> |
| 96 | + <CheckIcon className="size-4 shrink-0 text-sec-base" aria-hidden /> |
| 97 | + <span>{bullet}</span> |
| 98 | + </li> |
| 99 | + ))} |
| 100 | + </ul> |
| 101 | + </div> |
| 102 | + ) |
| 103 | +} |
| 104 | + |
| 105 | +function Stripes() { |
| 106 | + // todo: rotate to top right corner on mobile |
| 107 | + return ( |
| 108 | + <ImageLoaded |
| 109 | + role="presentation" |
| 110 | + image={blurBean} |
| 111 | + // eslint-disable-next-line tailwindcss/no-unnecessary-arbitrary-value |
| 112 | + className="pointer-events-none absolute inset-0 opacity-0 transition-[translate] duration-[400ms] ease-linear [mask-position:center_calc(100%+65vw)] [mask-size:200%] data-[loaded=true]:opacity-100 max-lg:rotate-[180deg] max-lg:scale-x-[-1] lg:[mask-position:center_500px] lg:[mask-size:150%] xl:translate-y-1/2 xl:[mask-position:center_top] xl:max-3xl:translate-y-[50%]" |
| 113 | + style={{ |
| 114 | + maskImage: `url(${blurBean.src})`, |
| 115 | + WebkitMaskImage: `url(${blurBean.src})`, |
| 116 | + maskRepeat: "no-repeat", |
| 117 | + WebkitMaskRepeat: "no-repeat", |
| 118 | + }} |
| 119 | + > |
| 120 | + {/* todo: ensure colors in dark mode are correct */} |
| 121 | + <StripesDecoration |
| 122 | + evenClassName="bg-[linear-gradient(180deg,hsl(var(--color-pri-light)/0.2)_20%,hsl(var(--color-pri-base))_150%)] dark:bg-[linear-gradient(180deg,hsl(var(--color-pri-base)/.9)_20%,hsl(var(--color-pri-darker))_150%)]" |
| 123 | + oddClassName="bg-[linear-gradient(180deg,hsl(var(--color-pri-light))_20%,hsl(var(--color-pri-lighter)/.9)_150%)] dark:bg-[linear-gradient(180deg,hsl(var(--color-pri-darker)/.9)_20%,hsl(var(--color-pri-base)/.8)_150%)]" |
| 124 | + /> |
| 125 | + </ImageLoaded> |
| 126 | + ) |
| 127 | +} |
0 commit comments