Skip to content

Commit 4b9bcb0

Browse files
committed
Match icons, improve styles
1 parent 943f620 commit 4b9bcb0

File tree

5 files changed

+27
-32
lines changed

5 files changed

+27
-32
lines changed
File renamed without changes.

src/components/learn-aggregator/index.tsx

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ export function TeaserSection({
3535
return (
3636
<section
3737
className={clsx(
38-
"gql-container gql-section flex items-start gap-8 max-lg:flex-col lg:gap-12 xl:gap-16",
38+
"gql-container gql-section flex items-start gap-8 max-lg:flex-col max-lg:pt-6 lg:gap-12 xl:gap-16",
3939
className,
4040
)}
4141
{...rest}
4242
>
43-
<header className="flex max-w-[720px] flex-col gap-6 pt-6 text-left">
43+
<header className="flex max-w-[720px] flex-col gap-6 text-left lg:max-w-[540px]">
4444
<div className="flex flex-col gap-6">
4545
<Eyebrow>{eyebrow}</Eyebrow>
4646
<h2 className="typography-h2 text-pretty text-neu-900">{title}</h2>
@@ -50,7 +50,7 @@ export function TeaserSection({
5050
{cta}
5151
</div>
5252
</header>
53-
<ul className="flex flex-col gap-4 lg:gap-8">
53+
<ul className="grid grid-cols-1 justify-stretch gap-4 sm:max-lg:grid-cols-2 lg:gap-8">
5454
{items.map((item, index) => {
5555
return (
5656
<TeaserSectionListItem
@@ -65,7 +65,7 @@ export function TeaserSection({
6565
src={item.icon}
6666
width={72}
6767
height={72}
68-
className="aspect-square"
68+
className="aspect-square lg:size-[138px]"
6969
loading={index < 2 && firstIconsEager ? "eager" : "lazy"}
7070
alt=""
7171
/>
@@ -97,12 +97,12 @@ function TeaserSectionListItem({
9797
href,
9898
}: TeaserSectionListItemProps) {
9999
return (
100-
<li className="text-neu-900">
100+
<li className="flex text-neu-900">
101101
<a
102102
href={href}
103-
className="gql-focus-visible grid border border-neu-200 bg-neu-0 transition-colors [grid-template-areas:'icon_header''desc_desc'] [grid-template-columns:72px_1fr] [grid-template-rows:auto_auto] hover:border-neu-300 hover:ring hover:ring-neu-100 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 dark:hover:ring-neu-50 lg:[grid-template-areas:'icon_header_arrow''icon_desc_arrow'] lg:[grid-template-columns:190px_1fr_64px]"
103+
className="gql-focus-visible grid border border-neu-200 bg-neu-0 transition-colors [grid-template-areas:'icon_header''desc_desc'] [grid-template-columns:72px_1fr] [grid-template-rows:auto_1fr] hover:border-neu-300 hover:ring hover:ring-neu-100 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 dark:hover:ring-neu-50 lg:[grid-template-areas:'icon_header_header''icon_desc_arrow'] lg:[grid-template-columns:190px_1fr_64px]"
104104
>
105-
<div
105+
<span
106106
className={clsx(
107107
"flex size-[72px] items-center justify-center border-neu-200 p-2 [grid-area:icon] lg:size-[190px]",
108108
section === "getting-started" &&
@@ -112,24 +112,24 @@ function TeaserSectionListItem({
112112
)}
113113
>
114114
{icon}
115-
</div>
115+
</span>
116116

117-
<div className="flex flex-col gap-1 px-2 pt-2 [grid-area:header] lg:px-4 lg:pt-4">
118-
<span className="typography-body-sm text-neu-700">
117+
<span className="flex flex-col gap-1 px-2 pt-2 [grid-area:header] lg:px-4 lg:pt-4">
118+
<span className="typography-body-sm text-neu-700 max-lg:typography-body-md">
119119
Lesson {number}
120120
</span>
121-
<strong className="typography-h3 font-normal text-neu-900">
121+
<span className="typography-h3 font-normal text-neu-900">
122122
{title}
123-
</strong>
124-
</div>
123+
</span>
124+
</span>
125125

126-
<p className="typography-body-sm text-pretty p-4 text-neu-900 [grid-area:desc] max-lg:border-t max-lg:border-neu-200">
126+
<p className="typography-body-sm text-pretty p-4 text-neu-900 [grid-area:desc] max-lg:typography-body-md max-lg:border-t max-lg:border-neu-200">
127127
{description}
128128
</p>
129129

130-
<div className="hidden items-center justify-center place-self-end border-l border-t border-neu-200 p-4 [grid-area:arrow] lg:flex">
130+
<span className="hidden items-center justify-center place-self-end border-l border-t border-neu-200 p-4 [grid-area:arrow] lg:flex">
131131
<ArrowDownIcon className="size-8 shrink-0 -rotate-90" />
132-
</div>
132+
</span>
133133
</a>
134134
</li>
135135
)

src/components/learn-aggregator/learn-pages.tsx

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -69,16 +69,11 @@ const _items: Record<
6969
section: "getting-started",
7070
},
7171
// ---
72-
"best-practices": {
73-
description:
74-
"Practical guidance for common GraphQL concerns like networking, authorization, and pagination.",
75-
icon: new URL("./assets/books.svg", import.meta.url).href,
76-
section: "best-practices",
77-
},
72+
"best-practices": null,
7873
"thinking-in-graphs": {
7974
description:
8075
"Learn how to shift your mindset from RESTful endpoints to graph-based thinking, aligning your schema with business logic and legacy systems.",
81-
icon: new URL("./assets/layer.svg", import.meta.url).href,
76+
icon: new URL("./assets/share.svg", import.meta.url).href,
8277
section: "best-practices",
8378
},
8479
"serving-over-http": {
@@ -102,25 +97,25 @@ const _items: Record<
10297
pagination: {
10398
description:
10499
"Discover different pagination strategies in GraphQL, from simple slicing to fully connected edges and nodes.",
105-
icon: new URL("./assets/checkbox.svg", import.meta.url).href,
100+
icon: new URL("./assets/layer.svg", import.meta.url).href,
106101
section: "best-practices",
107102
},
108103
"schema-design": {
109104
description:
110105
"Learn how to design clear, adaptable schemas — including versioning and thoughtful use of nullability.",
111-
icon: new URL("./assets/cog-double.svg", import.meta.url).href,
106+
icon: new URL("./assets/solve.svg", import.meta.url).href,
112107
section: "best-practices",
113108
},
114109
"global-object-identification": {
115110
description:
116111
"Use globally unique IDs and the Node interface to enable caching, refetching, and efficient schema traversal.",
117-
icon: new URL("./assets/dna.svg", import.meta.url).href,
112+
icon: new URL("./assets/product-check.svg", import.meta.url).href,
118113
section: "best-practices",
119114
},
120115
caching: {
121116
description:
122117
"Explore caching techniques and ID strategies that make client-side performance and object reuse more effective.",
123-
icon: new URL("./assets/sync-square.svg", import.meta.url).href,
118+
icon: new URL("./assets/books.svg", import.meta.url).href,
124119
section: "best-practices",
125120
},
126121
performance: {
@@ -138,13 +133,13 @@ const _items: Record<
138133
federation: {
139134
description:
140135
"Learn how GraphQL federation enables modular, scalable APIs by composing services into a unified schema.",
141-
icon: new URL("./assets/globe.svg", import.meta.url).href,
136+
icon: new URL("./assets/circuit.svg", import.meta.url).href,
142137
section: "best-practices",
143138
},
144139
"debug-errors": {
145140
description:
146141
"Learn about common 'graphql-http' errors and how to debug them.",
147-
icon: new URL("./assets/solve.svg", import.meta.url).href,
142+
icon: new URL("./assets/construction.svg", import.meta.url).href,
148143
section: "best-practices",
149144
},
150145
}

src/components/toc-hero/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export function TocHero({ heading, text, children, decoration }: TocHeroProps) {
1212
{decoration}
1313
<div className="gql-section gql-container relative flex !max-w-screen-lg flex-col items-center gap-6 text-center lg:gap-8 xl:!max-w-screen-xl">
1414
<h1 className="typography-h1">{heading}</h1>
15-
<p className="typography-body-sm max-w-[80vw] text-pretty">{text}</p>
15+
<p className="typography-body-md max-w-[80vw] text-pretty">{text}</p>
1616
{children}
1717
</div>
1818
</section>

src/pages/learn/index.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ import { NavbarFixed } from '../../components/navbar/navbar-fixed'
3333
description=
3434
"In this tutorial-style introduction to GraphQL, you'll learn the core concepts that power every GraphQL API. Follow a step-by-step path from basic queries to advanced features."
3535
cta={
36-
<Button href="/learn/introduction" className='lg:w-fit'>
36+
<Button href="/learn/introduction" className='md:w-fit'>
3737
Start learning
3838
</Button>
3939
}
@@ -48,7 +48,7 @@ import { NavbarFixed } from '../../components/navbar/navbar-fixed'
4848
description=
4949
"Here you'll explore real-world strategies for designing and operating GraphQL APIs. These guides will help you build for scale and safety."
5050
cta={
51-
<Button href="/learn/best-practices" className='lg:w-fit'>
51+
<Button href="/learn/best-practices" className='md:w-fit'>
5252
Explore all best practices
5353
</Button>
5454
}

0 commit comments

Comments
 (0)