Open History to see the last commit
1---
2import { getImage, Image } from "astro:assets";
3import appIcon from "../assets/icon.webp";
4import desktopScreenshot from "../assets/app-desktop.webp";
5import dmSansLatinUrl from "../assets/fonts/dm-sans-latin.woff2?url";
6import "../styles/fonts.css";
7import {
8 ANDROID_PLAY_STORE_URL,
9 GITHUB_REPOSITORY_URL,
10 IOS_APP_STORE_URL,
11 MARKETING_STATS,
12} from "../lib/site";
13
14interface Props {
15 title?: string;
16 description?: string;
17 pageClass?: string;
18}
19
20const {
21 title = "T3 Code",
22 description = "T3 Code. The open-source control plane for coding agents.",
23 pageClass,
24} = Astro.props;
25
26// Social preview card. Link unfurlers (Instagram, iMessage, X, Slack) want a
27// 1200x630 jpg or png at an absolute URL. Built from the hero screenshot so it
28// stays in sync with the homepage.
29const socialImage = await getImage({
30 src: desktopScreenshot,
31 width: 1200,
32 height: 630,
33 fit: "cover",
34 position: "top",
35 format: "jpg",
36 quality: 90,
37});
38const socialImageUrl = new URL(socialImage.src, Astro.site);
39const canonicalUrl = new URL(Astro.url.pathname, Astro.site);
40---
41
42<html lang="en">
43 <head>
44 <meta charset="UTF-8" />
45 <meta name="viewport" content="width=device-width, initial-scale=1.0" />
46 <meta name="description" content={description} />
47 <link rel="canonical" href={canonicalUrl} />
48 <meta property="og:type" content="website" />
49 <meta property="og:site_name" content="T3 Code" />
50 <meta property="og:url" content={canonicalUrl} />
51 <meta property="og:title" content={title} />
52 <meta property="og:description" content={description} />
53 <meta property="og:image" content={socialImageUrl} />
54 <meta property="og:image:width" content="1200" />
55 <meta property="og:image:height" content="630" />
56 <meta property="og:image:alt" content="The T3 Code desktop app with a thread open." />
57 <meta name="twitter:card" content="summary_large_image" />
58 <meta name="twitter:site" content="@t3dotgg" />
59 <meta name="twitter:title" content={title} />
60 <meta name="twitter:description" content={description} />
61 <meta name="twitter:image" content={socialImageUrl} />
62 <link
63 rel="preload"
64 href={dmSansLatinUrl}
65 as="font"
66 type="font/woff2"
67 crossorigin="anonymous"
68 />
69 <link rel="icon" href="/favicon.ico" sizes="48x48" />
70 <link rel="icon" type="image/png" href="/favicon-32x32.png" sizes="32x32" />
71 <link rel="icon" type="image/png" href="/favicon-16x16.png" sizes="16x16" />
72 <link rel="apple-touch-icon" href="/apple-touch-icon.png" />
73 <title>{title}</title>
74 </head>
75 <body>
76 <div class:list={["page", pageClass]}>
77 <nav class="nav">
78 <div class="nav-inner">
79 <a href="/" class="nav-brand" aria-label="T3 Code home">
80 <span class="nav-brand-name">T3 Code</span>
81 </a>
82 <div class="nav-right">
83 <a class="nav-link" href="/download">Download</a>
84 <a
85 class="nav-stars"
86 href={GITHUB_REPOSITORY_URL}
87 target="_blank"
88 rel="noopener noreferrer"
89 aria-label={`Star T3 Code on GitHub — ${MARKETING_STATS.githubStars} stars`}
90 >
91 <svg width="14" height="14" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true">
92 <path d="M12 2.3l2.9 5.88 6.49.94-4.7 4.58 1.11 6.47L12 17.12l-5.8 3.05 1.11-6.47-4.7-4.58 6.49-.94L12 2.3z"/>
93 </svg>
94 <span><strong>{MARKETING_STATS.githubStars}</strong> GitHub stars</span>
95 </a>
96 </div>
97 </div>
98 </nav>
99
100 <main class="main">
101 <slot />
102 </main>
103
104 <footer class="footer">
105 <div class="footer-inner">
106 <div class="footer-brand">
107 <Image
108 src={appIcon}
109 alt=""
110 width={20}
111 height={20}
112 densities={[1, 2, 3]}
113 format="webp"
114 quality={90}
115 loading="lazy"
116 decoding="async"
117 />
118 <span>© {new Date().getFullYear()} T3 Tools Inc · MIT licensed</span>
119 </div>
120 <div class="footer-links">
121 <a href={GITHUB_REPOSITORY_URL} target="_blank" rel="noopener noreferrer">GitHub</a>
122 <a href="https://discord.gg/jn4EGJjrvv" target="_blank" rel="noopener noreferrer">Discord</a>
123 <a href="/download">Download</a>
124 <a href={IOS_APP_STORE_URL} target="_blank" rel="noopener noreferrer">iOS app</a>
125 <a href={ANDROID_PLAY_STORE_URL} target="_blank" rel="noopener noreferrer">Android app</a>
126 <a href="/terms-of-service">Terms</a>
127 <a href="/privacy-policy">Privacy</a>
128 <a href="/security-policy">Security</a>
129 </div>
130 </div>
131 </footer>
132 </div>
133
134 <script>
135 const nav = document.querySelector(".nav");
136 const onScroll = () => {
137 if (!nav) return;
138 if (window.scrollY > 12) nav.classList.add("is-scrolled");
139 else nav.classList.remove("is-scrolled");
140 };
141 window.addEventListener("scroll", onScroll, { passive: true });
142 onScroll();
143 </script>
144 </body>
145</html>
146
147<style is:global>
148 :root {
149 --bg: #09090b;
150 --bg-elev: #0c0c0e;
151 --bg-card: #111113;
152 --fg: #fafafa;
153 --fg-muted: #a1a1aa;
154 --fg-dim: #71717a;
155 --fg-faint: #52525b;
156 --border: rgba(255, 255, 255, 0.08);
157 --border-strong: rgba(255, 255, 255, 0.14);
158 --accent-h: 250;
159 --accent: oklch(0.68 0.17 var(--accent-h));
160 --accent-dim: oklch(0.68 0.17 var(--accent-h) / 0.15);
161 --ok: oklch(0.72 0.16 150);
162 --warn: oklch(0.76 0.15 75);
163 --font-sans: "DM Sans", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
164 --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
165 --radius: 12px;
166 --radius-sm: 8px;
167 --radius-lg: 16px;
168 }
169
170 * {
171 box-sizing: border-box;
172 margin: 0;
173 padding: 0;
174 }
175
176 html {
177 color-scheme: dark;
178 scroll-behavior: smooth;
179 }
180
181 body {
182 background: var(--bg);
183 color: var(--fg);
184 font-family: var(--font-sans);
185 font-feature-settings: "ss01", "ss02";
186 -webkit-font-smoothing: antialiased;
187 -moz-osx-font-smoothing: grayscale;
188 min-height: 100vh;
189 overflow-x: hidden;
190 line-height: 1.5;
191 }
192
193 body::after {
194 content: "";
195 position: fixed;
196 inset: 0;
197 pointer-events: none;
198 opacity: 0.035;
199 background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
200 background-repeat: repeat;
201 background-size: 256px 256px;
202 z-index: 9999;
203 }
204
205 a {
206 color: inherit;
207 text-decoration: none;
208 }
209
210 button {
211 font-family: inherit;
212 cursor: pointer;
213 border: 0;
214 background: none;
215 color: inherit;
216 }
217
218 img,
219 svg {
220 display: block;
221 max-width: 100%;
222 }
223
224 .eyebrow {
225 font-family: var(--font-mono);
226 font-size: 11px;
227 letter-spacing: 0.14em;
228 text-transform: uppercase;
229 color: var(--fg-dim);
230 font-weight: 500;
231 }
232
233 .display {
234 font-weight: 500;
235 letter-spacing: -0.035em;
236 line-height: 1.05;
237 }
238
239 .container {
240 width: 100%;
241 max-width: 1240px;
242 margin: 0 auto;
243 padding: 0 32px;
244 }
245
246 .btn {
247 display: inline-flex;
248 align-items: center;
249 justify-content: center;
250 gap: 8px;
251 font-weight: 500;
252 font-size: 14px;
253 padding: 10px 18px;
254 border-radius: 8px;
255 transition: transform 0.18s ease, background 0.18s ease,
256 border-color 0.18s ease, color 0.18s ease;
257 white-space: nowrap;
258 }
259
260 .btn-primary {
261 background: var(--fg);
262 color: #09090b;
263 font-weight: 600;
264 }
265
266 .btn-primary:hover {
267 transform: translateY(-1px);
268 background: #fff;
269 }
270
271 .btn-primary:active {
272 transform: translateY(0);
273 }
274
275 .btn-ghost {
276 color: var(--fg-muted);
277 border: 1px solid var(--border);
278 background: transparent;
279 }
280
281 .btn-ghost:hover {
282 color: var(--fg);
283 border-color: var(--border-strong);
284 background: rgba(255, 255, 255, 0.02);
285 }
286
287 .btn-lg {
288 padding: 14px 22px;
289 font-size: 15px;
290 border-radius: 10px;
291 }
292
293 .tile {
294 position: relative;
295 border: 1px solid var(--border);
296 border-radius: var(--radius);
297 background: linear-gradient(180deg, rgba(255, 255, 255, 0.015), rgba(255, 255, 255, 0));
298 overflow: hidden;
299 }
300
301 :focus-visible {
302 outline: 2px solid var(--accent);
303 outline-offset: 2px;
304 border-radius: 4px;
305 }
306
307 @keyframes fade-in {
308 from {
309 opacity: 0;
310 transform: translateY(8px);
311 }
312 to {
313 opacity: 1;
314 transform: translateY(0);
315 }
316 }
317
318 /* Page-load sequence: [data-rise] plays once with delay --d. */
319 @keyframes rise {
320 from { opacity: 0; transform: translateY(16px); }
321 to { opacity: 1; transform: none; }
322 }
323 [data-rise] {
324 animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
325 animation-delay: var(--d, 0ms);
326 }
327 @media (prefers-reduced-motion: reduce) {
328 [data-rise] { animation: none; }
329 }
330</style>
331
332<style>
333 .page {
334 min-height: 100vh;
335 display: flex;
336 flex-direction: column;
337 overflow-x: clip;
338 }
339
340 .nav {
341 position: sticky;
342 top: 0;
343 z-index: 50;
344 backdrop-filter: blur(18px);
345 -webkit-backdrop-filter: blur(18px);
346 background: color-mix(in srgb, var(--bg) 75%, transparent);
347 border-bottom: 1px solid transparent;
348 transition: border-color 0.3s ease;
349 }
350
351 .nav.is-scrolled {
352 border-bottom-color: var(--border);
353 }
354
355 .nav-inner {
356 max-width: 1240px;
357 margin: 0 auto;
358 padding: 12px 32px;
359 display: flex;
360 align-items: center;
361 justify-content: space-between;
362 gap: 24px;
363 }
364
365 .nav-brand {
366 display: inline-flex;
367 align-items: center;
368 color: var(--fg);
369 transition: color 0.2s ease;
370 }
371
372 .nav-brand:hover {
373 color: #fff;
374 }
375
376 .nav-brand-name {
377 font-size: 16px;
378 font-weight: 650;
379 letter-spacing: -0.025em;
380 line-height: 1;
381 }
382
383 .nav-right {
384 display: inline-flex;
385 align-items: center;
386 gap: 8px;
387 }
388
389 .nav-link {
390 padding: 0 10px;
391 color: var(--fg-muted);
392 font-size: 13px;
393 letter-spacing: -0.01em;
394 white-space: nowrap;
395 transition: color 0.18s ease;
396 }
397
398 .nav-link:hover {
399 color: var(--fg);
400 }
401
402 .nav-stars {
403 display: inline-flex;
404 align-items: center;
405 gap: 7px;
406 height: 36px;
407 padding: 0 14px;
408 border: 1px solid var(--border);
409 border-radius: 999px;
410 background: rgba(255, 255, 255, 0.02);
411 color: var(--fg-muted);
412 font-size: 13px;
413 letter-spacing: -0.01em;
414 white-space: nowrap;
415 transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
416 }
417
418 .nav-stars:hover {
419 color: var(--fg);
420 border-color: var(--border-strong);
421 background: rgba(255, 255, 255, 0.04);
422 }
423
424 .nav-stars strong {
425 color: var(--fg);
426 font-weight: 600;
427 }
428
429 .nav-stars svg {
430 color: var(--warn);
431 flex-shrink: 0;
432 }
433
434 .main {
435 flex: 1;
436 display: flex;
437 flex-direction: column;
438 }
439
440 .footer {
441 margin-top: auto;
442 border-top: 1px solid var(--border);
443 padding: 40px 0 32px;
444 }
445
446 .footer-inner {
447 max-width: 1240px;
448 margin: 0 auto;
449 padding: 0 32px;
450 display: flex;
451 flex-wrap: wrap;
452 gap: 24px;
453 align-items: center;
454 justify-content: space-between;
455 }
456
457 .footer-brand {
458 display: flex;
459 align-items: center;
460 gap: 10px;
461 font-size: 13px;
462 color: var(--fg-dim);
463 }
464
465 .footer-brand img {
466 width: 20px;
467 height: 20px;
468 border-radius: 4px;
469 }
470
471 .footer-links {
472 display: flex;
473 flex-wrap: wrap;
474 justify-content: flex-end;
475 gap: 20px;
476 }
477
478 .footer-links a {
479 font-size: 13px;
480 color: var(--fg-dim);
481 transition: color 0.2s ease;
482 }
483
484 .footer-links a:hover {
485 color: var(--fg);
486 }
487
488 @media (max-width: 820px) {
489 .nav-inner,
490 .footer-inner {
491 padding-left: 20px;
492 padding-right: 20px;
493 }
494
495 .legal-document-page .nav {
496 display: none;
497 }
498
499 .footer {
500 padding-bottom: max(32px, env(safe-area-inset-bottom));
501 }
502
503 .footer-inner {
504 align-items: flex-start;
505 flex-direction: column;
506 gap: 28px;
507 }
508
509 .footer-links {
510 display: grid;
511 grid-template-columns: repeat(3, minmax(0, 1fr));
512 width: 100%;
513 gap: 14px 20px;
514 justify-content: initial;
515 }
516 }
517
518 @media (max-width: 420px) {
519 .nav-inner {
520 gap: 12px;
521 }
522
523 .nav-stars {
524 height: 34px;
525 gap: 6px;
526 padding: 0 12px;
527 font-size: 12px;
528 }
529 }
530</style>