Skip to content

Commit daab916

Browse files
committed
Add Data Colocation section
1 parent 5eb7c77 commit daab916

File tree

16 files changed

+273
-43
lines changed

16 files changed

+273
-43
lines changed

src/app/conf/2025/components/testimonials/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export function TestimonialsList({
8585
className="flex shrink-0 snap-start flex-row-reverse items-center gap-6 max-md:flex-col md:px-10"
8686
>
8787
<div>
88-
<p className="typography-body-lg max-w-[calc(100vw-32px)] !leading-[1.1] max-md:text-center md:max-w-[544px]">
88+
<p className="typography-body-lg max-w-[100vw] !leading-[1.1] max-md:text-center sm:max-w-[calc(100vw-32px)] md:max-w-[544px]">
8989
{testimonial.quote}
9090
</p>
9191
<AuthorNameAndRole
Lines changed: 3 additions & 0 deletions
Loading

src/app/env.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ declare module "*.svg?svgr" {
1212
export default content
1313
}
1414

15-
declare module "*.mdx?raw" {
15+
declare module "*?raw" {
1616
const content: string
1717
export default content
1818
}

src/components/index-page/data-colocation/component-tree.tsx

Lines changed: 33 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import ModemIcon from "@/app/conf/_design-system/pixelarticons/modem.svg?svgr"
22
import clsx from "clsx"
33

44
const INNER_BOX_SIZE = 16
5-
const GAP_X = 32
65

76
interface ComponentTreeProps extends React.HTMLAttributes<HTMLDivElement> {
87
names: [string, string, string, string]
@@ -14,86 +13,86 @@ export function ComponentTree({
1413
...rest
1514
}: ComponentTreeProps) {
1615
return (
17-
<div className={clsx("mx-auto flex gap-x-20", className)} {...rest}>
16+
<div
17+
className={clsx(
18+
"mx-auto flex max-w-[500px] justify-between [--gap-x:20px] md:gap-x-10 md:[--gap-x:32px] 3xl:gap-x-20",
19+
className,
20+
)}
21+
{...rest}
22+
>
1823
<div className="flex flex-col">
1924
<div className="flex h-12 items-center">
20-
<ComponentLabel bgColor="bg-neu-0" borderColor="border-neu-300">
25+
<ComponentLabel className="border-neu-300 bg-neu-0 dark:border-neu-200">
2126
{names[0]}
2227
</ComponentLabel>
2328
</div>
2429

2530
<div className="h-4" />
2631

2732
<div className="flex h-12 items-center">
28-
<ComponentLabel bgColor="bg-neu-400" borderColor="border-neu-600">
33+
<ComponentLabel className="border-neu-600 bg-neu-400 dark:border-neu-200 dark:bg-neu-50">
2934
{names[1]}
3035
</ComponentLabel>
3136
</div>
3237

3338
<div className="h-4" />
3439

3540
<div className="flex h-12 items-center">
36-
<ComponentLabel
37-
bgColor="bg-sec-lighter"
38-
borderColor="border-sec-base"
39-
>
41+
<ComponentLabel className="border-sec-base bg-sec-lighter dark:border-sec-dark dark:bg-sec-darker/50">
4042
{names[2]}
4143
</ComponentLabel>
4244
</div>
4345

4446
<div className="h-4" />
4547

4648
<div className="flex h-12 items-center">
47-
<ComponentLabel
48-
bgColor="bg-pri-lighter/40"
49-
borderColor="border-pri-base"
50-
>
49+
<ComponentLabel className="border-pri-base bg-pri-lighter/40 dark:border-pri-dark dark:bg-pri-darker/50">
5150
{names[3]}
5251
</ComponentLabel>
5352
</div>
5453
</div>
5554

5655
<div className="flex flex-col items-center">
57-
<div className="flex size-12 items-center justify-center bg-neu-100">
58-
<ModemIcon className="size-8 text-neu-600" />
56+
<div className="flex size-12 items-center justify-center bg-neu-100 dark:bg-neu-50">
57+
<ModemIcon className="size-6 text-neu-600" />
5958
</div>
6059

61-
<div className="h-4 w-px bg-neu-300" />
60+
<div className="h-4 w-px bg-neu-300 dark:bg-neu-100" />
6261

6362
<NestedBox
64-
bgColor="bg-neu-600"
63+
bgColor="bg-neu-600 dark:bg-neu-200"
6564
middleColor="bg-sec-base"
6665
innerColor="bg-pri-base"
6766
/>
6867

6968
<Fork
70-
className="text-neu-300"
69+
className="text-neu-300 dark:text-neu-100"
7170
style={{
72-
width: `calc(100% - ${GAP_X + INNER_BOX_SIZE * 5.75}px)`,
71+
width: `calc(100% - var(--gap-x) - ${INNER_BOX_SIZE * 5.75}px)`,
7372
}}
7473
/>
7574

76-
<div className="flex" style={{ gap: GAP_X }}>
75+
<div className="flex gap-[--gap-x]">
7776
<div className="flex flex-col items-center">
7877
<NestedBox
79-
bgColor="bg-neu-100"
78+
bgColor="bg-neu-100 dark:bg-neu-50"
8079
middleColor="bg-sec-base"
8180
innerColor="bg-pri-base"
8281
/>
83-
<Fork className="text-neu-300" />
84-
<div className="flex" style={{ gap: GAP_X }}>
82+
<Fork className="text-neu-300 dark:text-neu-100" />
83+
<div className="flex gap-[--gap-x]">
8584
<LeafBox />
8685
<LeafBox />
8786
</div>
8887
</div>
8988
<div className="flex flex-col items-center">
9089
<NestedBox
91-
bgColor="bg-neu-100"
90+
bgColor="bg-neu-100 dark:bg-neu-50"
9291
middleColor="bg-sec-base"
9392
innerColor="bg-pri-base"
9493
/>
95-
<Fork className="text-neu-300" />
96-
<div className="flex" style={{ gap: GAP_X }}>
94+
<Fork className="text-neu-300 dark:text-neu-100" />
95+
<div className="flex gap-[--gap-x]">
9796
<LeafBox />
9897
<LeafBox />
9998
</div>
@@ -124,26 +123,26 @@ function NestedBox({ bgColor, middleColor, innerColor }: NestedBoxProps) {
124123

125124
interface ComponentLabelProps {
126125
children: React.ReactNode
127-
bgColor: string
128-
borderColor: string
126+
className: string
129127
}
130128

131-
function ComponentLabel({
132-
children,
133-
bgColor,
134-
borderColor,
135-
}: ComponentLabelProps) {
129+
function ComponentLabel({ children, className }: ComponentLabelProps) {
136130
return (
137131
<div
138-
className={`rounded border ${borderColor} ${bgColor} px-1 py-0.5 font-mono text-[10px] text-neu-800`}
132+
className={clsx(
133+
"rounded border px-1 py-0.5 font-mono text-[10px] text-neu-800 dark:font-medium",
134+
className,
135+
)}
139136
>
140137
{children}
141138
</div>
142139
)
143140
}
144141

145142
function LeafBox() {
146-
return <NestedBox bgColor="bg-neu-100" innerColor="bg-pri-base" />
143+
return (
144+
<NestedBox bgColor="bg-neu-100 dark:bg-neu-50" innerColor="bg-pri-base" />
145+
)
147146
}
148147

149148
function Fork(props: React.SVGProps<SVGSVGElement>) {
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"friends": [
3+
{
4+
"name": "Trudie",
5+
"profilePic": "trudie.webp",
6+
"mutualFriendsCount": 120,
7+
"isSubscribed": true,
8+
"username": "funkytrudster89",
9+
"email": "[email protected]",
10+
"location": "New York, USA"
11+
},
12+
{
13+
"name": "Frances",
14+
"profilePic": "frances.webp",
15+
"mutualFriendsCount": 42,
16+
"isSubscribed": false,
17+
"username": "frannyfran12",
18+
"email": "[email protected]",
19+
"location": "Madrid, Spain"
20+
},
21+
{
22+
"name": "Fernando",
23+
"profilePic": "fernando.webp",
24+
"mutualFriendsCount": 114,
25+
"isSubscribed": true,
26+
"username": "fern_whirlwind",
27+
"email": "[email protected]",
28+
"location": "Amsterdam, Netherlands"
29+
}
30+
]
31+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
```graphql
2+
query GetFriendList {
3+
...FriendList
4+
}
5+
6+
fragment FriendList on Query {
7+
friends {
8+
...FriendListItem
9+
}
10+
}
11+
12+
fragment FriendListItem on Friend {
13+
name
14+
profilePic
15+
mutualFriendsCount
16+
isSubscribed
17+
...FriendInfo
18+
}
19+
20+
fragment FriendInfo on Friend {
21+
username
22+
email
23+
location
24+
}
25+
```
Binary file not shown.
Binary file not shown.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import trudie from "./trudie.webp"
2+
import frances from "./frances.webp"
3+
import fernando from "./fernando.webp"
4+
5+
export const friendAvatars = {
6+
trudie,
7+
frances,
8+
fernando,
9+
}
Binary file not shown.

0 commit comments

Comments
 (0)