From b8d07eb852e5ea30717f4079595eb68515e930cf Mon Sep 17 00:00:00 2001 From: Jono Kemball Date: Wed, 11 Mar 2026 05:18:22 +1300 Subject: [PATCH] Add downloads page and shared marketing layout (#802) --- apps/marketing/src/layouts/Layout.astro | 228 +++++++++++++++++++ apps/marketing/src/lib/releases.ts | 30 +++ apps/marketing/src/pages/download.astro | 271 +++++++++++++++++++++++ apps/marketing/src/pages/index.astro | 280 ++++-------------------- 4 files changed, 571 insertions(+), 238 deletions(-) create mode 100644 apps/marketing/src/layouts/Layout.astro create mode 100644 apps/marketing/src/lib/releases.ts create mode 100644 apps/marketing/src/pages/download.astro diff --git a/apps/marketing/src/layouts/Layout.astro b/apps/marketing/src/layouts/Layout.astro new file mode 100644 index 0000000000000000000000000000000000000000..b4fa945e25acd5a85b435d8229e49f1cfff35893 --- /dev/null +++ b/apps/marketing/src/layouts/Layout.astro @@ -0,0 +1,228 @@ +--- +interface Props { + title?: string; + description?: string; +} + +const { + title = "T3 Code", + description = "T3 Code — The best way to code with AI.", +} = Astro.props; +--- + + + + + + + + + + + + + + {title} + + +
+ + +
+ +
+ +
+ © {new Date().getFullYear()} T3 Tools Inc + +
+
+ + + + + + diff --git a/apps/marketing/src/lib/releases.ts b/apps/marketing/src/lib/releases.ts new file mode 100644 index 0000000000000000000000000000000000000000..5f3209acf89bb1d28df2141ca89aae68c5f9d869 --- /dev/null +++ b/apps/marketing/src/lib/releases.ts @@ -0,0 +1,30 @@ +const REPO = "pingdotgg/t3code"; + +export const RELEASES_URL = `https://github.com/${REPO}/releases`; + +const API_URL = `https://api.github.com/repos/${REPO}/releases/latest`; +const CACHE_KEY = "t3code-latest-release"; + +export interface ReleaseAsset { + name: string; + browser_download_url: string; +} + +export interface Release { + tag_name: string; + html_url: string; + assets: ReleaseAsset[]; +} + +export async function fetchLatestRelease(): Promise { + const cached = sessionStorage.getItem(CACHE_KEY); + if (cached) return JSON.parse(cached); + + const data = await fetch(API_URL).then((r) => r.json()); + + if (data?.assets) { + sessionStorage.setItem(CACHE_KEY, JSON.stringify(data)); + } + + return data; +} diff --git a/apps/marketing/src/pages/download.astro b/apps/marketing/src/pages/download.astro new file mode 100644 index 0000000000000000000000000000000000000000..0cf31a82e4ad8e69c98e9e51426ae4ca7e58e1c1 --- /dev/null +++ b/apps/marketing/src/pages/download.astro @@ -0,0 +1,271 @@ +--- +import Layout from "../layouts/Layout.astro"; +--- + + +

Download T3 Code

+

+ Loading latest release… + +

+ +
+ +
+
+ +

macOS

+
+ +
+ + +
+
+ +

Windows

+
+ +
+ + +
+
+ +

Linux

+
+ +
+
+ + +
+ + + + diff --git a/apps/marketing/src/pages/index.astro b/apps/marketing/src/pages/index.astro index 425626c4588233544747b018c4987b4afe787839..3a2111f4f8801abe37ee37c90a43c3889765d1f3 100644 --- a/apps/marketing/src/pages/index.astro +++ b/apps/marketing/src/pages/index.astro @@ -1,75 +1,30 @@ --- +import Layout from "../layouts/Layout.astro"; --- - - - - - - - - - - - - - T3 Code - - -
- + +

T3 Code is the best way to code with AI.

-
-

T3 Code is the best way to code with AI.

+ + + + + Download now + - - - - - Download now - + Other platforms -
- T3 Code -
- -
- -
- © {new Date().getFullYear()} T3 Tools Inc - -
-
- - +
+ T3 Code +
+ -- 2.54.0