Skip to content

Commit 4346f90

Browse files
committed
Developer SDK page
1 parent 8650a89 commit 4346f90

18 files changed

Lines changed: 269 additions & 121 deletions

client/src/app.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
}
1010

1111
body {
12-
all: unset;
12+
margin: 0;
13+
padding: 0;
1314
}
1415

1516
p {

client/src/app.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@ import { zappyBirdRoute, zappyLayoutRoute } from "./routes/zappy-bird";
1111
import { useUserProfile } from "./endpoints";
1212
import { useBoltSessionVerification } from "./hooks/useBoltSessionVerification";
1313
import { productsRoute } from "./routes/products";
14+
import { sdksRoute } from "./routes/sdks";
1415

1516
const routeTree = rootRoute.addChildren([
16-
standardLayoutRoute.addChildren([productsRoute]),
17+
standardLayoutRoute.addChildren([productsRoute, sdksRoute]),
1718
zappyLayoutRoute.addChildren([zappyBirdRoute]),
1819
]);
1920

client/src/assets/icon-js.png

9.55 KB
Loading

client/src/assets/icon-unity.png

3.78 KB
Loading

client/src/assets/preview-js.jpg

76.6 KB
Loading
1.06 MB
Loading
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
.pageLayout {
2+
--surface-purple: #f8f6fe;
3+
4+
position: relative;
5+
background-color: var(--surface-purple);
6+
overflow: hidden;
7+
min-height: 100vh;
8+
display: flex;
9+
justify-content: center;
10+
}
11+
12+
.pageLayout::before {
13+
content: "";
14+
position: absolute;
15+
top: 0;
16+
right: 0;
17+
width: 364px;
18+
height: 640px;
19+
background-image: url("../../assets/brand-background-top-corner.svg");
20+
background-size: contain;
21+
background-repeat: no-repeat;
22+
filter: blur(2px);
23+
pointer-events: none;
24+
z-index: 0;
25+
}
26+
27+
.pageLayout::after {
28+
content: "";
29+
position: absolute;
30+
bottom: 0;
31+
left: 0;
32+
width: 364px;
33+
height: 640px;
34+
background-image: url("../../assets/brand-background-bottom-corner.svg");
35+
background-size: contain;
36+
background-repeat: no-repeat;
37+
filter: blur(2px);
38+
pointer-events: none;
39+
z-index: 0;
40+
}
41+
42+
.content {
43+
position: relative;
44+
max-width: 915px;
45+
width: 100%;
46+
margin-inline: 2rem;
47+
margin-block: 6rem;
48+
z-index: 1;
49+
}
50+
51+
.hero {
52+
display: flex;
53+
flex-direction: column;
54+
align-items: center;
55+
gap: var(--bolt-space-2);
56+
57+
margin-bottom: var(--bolt-space-8);
58+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import type { JSX } from "preact/jsx-runtime";
2+
import styles from "./PageLayout.module.css";
3+
4+
export interface PageLayoutProps {
5+
children: JSX.Element;
6+
}
7+
8+
export function PageLayout({ children }: PageLayoutProps) {
9+
return <div className={styles.pageLayout}>{children}</div>;
10+
}
11+
12+
export interface PageLayoutContentProps {
13+
children: JSX.Element | JSX.Element[];
14+
}
15+
16+
function Content({ children }: PageLayoutContentProps) {
17+
return <div className={styles.content}>{children}</div>;
18+
}
19+
20+
export interface PageLayoutHeroProps {
21+
children: JSX.Element | JSX.Element[];
22+
}
23+
24+
function Hero({ children }: PageLayoutHeroProps) {
25+
return <section className={styles.hero}>{children}</section>;
26+
}
27+
28+
PageLayout.Hero = Hero;
29+
PageLayout.Content = Content;

client/src/pages/products/Section.module.css renamed to client/src/components/section/Section.module.css

Lines changed: 6 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
.sections {
2+
display: grid;
3+
grid-template-columns: 1fr max-content;
4+
gap: 7rem;
5+
}
6+
17
.section {
28
display: grid;
39
grid-template-columns: subgrid;
@@ -16,29 +22,6 @@
1622
margin-top: var(--bolt-space-6);
1723
}
1824

19-
.preview {
20-
display: flex;
21-
align-items: center;
22-
}
23-
24-
.preview img {
25-
user-select: none;
26-
pointer-events: none;
27-
}
28-
.previewAd {
29-
opacity: 1;
30-
height: 400px;
31-
z-index: 1;
32-
border-radius: var(--bolt-border-radius-lg);
33-
box-shadow: var(--global-shadow3);
34-
}
35-
36-
.previewGame {
37-
opacity: 0.5;
38-
height: 250px;
39-
margin-left: -80px;
40-
}
41-
4225
@media (width < 768px) {
4326
.section {
4427
grid-template-columns: 1fr;
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import type { JSX } from "preact/jsx-runtime";
12
import { Button } from "../../design/button/Button";
23
import { Heading1 } from "../../design/heading/Heading";
34
import { TextBlock } from "../../design/text-block/TextBlock";
@@ -8,31 +9,34 @@ export interface SectionProps {
89
iconUrl: string;
910
title: string;
1011
description: string;
11-
experienceUrl: string;
12-
previewAdUrl: string;
13-
previewGameUrl: string;
12+
experience: {
13+
url: string;
14+
label: string;
15+
};
16+
preview: JSX.Element | JSX.Element[];
1417
}
1518

1619
export function Section(props: SectionProps) {
17-
const { iconUrl, title, description, previewAdUrl, previewGameUrl } = props;
20+
const { iconUrl, title, description, experience, preview } = props;
1821
return (
1922
<section className={styles.section}>
2023
<div className={styles.sectionContent}>
21-
<img src={iconUrl} width={88} height={88} alt="Swipe-able Ads" />
24+
<img src={iconUrl} height={80} alt="Swipe-able Ads" />
2225
<Heading1 large>{title}</Heading1>
2326
<TextBlock size="large">{description}</TextBlock>
2427

25-
<Button>View Experience</Button>
28+
<Button>{experience.label}</Button>
2629
</div>
2730

28-
<div className={styles.preview}>
29-
<img src={previewAdUrl} className={styles.previewAd} alt="Preview Ad" />
30-
<img
31-
src={previewGameUrl}
32-
className={styles.previewGame}
33-
alt="Preview Game"
34-
/>
35-
</div>
31+
{preview}
3632
</section>
3733
);
3834
}
35+
36+
export interface SectionsProps {
37+
children: JSX.Element | JSX.Element[];
38+
}
39+
40+
export function Sections({ children }: SectionsProps) {
41+
return <div className={styles.sections}>{children}</div>;
42+
}

0 commit comments

Comments
 (0)