Skip to content

Commit 0d5f648

Browse files
committed
Make the hero look like on designs
1 parent 355db24 commit 0d5f648

File tree

9 files changed

+3154
-29
lines changed

9 files changed

+3154
-29
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
"p-limit": "^4.0.0",
5555
"parser-front-matter": "1.6.4",
5656
"postcss": "^8.4.49",
57+
"postcss-import": "^16.1.1",
5758
"react": "^18.3.1",
5859
"react-dom": "^18.3.1",
5960
"react-medium-image-zoom": "5.2.13",

pnpm-lock.yaml

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

postcss.config.cjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@ module.exports = {
55
"tailwindcss/nesting": {},
66
tailwindcss: {},
77
autoprefixer: {},
8+
"postcss-import": {},
89
},
910
}

src/components/index-page/hero.tsx

Lines changed: 37 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,58 @@
1-
import Link from "next/link"
2-
import { GraphQLLogo } from "@/icons"
31
import { StripesDecoration } from "@/app/conf/_design-system/stripes-decoration"
42
import CheckIcon from "@/app/conf/_design-system/pixelarticons/check.svg?svgr"
53
import { Button } from "@/app/conf/_design-system/button"
4+
import { ImageLoaded } from "@/app/conf/2025/components/image-loaded"
5+
6+
import logoBlurred from "./hero/logo-blurred.png"
67

78
export function Hero() {
89
return (
9-
<div className="relative min-h-screen bg-neu-0">
10-
<HeroStripes />
11-
12-
<div className="flex max-w-4xl flex-col gap-10 py-24 pl-24 pr-10">
13-
<h1 className="typography-h1 max-w-3xl text-neu-900">
14-
The query language for modern APIs
15-
</h1>
10+
<div className="relative bg-neu-0">
11+
<div className="gql-conf-container flex flex-col-reverse lg:grid lg:grid-cols-2">
12+
<div className="flex max-w-4xl flex-col justify-center gap-4 p-4 lg:min-h-[800px] xl:gap-8 xl:py-24 xl:pl-24 xl:pr-10">
13+
<h1 className="typography-h1 max-w-3xl text-neu-900">
14+
The query language for modern APIs
15+
</h1>
1616

17-
<ul className="flex flex-col gap-2">
18-
{[
19-
"Deliver high-performance user experience at scale",
20-
"Secure and stabilize your API with a strongly typed schema and validated queries",
21-
"Reduce dependencies through efficient, distributed development",
22-
].map((item, index) => (
23-
<li key={index} className="flex items-center gap-1">
24-
<CheckIcon className="size-6 shrink-0 text-pri-base" />
25-
<p className="typography-body-sm text-neu-800">{item}</p>
26-
</li>
27-
))}
28-
</ul>
17+
<ul className="flex flex-col gap-2">
18+
{[
19+
"Deliver high-performance user experience at scale",
20+
"Secure and stabilize your API with a strongly typed schema and validated queries",
21+
"Reduce dependencies through efficient, distributed development",
22+
].map((item, index) => (
23+
<li key={index} className="flex items-start gap-1">
24+
<CheckIcon className="size-6 shrink-0 text-pri-base max-lg:mt-px" />
25+
<p className="text-pretty text-neu-800">{item}</p>
26+
</li>
27+
))}
28+
</ul>
2929

30-
<div className="flex items-center gap-4">
31-
<Button href="/learn">Get Started</Button>
30+
<div className="flex items-center gap-4">
31+
<Button href="/learn" className="max-sm:w-full">
32+
Learn more
33+
</Button>
34+
</div>
3235
</div>
36+
<HeroStripes />
3337
</div>
3438
</div>
3539
)
3640
}
3741

3842
function HeroStripes() {
3943
return (
40-
<div className="pointer-events-none absolute right-0 top-0 h-full overflow-hidden">
44+
<div className="pointer-events-none relative overflow-hidden max-lg:h-[210px]">
45+
<ImageLoaded
46+
image={logoBlurred}
47+
className="relative h-full bg-gradient-to-b from-pri-base to-pri-lighter opacity-0 transition-opacity duration-[1.5s] [mask-position:center_12%] [mask-size:110%] data-[loaded=true]:opacity-100 dark:to-pri-base lg:[mask-position:7%_7%] lg:[mask-size:200%]"
48+
style={{
49+
maskImage: `url(${logoBlurred.src})`,
50+
maskRepeat: "no-repeat",
51+
}}
52+
/>
4153
<StripesDecoration
4254
stripeWidth="5px"
43-
oddClassName="bg-gradient-to-b from-sec-base to-pri-lighter"
55+
oddClassName="bg-gradient-to-b from-sec-base to-pri-lighter dark:from-sec-darker dark:to-pri-darker"
4456
/>
4557
</div>
4658
)
1.49 MB
Loading
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
import Link from "next/link"
2+
import { CodeA, CodeB, CodeC } from "../code-blocks"
3+
import { clsx } from "clsx"
4+
5+
export function HowItWorks() {
6+
return (
7+
<div className="[background:url('/img/graph-wash.png'),#171e26_repeat_center_center] xl:py-20">
8+
<div className="conf-block container">
9+
<section
10+
className={clsx(
11+
"flex flex-wrap items-center justify-center gap-14 max-sm:flex-col",
12+
"[&_h3]:text-2xl [&_h3]:text-white max-lg:[&_h3]:text-center",
13+
"[&_pre]:!bg-transparent [&_pre]:ring-0 [&_pre_span]:text-[--shiki-dark]",
14+
"[&_h3]:font-extralight",
15+
"[&_code]:whitespace-pre-wrap" /* fix scroll on mobile for code-blocks */,
16+
)}
17+
>
18+
<div>
19+
<h3>Describe your data</h3>
20+
<CodeA />
21+
</div>
22+
23+
<div>
24+
<h3>Ask for what you want</h3>
25+
<CodeB />
26+
</div>
27+
28+
<div>
29+
<h3>Get predictable results</h3>
30+
<CodeC />
31+
</div>
32+
</section>
33+
34+
<Link
35+
className="index-button mx-auto mt-10 block w-fit border-white text-white"
36+
href="/TODO"
37+
>
38+
Try it out live
39+
</Link>
40+
</div>
41+
</div>
42+
)
43+
}

src/components/index-page/index.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,13 @@ import { PowerFulTools } from "./powerful-tools"
66
import { WithoutVersion } from "./without-version"
77
import { BringYourOwnCode } from "./bring-your-own-code"
88
import { WhoIsUsing } from "./who-is-using"
9+
import { HowItWorks } from "./how-it-works"
910

1011
export function IndexPage() {
1112
return (
1213
<div className="index">
1314
<Hero />
15+
<HowItWorks />
1416
<section className="conf-block container flex max-w-3xl flex-col items-center text-center">
1517
<h2>A query language for your API</h2>
1618
<p>

src/globals.css

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
1-
@layer l-base, l-nextra;
2-
3-
@import "tailwindcss/base" layer(l-base);
4-
@import "nextra-theme-docs/style.css" layer(l-nextra);
1+
@import "./nextra-theme-docs.css";
2+
@import "tailwindcss/base";
53
@import "tailwindcss/utilities";
64
@import "tailwindcss/components";
75

6+
/* #region nextra tweaks (preferably removed later, replaced with components) */
7+
.nextra-nav-container > nav > div:nth-child(2) {
8+
margin-right: auto;
9+
}
10+
/* #endregion nextra tweaks */
11+
812
:root {
913
--foreground-rgb: 0, 0, 0;
1014
--background-start-rgb: 214, 219, 220;

0 commit comments

Comments
 (0)