diff --git a/apps/marketing/src/layouts/Layout.astro b/apps/marketing/src/layouts/Layout.astro new file mode 100644 index 0000000000..b4fa945e25 --- /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} + + +
+ + +
+ +
+ + +
+ + + + + + diff --git a/apps/marketing/src/lib/releases.ts b/apps/marketing/src/lib/releases.ts new file mode 100644 index 0000000000..5f3209acf8 --- /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 0000000000..0cf31a82e4 --- /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 425626c458..3a2111f4f8 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.

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

T3 Code is the best way to code with AI.

+ + + + + + Download now + + + Other platforms + +
+ T3 Code +
+