Skip to content

Commit 0ae00d3

Browse files
committed
wip
1 parent 925a1eb commit 0ae00d3

File tree

7 files changed

+108
-75
lines changed

7 files changed

+108
-75
lines changed

src/components/index-page/graphql-advantages/index.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { ReactNode } from "react"
44

55
import { PrecisionFigure } from "./precision"
66
import { OptimizationFigure } from "./optimization"
7+
import { ProductivityFigure } from "./productivity"
78

89
export function GraphQLAdvantages() {
910
return (
@@ -26,7 +27,7 @@ export function GraphQLAdvantages() {
2627
name="Optimization"
2728
bigText="Retrieve multiple resources in one request"
2829
text="GraphQL seamlessly follows relationships between data, eliminating multiple API calls. While typical REST APIs require loading from multiple URLs, GraphQL APIs get all the data your app needs in a single request. Ideal for complex queries and optimizing network performance."
29-
figure={null}
30+
figure={<OptimizationFigure />}
3031
cta={
3132
<Button href="/learn" variant="secondary">
3233
Read the docs
@@ -37,7 +38,7 @@ export function GraphQLAdvantages() {
3738
name="Productivity"
3839
bigText="Move faster with powerful, community-built tools"
3940
text="Know exactly what you can request without leaving editor. Highlight potential issues before sending a query and take advantage of improved code intelligence. GraphQL makes it easy to build powerful tools. And many of them, like GraphiQL, are open source and built by the GraphQL community."
40-
figure={null}
41+
figure={<ProductivityFigure />}
4142
cta={
4243
<Button href="/community/tools-and-libraries" variant="secondary">
4344
Explore GraphQL tools
@@ -59,7 +60,7 @@ export function GraphQLAdvantages() {
5960
name="Versionless"
6061
bigText="Evolve without versions"
6162
text="Add new fields and types without impacting existing queries. Deprecate outdated fields while keeping APIs clean and future-proof. By using a single evolving version, GraphQL APIs give apps continuous access to new features and encourage more maintainable server code."
62-
figure={<OptimizationFigure />}
63+
figure={null}
6364
cta={
6465
<Button
6566
href="/learn/schema-design/#versioning"

src/components/index-page/graphql-advantages/optimization.svg

Lines changed: 71 additions & 39 deletions
Loading

src/components/index-page/graphql-advantages/optimization.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import OptimizationSvg from "./optimization.svg?svgr"
33
export function OptimizationFigure() {
44
return (
55
<div
6-
className="flex w-full bg-gradient-to-b from-transparent to-sec-lighter px-[14px] py-[30px] *:w-1/2 dark:to-sec-darker/25 xl:px-[46px] [&_pre]:!h-48"
6+
className="flex w-full bg-gradient-to-b from-[hsla(75,57%,97%,0)] to-white px-[14px] py-[30px] dark:to-neu-100/20 xl:px-[46px] [&_pre]:!h-48"
77
aria-hidden
88
>
99
<OptimizationSvg />
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
const VIDEOS_DIR =
2+
"https://github.com/graphql/graphql.github.io/raw/refs/heads/source/public/img"
3+
4+
export function ProductivityFigure() {
5+
return (
6+
<div className="flex w-full items-center bg-gradient-to-b from-pri-lighter/[.05] to-pri-lighter/20 px-[14px] py-[30px] dark:from-sec-darker/[.01] dark:to-pri-light/5">
7+
<div className="overflow-hidden rounded-lg shadow-[0px_0px_20px_0px_rgba(153,0,105,0.20)] dark:shadow-[0px_0px_20px_0px_hsl(218deg,60.3%,17.5%,.2)] dark:saturate-[.75]">
8+
<video
9+
disablePictureInPicture
10+
autoPlay
11+
muted
12+
loop
13+
playsInline
14+
className="hidden dark:block"
15+
>
16+
<source src={`${VIDEOS_DIR}/graphiql-dark.mp4`} type="video/mp4" />
17+
</video>
18+
<video
19+
disablePictureInPicture
20+
autoPlay
21+
muted
22+
loop
23+
playsInline
24+
className="block dark:hidden"
25+
>
26+
<source src={`${VIDEOS_DIR}/graphiql-light.mp4`} type="video/mp4" />
27+
</video>
28+
</div>
29+
</div>
30+
)
31+
}

src/components/index-page/index.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { Hero } from "./hero"
22
import { TrustedBy } from "./trusted-by"
33
import { SingleRequest } from "./single-request"
44
import { TypeSystem } from "./type-system"
5-
import { PowerFulTools } from "./powerful-tools"
65
import { WithoutVersion } from "./without-version"
76
import { BringYourOwnCode } from "./bring-your-own-code"
87
import { WhoIsUsing } from "./who-is-using"
@@ -34,7 +33,6 @@ export function IndexPage() {
3433
</section>
3534
<SingleRequest />
3635
<TypeSystem />
37-
<PowerFulTools />
3836
<WithoutVersion />
3937
<BringYourOwnCode />
4038
<WhoIsUsing />

src/components/index-page/powerful-tools.tsx

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -21,35 +21,6 @@ export function PowerFulTools() {
2121
by leveraging your API&rsquo;s type system.
2222
</p>
2323
</div>
24-
<div className="overflow-hidden rounded-t-xl shadow-[0_0_0_1px_rgba(0,0,0,.2),0_16px_64px_rgba(0,0,0,.6)]">
25-
<video
26-
disablePictureInPicture
27-
autoPlay
28-
muted
29-
loop
30-
playsInline
31-
className="hidden dark:block"
32-
>
33-
{/* todo: sync with main branch in graphql.org repo */}
34-
<source
35-
src="https://github.com/dimaMachina/graphql.github.io/raw/nextra/static/img/graphiql-dark.mp4"
36-
type="video/mp4"
37-
/>
38-
</video>
39-
<video
40-
disablePictureInPicture
41-
autoPlay
42-
muted
43-
loop
44-
playsInline
45-
className="block dark:hidden"
46-
>
47-
<source
48-
src="https://github.com/dimaMachina/graphql.github.io/raw/nextra/static/img/graphiql-light.mp4"
49-
type="video/mp4"
50-
/>
51-
</video>
52-
</div>
5324
</section>
5425
)
5526
}

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@
2323
}
2424
]
2525
},
26-
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts", "src/_design-system/syntax/index.js"],
26+
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
2727
"exclude": ["node_modules"]
2828
}

0 commit comments

Comments
 (0)