Skip to content

Commit 00526da

Browse files
committed
Draft Proven Solution section
1 parent c4dacbc commit 00526da

File tree

5 files changed

+48
-7
lines changed

5 files changed

+48
-7
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import { clsx } from "clsx"
2+
import { ChevronRight } from "./pixelarticons/chevron-right"
3+
4+
export function SectionLabel({
5+
children,
6+
className,
7+
...rest
8+
}: {
9+
children: React.ReactNode
10+
className?: string
11+
rest?: React.HTMLAttributes<HTMLSpanElement>
12+
}) {
13+
return (
14+
<span
15+
className={clsx(
16+
"flex shrink-0 items-center gap-1 self-start whitespace-nowrap font-mono text-sm/none font-normal uppercase text-pri-base dark:text-pri-light",
17+
className,
18+
)}
19+
{...rest}
20+
>
21+
<ChevronRight className="shrink-0 translate-y-[-0.5px]" />
22+
{children}
23+
</span>
24+
)
25+
}

src/components/index-page/how-it-works.tsx

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { ChevronRight } from "@/app/conf/_design-system/pixelarticons/chevron-right"
21
import { Button } from "@/app/conf/_design-system/button"
2+
import { SectionLabel } from "@/app/conf/_design-system/section-label"
33

44
import { CodeA, CodeB, CodeC } from "../code-blocks"
55

@@ -8,10 +8,7 @@ const TRY_IT_OUT_URL = "https://graphql.org/swapi-graphql"
88
export function HowItWorks() {
99
return (
1010
<section className="gql-container gql-section xl:py-20">
11-
<span className="mb-6 flex w-[80px] shrink-0 items-center gap-1 self-start whitespace-nowrap font-mono text-sm/none font-normal uppercase text-pri-base">
12-
<ChevronRight className="shrink-0 translate-y-[-0.5px]" />
13-
How it works
14-
</span>
11+
<SectionLabel className="mb-6">How it works</SectionLabel>
1512
<h2 className="typography-h2 mb-6 lg:mb-16">A GraphQL Query</h2>
1613
<ol className="gql-radial-gradient list-none gap-px max-md:bg-gradient-to-r max-md:from-transparent max-md:via-neu-400 max-md:to-transparent lg:grid lg:grid-cols-3">
1714
<ListItem text="Describe your data" code={<CodeA />} />
@@ -35,7 +32,7 @@ function ListItem({
3532
}) {
3633
return (
3734
<li className="[counter-increment:list-item]">
38-
<div className="typography-body-md bg-neu-0 py-4 before:typography-body-sm before:mr-2 before:inline-flex before:size-5 before:translate-y-[-0.5px] before:items-center before:justify-center before:bg-neu-200 before:p-1 before:text-neu-800 before:content-[counter(list-item)] md:py-6 md:before:ml-6">
35+
<div className="typography-body-md bg-neu-0 py-4 before:typography-body-sm before:mr-2 before:inline-flex before:size-5 before:translate-y-[-0.5px] before:items-center before:justify-center before:bg-neu-200 before:p-1 before:text-neu-800 before:content-[counter(list-item)] dark:before:bg-neu-50 md:py-6 md:before:ml-6">
3936
{text}
4037
</div>
4138
<div className="mt-px bg-neu-0 md:pl-2 md:pt-2 max-md:[&_code>span]:!pl-0 [&_pre]:ring-0">

src/components/index-page/index.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,15 @@ import { WithoutVersion } from "./without-version"
88
import { BringYourOwnCode } from "./bring-your-own-code"
99
import { WhoIsUsing } from "./who-is-using"
1010
import { HowItWorks } from "./how-it-works"
11+
import { ProvenSolution } from "./proven-solution"
1112

1213
export function IndexPage() {
1314
return (
1415
<div className="bg-neu-0">
1516
<Hero />
1617
<TrustedBy />
1718
<HowItWorks />
19+
<ProvenSolution />
1820
<section className="conf-block container flex max-w-3xl flex-col items-center text-center">
1921
<h2>A query language for your API</h2>
2022
<p>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { Button } from "@/app/conf/_design-system/button"
2+
import { SectionLabel } from "@/app/conf/_design-system/section-label"
3+
4+
export function ProvenSolution() {
5+
return (
6+
<section className="gql-container gql-section xl:py-20">
7+
<SectionLabel className="mb-6">Business perspective</SectionLabel>
8+
<h2 className="typography-h2 mb-6 lg:mb-16">
9+
A proven solution for startups and enterprises
10+
</h2>
11+
12+
<Button className="mx-auto mt-8 w-fit lg:mt-16" href="/learn">
13+
Learn more
14+
</Button>
15+
</section>
16+
)
17+
}

src/globals.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ div[id^="headlessui-menu-items"] {
150150
}
151151

152152
::selection {
153-
@apply bg-primary/50 dark:bg-primary/50;
153+
@apply bg-pri-base/25 dark:bg-pri-light/50;
154154
}
155155

156156
@media (prefers-color-scheme: dark) {

0 commit comments

Comments
 (0)