Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion client/src/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,14 @@
}

body {
all: unset;
margin: 0;
padding: 0;
}

body.modal-open {
position: fixed;
width: 100%;
overflow: hidden;
}

p {
Expand Down
3 changes: 2 additions & 1 deletion client/src/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ import { zappyBirdRoute, zappyLayoutRoute } from "./routes/zappy-bird";
import { useUserProfile } from "./endpoints";
import { useBoltSessionVerification } from "./hooks/useBoltSessionVerification";
import { productsRoute } from "./routes/products";
import { sdksRoute } from "./routes/sdks";

const routeTree = rootRoute.addChildren([
standardLayoutRoute.addChildren([productsRoute]),
standardLayoutRoute.addChildren([productsRoute, sdksRoute]),
zappyLayoutRoute.addChildren([zappyBirdRoute]),
]);

Expand Down
Binary file added client/src/assets/preview-js.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client/src/assets/preview-unity.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
58 changes: 58 additions & 0 deletions client/src/components/page-layout/PageLayout.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
.pageLayout {
--surface-purple: #f8f6fe;

position: relative;
background-color: var(--surface-purple);
overflow: hidden;
min-height: 100vh;
display: flex;
justify-content: center;
}

.pageLayout::before {
content: "";
position: absolute;
top: 0;
right: 0;
width: 364px;
height: 640px;
background-image: url("../../assets/brand-background-top-corner.svg");
background-size: contain;
background-repeat: no-repeat;
filter: blur(4px);
pointer-events: none;
z-index: 0;
}

.pageLayout::after {
content: "";
position: absolute;
bottom: 0;
left: 0;
width: 364px;
height: 640px;
background-image: url("../../assets/brand-background-bottom-corner.svg");
background-size: contain;
background-repeat: no-repeat;
filter: blur(2px);
pointer-events: none;
z-index: 0;
}

.content {
position: relative;
max-width: 915px;
width: 100%;
margin-inline: 2rem;
margin-block: 6rem;
z-index: 1;
}

.hero {
display: flex;
flex-direction: column;
align-items: center;
gap: var(--bolt-space-2);

margin-bottom: var(--bolt-space-8);
}
31 changes: 31 additions & 0 deletions client/src/components/page-layout/PageLayout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import type { JSX } from "preact/jsx-runtime";
import styles from "./PageLayout.module.css";

export interface PageLayoutProps {
children: JSX.Element;
}

function PageLayoutRoot({ children }: PageLayoutProps) {
return <div className={styles.pageLayout}>{children}</div>;
}

export interface PageLayoutContentProps {
children: JSX.Element | JSX.Element[];
}

function Content({ children }: PageLayoutContentProps) {
return <div className={styles.content}>{children}</div>;
}

export interface PageLayoutHeroProps {
children: JSX.Element | JSX.Element[];
}

function Hero({ children }: PageLayoutHeroProps) {
return <section className={styles.hero}>{children}</section>;
}

export const PageLayout = Object.assign(PageLayoutRoot, {
Hero,
Content,
});
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
.sections {
display: grid;
grid-template-columns: 1fr max-content;
gap: 7rem;
margin-block-start: 4.5rem;
}

.section {
display: grid;
grid-template-columns: subgrid;
Expand All @@ -12,31 +19,12 @@
width: fit-content;
}

.sectionContent button {
margin-top: var(--bolt-space-6);
.sectionContent > img:first-child {
margin-bottom: var(--bolt-space-2);
}

.preview {
display: flex;
align-items: center;
}

.preview img {
user-select: none;
pointer-events: none;
}
.previewAd {
opacity: 1;
height: 400px;
z-index: 1;
border-radius: var(--bolt-border-radius-lg);
box-shadow: var(--global-shadow3);
}

.previewGame {
opacity: 0.5;
height: 250px;
margin-left: -80px;
.sectionContent > :is(button, a) {
margin-top: var(--bolt-space-6);
}

@media (width < 768px) {
Expand Down
39 changes: 39 additions & 0 deletions client/src/components/section/Section.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import type { JSX } from "preact/jsx-runtime";
import { Heading1 } from "../../design/heading/Heading";
import { TextBlock } from "../../design/text-block/TextBlock";

import styles from "./Section.module.css";

export interface SectionProps {
iconUrl?: string;
iconSize?: number;
title: string;
description: string;
action: JSX.Element;
preview: JSX.Element | JSX.Element[];
}

export function Section(props: SectionProps) {
const { iconUrl, iconSize, title, description, action, preview } = props;
return (
<section className={styles.section}>
<div className={styles.sectionContent}>
{iconUrl && <img src={iconUrl} height={iconSize ?? 80} alt={title} />}
<Heading1 large>{title}</Heading1>
<TextBlock size="large">{description}</TextBlock>

{action}
</div>

{preview}
</section>
);
}

export interface SectionsProps {
children: JSX.Element | JSX.Element[];
}

export function Sections({ children }: SectionsProps) {
return <div className={styles.sections}>{children}</div>;
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,32 @@
padding: var(--bolt-space-4) var(--bolt-space-8);
background-color: var(--bolt-surface-primary);
box-shadow: var(--global-shadow2);
position: sticky;
top: 0;
z-index: 100;
}

.navLeft {
display: flex;
align-items: center;
gap: var(--bolt-space-4);
gap: 4rem;
}

.navLinks {
margin-top: 0.5rem;
display: flex;
gap: var(--bolt-space-4);
gap: var(--bolt-space-8);
}

.navLink {
color: var(--bolt-content-primary);
color: var(--bolt-content-secondary);
text-decoration: none;
}

.active {
color: var(--bolt-content-primary);
}

.active::after {
content: "";
display: block;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Link } from "@tanstack/react-router";

import BoltLightningGames from "../assets/lightning-games.svg";
import BoltLightningGames from "../../assets/lightning-games.svg";

import styles from "./TopNav.module.css";

Expand All @@ -25,6 +25,12 @@ export function TopNav() {
activeProps={{ className: styles.active }}>
Products
</Link>
<Link
to="/sdks"
className={styles.navLink}
activeProps={{ className: styles.active }}>
Development SDKs
</Link>
</div>
</div>
</div>
Expand Down
10 changes: 10 additions & 0 deletions client/src/design/button/Button.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
padding: var(--bolt-space-3) var(--bolt-space-5);
background-color: var(--bolt-surface-inverse-primary);
color: var(--bolt-content-inverse-primary);
font-size: var(--bolt-font-body-small-size);
text-decoration: none;
cursor: pointer;
display: inline-flex;
align-items: center;
gap: var(--bolt-space-2);
}

.button:hover {
Expand All @@ -12,3 +18,7 @@
.button:active {
background-color: var(--bolt-surface-inverse-primary-pressed);
}

.button:disabled {
cursor: not-allowed;
}
10 changes: 9 additions & 1 deletion client/src/design/button/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,16 @@ import type { JSX } from "preact/jsx-runtime";

import styles from "./Button.module.css";

export type ButtonProps = JSX.HTMLAttributes<HTMLButtonElement>;
export type ButtonProps = JSX.HTMLAttributes<HTMLButtonElement> & {
disabled?: boolean;
};

export function Button(props: ButtonProps) {
return <button {...props} className={styles.button}></button>;
}

export type LinkButtonProps = JSX.AnchorHTMLAttributes<HTMLAnchorElement>;

export function LinkButton(props: LinkButtonProps) {
return <a {...props} className={styles.button}></a>;
}
19 changes: 19 additions & 0 deletions client/src/design/icons/close.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
export function Close({ size = 24 }: { size?: number }) {
return (
<svg
width={size}
height={size}
viewBox="0 0 24 24"
fill="none"
xmlns="http://www.w3.org/2000/svg">
<path
d="M16.5962 5.28247L18.7175 7.40379L7.40381 18.7175L5.28249 16.5962L16.5962 5.28247Z"
fill="currentColor"
/>
<path
d="M18.7175 16.5962L16.5962 18.7175L5.28249 7.40379L7.40381 5.28247L18.7175 16.5962Z"
fill="currentColor"
/>
</svg>
);
}
33 changes: 33 additions & 0 deletions client/src/design/icons/spinner.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
export function SpinnerIcon({
size = 66,
className,
}: {
size?: number;
className?: string;
}) {
return (
<svg
width={size}
height={size}
viewBox="0 0 66 66"
fill="none"
xmlns="http://www.w3.org/2000/svg"
className={className}>
<path
d="M62 33C62 36.8083 61.2499 40.5794 59.7925 44.0978C58.3351 47.6163 56.199 50.8132 53.5061 53.5061C50.8132 56.199 47.6163 58.3351 44.0978 59.7925C40.5794 61.2499 36.8083 62 33 62C29.1917 62 25.4206 61.2499 21.9022 59.7925C18.3837 58.3351 15.1868 56.199 12.4939 53.5061C9.801 50.8132 7.66488 47.6163 6.20749 44.0978C4.7501 40.5794 4 36.8083 4 33C4 29.1917 4.75011 25.4206 6.2075 21.9022C7.66489 18.3837 9.80101 15.1868 12.4939 12.4939C15.1868 9.801 18.3837 7.66487 21.9022 6.20749C25.4206 4.7501 29.1917 4 33 4C36.8083 4 40.5794 4.75011 44.0978 6.2075C47.6163 7.66489 50.8132 9.80101 53.5061 12.4939C56.199 15.1868 58.3351 18.3838 59.7925 21.9022C61.2499 25.4206 62 29.1917 62 33L62 33Z"
stroke="currentColor"
strokeOpacity="0.15"
strokeWidth="8"
strokeLinecap="round"
strokeLinejoin="round"
/>
<path
d="M33 4C36.8083 4 40.5794 4.75011 44.0978 6.20749C47.6163 7.66488 50.8132 9.80101 53.5061 12.4939C56.199 15.1868 58.3351 18.3837 59.7925 21.9022C61.2499 25.4206 62 29.1917 62 33"
stroke="currentColor"
strokeWidth="8"
strokeLinecap="round"
strokeLinejoin="round"
/>
</svg>
);
}
12 changes: 12 additions & 0 deletions client/src/design/spinner/Spinner.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
@keyframes spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}

.spinner {
animation: spin 1s linear infinite;
}
11 changes: 11 additions & 0 deletions client/src/design/spinner/Spinner.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { SpinnerIcon } from "../icons/spinner";

import styles from "./Spinner.module.css";

export type SpinnerProps = {
size?: number;
};

export function Spinner({ size = 24 }: SpinnerProps) {
return <SpinnerIcon size={size} className={styles.spinner} />;
}
2 changes: 1 addition & 1 deletion client/src/design/tabs/Tabs.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
}

.tabPanel {
padding: var(--bolt-space-6) 0;
margin: var(--bolt-space-6) 0;
outline: none;
transition: opacity 0.15s ease-in-out;
}
Expand Down
Loading
Loading