Skip to content

Commit 41adc6d

Browse files
authored
Merge pull request #33 from hasparus/new-landing--five-pillars
new landing — five pillars
2 parents 3460580 + e61f0c5 commit 41adc6d

File tree

7 files changed

+142
-0
lines changed

7 files changed

+142
-0
lines changed
Lines changed: 11 additions & 0 deletions
Loading
Lines changed: 13 additions & 0 deletions
Loading
Lines changed: 11 additions & 0 deletions
Loading
Lines changed: 11 additions & 0 deletions
Loading
Lines changed: 11 additions & 0 deletions
Loading
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
import { SectionLabel } from "@/app/conf/_design-system/section-label"
2+
3+
import GiftIcon from "@/app/conf/_design-system/pixelarticons/gift.svg?svgr"
4+
import TournamentIcon from "@/app/conf/_design-system/pixelarticons/tournament.svg?svgr"
5+
import ZapIcon from "@/app/conf/_design-system/pixelarticons/zap.svg?svgr"
6+
import BullseyeIcon from "@/app/conf/_design-system/pixelarticons/bullseye.svg?svgr"
7+
import SearchIcon from "@/app/conf/_design-system/pixelarticons/search.svg?svgr"
8+
9+
const items = [
10+
{
11+
icon: GiftIcon,
12+
title: "Product-centric",
13+
description:
14+
"GraphQL is unapologetically built for front-end engineers, aligning with their way of thinking, how views are structured and how data is consumed.",
15+
},
16+
{
17+
icon: TournamentIcon,
18+
title: "Hierarchical",
19+
description:
20+
"Most product development involves the creation and manipulation of view hierarchies. GraphQL queries mirror UI structures, ensuring a natural way to request data that matches the shape of the response.",
21+
},
22+
{
23+
icon: ZapIcon,
24+
title: "Strong-typing",
25+
description:
26+
"Every GraphQL service defines a type system, enabling tools to syntactically validate queries before execution and ensuring predictable responses.",
27+
},
28+
{
29+
icon: BullseyeIcon,
30+
title: "Client-specified response",
31+
description:
32+
"A GraphQL service publishes the capabilities that its clients are allowed to consume. It is the client who control the data they receive, requesting only what they need at a field level, unlike traditional fixed endpoints.",
33+
},
34+
{
35+
icon: SearchIcon,
36+
title: "Self-documenting",
37+
description:
38+
"GraphQL APIs can describe themselves, allowing tools and clients to query the schema for available types and capabilities. It serves as a powerful platform for building common tools and client software libraries.",
39+
},
40+
]
41+
42+
export function FivePillars() {
43+
return (
44+
<section className="gql-container gql-section xl:py-20">
45+
<SectionLabel className="mb-6">design principles</SectionLabel>
46+
<h2 className="typography-h2 mb-6 max-sm:text-center lg:mb-16">
47+
Five Pillars of GraphQL
48+
</h2>
49+
50+
<div className="gql-radial-gradient gap-px">
51+
{items.map(({ title, icon: Icon, description }, index) => (
52+
<div key={title}>
53+
<div className="flex flex-col gap-2 bg-neu-0 py-6 max-sm:text-center lg:flex-row lg:items-center lg:gap-8 lg:py-8">
54+
<div className="flex items-center max-sm:flex-col lg:w-[430px] lg:shrink-0 xl:w-[520px]">
55+
<div className="pr-4 max-sm:p-6 md:max-lg:p-6">
56+
<Icon className="size-6 text-pri-base" />
57+
</div>
58+
<h3 className="typography-h3 sm:items-center lg:flex lg:h-[86px] lg:flex-1 lg:p-4">
59+
{title}
60+
</h3>
61+
</div>
62+
<p className="typography-body-lg mt-6 lg:mt-0 lg:flex-1">
63+
{description}
64+
</p>
65+
</div>
66+
{index < items.length - 1 && <Separator />}
67+
</div>
68+
))}
69+
</div>
70+
</section>
71+
)
72+
}
73+
74+
function Separator() {
75+
return (
76+
<div
77+
className="h-px w-full"
78+
style={{
79+
background: `linear-gradient(90deg, hsl(var(--color-neu-100) / 0) 0%, hsl(var(--color-neu-300) / 0.75) 25%, hsl(var(--color-neu-400)) 50%, hsl(var(--color-neu-300) / 0.75) 75%, hsl(var(--color-neu-100) / 0) 100%)`,
80+
}}
81+
/>
82+
)
83+
}

src/components/index-page/index.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { BringYourOwnCode } from "./bring-your-own-code"
99
import { WhoIsUsing } from "./who-is-using"
1010
import { HowItWorks } from "./how-it-works"
1111
import { ProvenSolution } from "./proven-solution"
12+
import { FivePillars } from "./five-pillars"
1213

1314
export function IndexPage() {
1415
return (
@@ -17,6 +18,7 @@ export function IndexPage() {
1718
<TrustedBy />
1819
<HowItWorks />
1920
<ProvenSolution />
21+
<FivePillars />
2022
<section className="conf-block container flex max-w-3xl flex-col items-center text-center">
2123
<h2>A query language for your API</h2>
2224
<p>

0 commit comments

Comments
 (0)