Skip to content

Commit 6c8e45e

Browse files
authored
Merge pull request #28 from hasparus/new-landing--hero
new landing — hero
2 parents f608c1a + 9cc8b37 commit 6c8e45e

File tree

15 files changed

+3969
-645
lines changed

15 files changed

+3969
-645
lines changed

next.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import fs from "fs"
99
const vercelJSON = JSON.parse(fs.readFileSync("./vercel.json", "utf-8"))
1010

1111
const withNextra = nextra({
12+
autoImportThemeStyle: false,
1213
theme: "nextra-theme-docs",
1314
themeConfig: "./theme.config.tsx",
1415
mdxOptions: {

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,13 @@
4848
"next-query-params": "^5.0.1",
4949
"next-sitemap": "^4.2.3",
5050
"next-with-less": "^3.0.1",
51-
"nextra": "3.0.0-alpha.28",
52-
"nextra-theme-docs": "3.0.0-alpha.28",
51+
"nextra": "^3",
52+
"nextra-theme-docs": "^3",
5353
"numbro": "2.5.0",
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",
@@ -97,7 +98,7 @@
9798
},
9899
"pnpm": {
99100
"patchedDependencies": {
100-
"nextra@3.0.0-alpha.28": "patches/nextra@3.0.0-alpha.22.patch"
101+
"nextra": "patches/nextra.patch"
101102
}
102103
}
103104
}

patches/nextra.patch

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
diff --git a/dist/client/components/image.js b/dist/client/components/image.js
2+
index 239d72f5921e2d1b7359e569ae5b74c12d7c9d8a..ebeb619da1e3ccb7722e9388c92c1e2192527027 100644
3+
--- a/dist/client/components/image.js
4+
+++ b/dist/client/components/image.js
5+
@@ -1,5 +1,5 @@
6+
import { jsx } from "react/jsx-runtime";
7+
-import NextImage from "next/image";
8+
+import NextImage from "next-image-export-optimizer";
9+
import { forwardRef } from "react";
10+
const Image = forwardRef((props, ref) => {
11+
const ComponentToUse = typeof props.src === "object" ? NextImage : "img";
12+
diff --git a/dist/client/normalize-pages.js b/dist/client/normalize-pages.js
13+
index 15afee0c1de26f47d781f423e5ec32e33ad925d3..fefd01736bd2b778df275bf50ac48384d5f63845 100644
14+
--- a/dist/client/normalize-pages.js
15+
+++ b/dist/client/normalize-pages.js
16+
@@ -103,7 +103,9 @@ The field key "${metaKey}.items.${key}" in \`_meta\` file refers to a page that
17+
}
18+
if (item) continue;
19+
if (typeof window === "undefined") {
20+
- const isValid = metaItem.type === "separator" || metaItem.type === "menu" || metaItem.href;
21+
+ const isValid = metaItem.type === "separator" || metaItem.type === "menu" || metaItem.href
22+
+ // workaround
23+
+ || metaKey === 'conf';
24+
if (!isValid) {
25+
throw new Error(
26+
`Validation of "_meta" file has failed.

patches/[email protected]

Lines changed: 0 additions & 26 deletions
This file was deleted.

pnpm-lock.yaml

Lines changed: 770 additions & 543 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
}
Lines changed: 11 additions & 0 deletions
Loading

src/components/index-page/hero.tsx

Lines changed: 49 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,59 @@
1-
import Link from "next/link"
2-
import { CodeA, CodeB, CodeC } from "../code-blocks"
3-
import { GraphQLLogo } from "@/icons"
4-
import { clsx } from "clsx"
1+
import { StripesDecoration } from "@/app/conf/_design-system/stripes-decoration"
2+
import CheckIcon from "@/app/conf/_design-system/pixelarticons/check.svg?svgr"
3+
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"
57

68
export function Hero() {
79
return (
8-
<div className="[background:url('/img/graph-wash.png'),#171e26_repeat_center_center] xl:py-20">
9-
<div className="conf-block container">
10-
<section
11-
className={clsx(
12-
"flex flex-wrap items-center justify-center gap-14 max-sm:flex-col",
13-
"[&_h3]:text-2xl [&_h3]:text-white max-lg:[&_h3]:text-center",
14-
"[&_pre]:!bg-transparent [&_pre]:ring-0 [&_pre_span]:text-[--shiki-dark]",
15-
"[&_h3]:font-extralight",
16-
"[&_code]:whitespace-pre-wrap" /* fix scroll on mobile for code-blocks */,
17-
)}
18-
>
19-
<div className="flex flex-col items-center gap-2 max-xl:w-full max-md:grow">
20-
<GraphQLLogo className="w-24" />
21-
<h1 className="text-3xl text-primary">GraphQL</h1>
22-
</div>
23-
24-
<div>
25-
<h3>Describe your data</h3>
26-
<CodeA />
27-
</div>
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>
2816

29-
<div>
30-
<h3>Ask for what you want</h3>
31-
<CodeB />
32-
</div>
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>
3329

34-
<div>
35-
<h3>Get predictable results</h3>
36-
<CodeC />
30+
<div className="flex items-center gap-4">
31+
<Button href="/learn" className="max-sm:w-full">
32+
Learn more
33+
</Button>
3734
</div>
38-
</section>
39-
40-
<Link
41-
className="index-button mx-auto mt-10 block w-fit border-white text-white"
42-
href="/learn"
43-
>
44-
Get Started
45-
</Link>
35+
</div>
36+
<HeroStripes />
4637
</div>
4738
</div>
4839
)
4940
}
41+
42+
function HeroStripes() {
43+
return (
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+
/>
53+
<StripesDecoration
54+
stripeWidth="5px"
55+
oddClassName="bg-gradient-to-b from-sec-base to-pri-lighter dark:from-sec-darker dark:to-pri-darker"
56+
/>
57+
</div>
58+
)
59+
}
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+
}

0 commit comments

Comments
 (0)