Skip to content

Commit f34c76d

Browse files
authored
Merge pull request #31 from hasparus/new-landing--a-graphql-query
new landing — a graphql query
2 parents 49720e7 + 87cd293 commit f34c76d

File tree

8 files changed

+64
-50
lines changed

8 files changed

+64
-50
lines changed

next.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
import nextra from "nextra"
44
import path from "node:path"
55
import withLess from "next-with-less"
6-
import { remarkGraphiQLComment } from "./src/remark-graphiql-comment.js"
76
import fs from "fs"
87

8+
import { remarkGraphiQLComment } from "./src/remark-graphiql-comment.js"
9+
910
const vercelJSON = JSON.parse(fs.readFileSync("./vercel.json", "utf-8"))
1011

1112
const withNextra = nextra({

pnpm-lock.yaml

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

public/img/graph-wash.png

-22.6 KB
Binary file not shown.
Lines changed: 37 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,46 @@
1-
import Link from "next/link"
1+
import { ChevronRight } from "@/app/conf/_design-system/pixelarticons/chevron-right"
2+
import { Button } from "@/app/conf/_design-system/button"
3+
24
import { CodeA, CodeB, CodeC } from "../code-blocks"
3-
import { clsx } from "clsx"
5+
6+
const TRY_IT_OUT_URL = "https://graphql.org/swapi-graphql"
47

58
export function HowItWorks() {
69
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>
10+
<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>
15+
<h2 className="typography-h2 mb-6 lg:mb-16">A GraphQL Query</h2>
16+
<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">
17+
<ListItem text="Describe your data" code={<CodeA />} />
18+
<ListItem text="Ask for what you want" code={<CodeB />} />
19+
<ListItem text="Get predictable results" code={<CodeC />} />
20+
</ol>
2221

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>
22+
<Button className="mx-auto mt-8 w-fit lg:mt-16" href={TRY_IT_OUT_URL}>
23+
Try it out live
24+
</Button>
25+
</section>
26+
)
27+
}
3328

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>
29+
function ListItem({
30+
text,
31+
code,
32+
}: {
33+
text: React.ReactNode
34+
code: React.ReactNode
35+
}) {
36+
return (
37+
<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">
39+
{text}
40+
</div>
41+
<div className="mt-px bg-neu-0 md:pl-2 md:pt-2 max-md:[&_code>span]:!pl-0 [&_pre]:ring-0">
42+
{code}
4043
</div>
41-
</div>
44+
</li>
4245
)
4346
}

src/components/index-page/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { HowItWorks } from "./how-it-works"
1111

1212
export function IndexPage() {
1313
return (
14-
<div className="index">
14+
<div className="bg-neu-0">
1515
<Hero />
1616
<TrustedBy />
1717
<HowItWorks />

src/components/index-page/trusted-by/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ export function TrustedBy() {
115115
</div>
116116
<div
117117
className={clsx(
118-
"my-6 grid grid-cols-2 justify-center gap-px md:my-12 md:grid-cols-5 xl:my-16",
118+
"gql-radial-gradient my-6 grid grid-cols-2 justify-center gap-px md:my-12 md:grid-cols-5 xl:my-16",
119119
styles.logos,
120120
)}
121121
>
@@ -125,7 +125,7 @@ export function TrustedBy() {
125125
href={href}
126126
target="_blank"
127127
rel="noreferrer"
128-
className="group flex shrink-0 items-center justify-center bg-neu-0 p-10 before:inset-2 hover:before:bg-neu-100 dark:hover:before:bg-[#202219]"
128+
className="group relative flex shrink-0 items-center justify-center bg-neu-0 p-10 *:z-[1] before:absolute before:inset-2 hover:before:bg-neu-100/50 dark:hover:before:bg-[#202219]"
129129
>
130130
<Component />
131131
</a>

src/components/index-page/trusted-by/style.module.css

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,15 @@
11
.logos {
2-
background-image: radial-gradient(
3-
ellipse at 50% 50%,
4-
hsl(var(--color-neu-600)) 0%,
5-
transparent 75%
6-
);
7-
background-size: 100% 100%;
8-
background-position: center;
9-
background-repeat: no-repeat;
10-
112
& .shopify > svg {
123
transition: opacity 300ms cubic-bezier(0.075, 0.82, 0.165, 1);
134
}
145

156
& > a {
167
transition: background-color 300ms cubic-bezier(0.075, 0.82, 0.165, 1);
178

9+
&::before {
10+
transition: background-color 300ms cubic-bezier(0.075, 0.82, 0.165, 1);
11+
}
12+
1813
& :is(svg, path) {
1914
transition: fill 300ms cubic-bezier(0.075, 0.82, 0.165, 1);
2015
}

src/globals.css

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -520,6 +520,17 @@ div[id^="headlessui-menu-items"] {
520520
--navbar-h: var(--nextra-navbar-height);
521521
}
522522

523+
.gql-radial-gradient {
524+
background-image: radial-gradient(
525+
ellipse at 50% 50%,
526+
hsl(var(--color-neu-600)) 0%,
527+
transparent 75%
528+
);
529+
background-size: 100% 100%;
530+
background-position: center;
531+
background-repeat: no-repeat;
532+
}
533+
523534
:root {
524535
--navbar-h: 70px;
525536
}

0 commit comments

Comments
 (0)