Skip to content

Commit 9e47170

Browse files
committed
Lay out the new TrustedBy section
1 parent 21d7e83 commit 9e47170

File tree

4 files changed

+149
-0
lines changed

4 files changed

+149
-0
lines changed

src/components/index-page/index.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { Hero } from "./hero"
2+
import { TrustedBy } from "./trusted-by"
23
import { PredictableResults } from "./predictable-results"
34
import { SingleRequest } from "./single-request"
45
import { TypeSystem } from "./type-system"
@@ -12,6 +13,7 @@ export function IndexPage() {
1213
return (
1314
<div className="index">
1415
<Hero />
16+
<TrustedBy />
1517
<HowItWorks />
1618
<section className="conf-block container flex max-w-3xl flex-col items-center text-center">
1719
<h2>A query language for your API</h2>
Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
import { clsx } from "clsx"
2+
3+
import { Button } from "@/app/conf/_design-system/button"
4+
5+
import MetaLockup from "./logos/Meta.svg?svgr"
6+
import IBMWordmark from "./logos/IBM.svg?svgr"
7+
import AirBnBLockup from "./logos/AirBnB.svg?svgr"
8+
import IntuitWordmark from "./logos/Intuit.svg?svgr"
9+
import AWSLogo from "./logos/AWS.svg?svgr"
10+
import PayPalWordmark from "./logos/PayPal.svg?svgr"
11+
import NewYorkTimesWordmark from "./logos/NewYorkTimes.svg?svgr"
12+
import StarbucksWordmark from "./logos/Starbucks.svg?svgr"
13+
import ShopifyLockup from "./logos/Shopify.svg?svgr"
14+
import GitHubLockup from "./logos/GitHub.svg?svgr"
15+
16+
import styles from "./style.module.css"
17+
18+
const logos: LogoListItem[] = [
19+
{
20+
href: "https://meta.com",
21+
alt: "Meta",
22+
component: MetaLockup,
23+
},
24+
{
25+
href: "https://aws.amazon.com",
26+
alt: "AWS",
27+
component: props => (
28+
<AWSLogo {...props} className={clsx(props.className, "w-[110px]")} />
29+
),
30+
},
31+
32+
// todo: Netflix?
33+
// {
34+
// href: "https://netflix.com",
35+
// alt: "Netflix",
36+
// component: NetflixWordmark,
37+
// },
38+
{
39+
href: "https://airbnb.com",
40+
alt: "Airbnb",
41+
component: AirBnBLockup,
42+
},
43+
{
44+
href: "https://intuit.com",
45+
alt: "Intuit",
46+
component: IntuitWordmark,
47+
},
48+
49+
{
50+
href: "https://ibm.com",
51+
alt: "IBM",
52+
component: props => (
53+
<IBMWordmark {...props} className={clsx(props.className, "w-[140px]")} />
54+
),
55+
},
56+
57+
{
58+
href: "https://paypal.com",
59+
alt: "PayPal",
60+
component: PayPalWordmark,
61+
},
62+
{
63+
href: "https://nytimes.com",
64+
alt: "New York Times",
65+
component: NewYorkTimesWordmark,
66+
},
67+
{
68+
href: "https://starbucks.com",
69+
alt: "Starbucks",
70+
component: props => (
71+
<StarbucksWordmark
72+
{...props}
73+
className={clsx(props.className, "w-[200px] -translate-x-1.5")}
74+
/>
75+
),
76+
},
77+
{
78+
href: "https://shopify.com",
79+
alt: "Shopify",
80+
component: ShopifyLockup,
81+
},
82+
{
83+
href: "https://github.com",
84+
alt: "GitHub",
85+
component: GitHubLockup,
86+
},
87+
]
88+
89+
export function TrustedBy() {
90+
return (
91+
<section className="gql-section gql-container bg-neu-0 py-8 lg:py-16 xl:py-24">
92+
<div className="flex flex-wrap justify-between gap-6">
93+
<h2 className="typography-h3 max-w-[474px] text-neu-800">
94+
GraphQL is open source and trusted by the industry
95+
</h2>
96+
<p className="typography-body-md max-w-[624px] text-neu-700">
97+
Facebook's mobile apps have been powered by GraphQL since 2012. A
98+
GraphQL spec was open-sourced in 2015. Now it is used by
99+
industry-leading companies worldwide and supported by the GraphQL
100+
Foundation, hosted since 2018 by the non-profit Linux Foundation.
101+
</p>
102+
</div>
103+
<div
104+
className={clsx(
105+
"mt-6 flex flex-wrap justify-center bg-neu-400 md:my-12 xl:my-16 xl:grid xl:grid-cols-5 xl:gap-px",
106+
styles.logos,
107+
)}
108+
>
109+
{logos.map(({ alt, href, component: Component }) => (
110+
<a
111+
key={alt}
112+
href={href}
113+
target="_blank"
114+
rel="noreferrer"
115+
className="flex shrink-0 items-center justify-center bg-neu-0 p-4 hover:bg-neu-100 md:p-6 lg:p-8 xl:p-10"
116+
>
117+
<Component />
118+
</a>
119+
))}
120+
</div>
121+
122+
<Button href="/users" className="mx-auto w-fit">
123+
More GraphQL users
124+
</Button>
125+
</section>
126+
)
127+
}
128+
129+
interface LogoListItem {
130+
href: string
131+
alt: string
132+
component: React.FC<{ className?: string }>
133+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.logos > a {
2+
transition: background-color 250ms cubic-bezier(0.075, 0.82, 0.165, 1);
3+
4+
& :is(svg, path) {
5+
transition: fill 250ms cubic-bezier(0.075, 0.82, 0.165, 1);
6+
}
7+
8+
&:not(:hover) :is(svg, path) {
9+
fill: hsl(var(--color-neu-600));
10+
}
11+
}

src/components/index-page/who-is-using.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ import shopifyLogo from "../../../public/users/logos/shopify.png"
88
import NextImage from "next-image-export-optimizer"
99
import { clsx } from "clsx"
1010

11+
/**
12+
* @deprecated
13+
*/
1114
export function WhoIsUsing() {
1215
return (
1316
<div className="index-gradient">

0 commit comments

Comments
 (0)