Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

Layout.astro

474 lines10.5 KB

1---
2import {
3 ANDROID_PLAY_STORE_URL,
4 GITHUB_REPOSITORY_URL,
5 IOS_APP_STORE_URL,
6 MARKETING_STATS,
7} from "../lib/site";
8​
9interface Props {
10 title?: string;
11 description?: string;
12 pageClass?: string;
14​
15const {
16 title = "T3 Code",
17 description = "T3 Code — The open-source control plane for coding agents.",
18 pageClass,
19} = Astro.props;
20---
21​
22<html lang="en">
23 <head>
24 <meta charset="UTF-8" />
25 <meta name="viewport" content="width=device-width, initial-scale=1.0" />
26 <meta name="description" content={description} />
27 <link rel="preconnect" href="https://fonts.googleapis.com" />
28 <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
29 <link
30 href="https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,600&family=JetBrains+Mono:wght@400;500&display=swap"
31 rel="stylesheet"
32 />
33 <link rel="icon" href="/favicon.ico" sizes="48x48" />
34 <link rel="icon" type="image/png" href="/favicon-32x32.png" sizes="32x32" />
35 <link rel="icon" type="image/png" href="/favicon-16x16.png" sizes="16x16" />
36 <link rel="apple-touch-icon" href="/apple-touch-icon.png" />
37 <title>{title}</title>
38 </head>
39 <body>
40 <div class:list={["page", pageClass]}>
41 <nav class="nav">
42 <div class="nav-inner">
43 <a href="/" class="nav-brand" aria-label="T3 Code home">
44 <span class="nav-brand-name">T3 Code</span>
45 </a>
46 <div class="nav-right">
47 <a
48 class="nav-stars"
49 href={GITHUB_REPOSITORY_URL}
50 target="_blank"
51 rel="noopener noreferrer"
52 aria-label={`Star T3 Code on GitHub — ${MARKETING_STATS.githubStars} stars`}
53 >
54 <svg width="14" height="14" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true">
55 <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"/>
56 </svg>
57 <span><strong>{MARKETING_STATS.githubStars}</strong> GitHub stars</span>
58 </a>
59 </div>
60 </div>
61 </nav>
62​
63 <main class="main">
64 <slot />
65 </main>
66​
67 <footer class="footer">
68 <div class="footer-inner">
69 <div class="footer-brand">
70 <img src="/icon.webp" alt="" />
71 <span>&copy; {new Date().getFullYear()} T3 Tools Inc · MIT licensed</span>
72 </div>
73 <div class="footer-links">
74 <a href={GITHUB_REPOSITORY_URL} target="_blank" rel="noopener noreferrer">GitHub</a>
75 <a href="https://discord.gg/jn4EGJjrvv" target="_blank" rel="noopener noreferrer">Discord</a>
76 <a href="/download">Download</a>
77 <a href={IOS_APP_STORE_URL} target="_blank" rel="noopener noreferrer">iOS app</a>
78 <a href={ANDROID_PLAY_STORE_URL} target="_blank" rel="noopener noreferrer">Android app</a>
79 <a href="/terms-of-service">Terms</a>
80 <a href="/privacy-policy">Privacy</a>
81 <a href="/security-policy">Security</a>
82 </div>
83 </div>
84 </footer>
85 </div>
86​
87 <script>
88 const nav = document.querySelector(".nav");
89 const onScroll = () => {
90 if (!nav) return;
91 if (window.scrollY > 12) nav.classList.add("is-scrolled");
92 else nav.classList.remove("is-scrolled");
93 };
94 window.addEventListener("scroll", onScroll, { passive: true });
95 onScroll();
96 </script>
97 </body>
98</html>
99​
100<style is:global>
101 :root {
102 --bg: #09090b;
103 --bg-elev: #0c0c0e;
104 --bg-card: #111113;
105 --fg: #fafafa;
106 --fg-muted: #a1a1aa;
107 --fg-dim: #71717a;
108 --fg-faint: #52525b;
109 --border: rgba(255, 255, 255, 0.08);
110 --border-strong: rgba(255, 255, 255, 0.14);
111 --accent-h: 250;
112 --accent: oklch(0.68 0.17 var(--accent-h));
113 --accent-dim: oklch(0.68 0.17 var(--accent-h) / 0.15);
114 --ok: oklch(0.72 0.16 150);
115 --warn: oklch(0.76 0.15 75);
116 --font-sans: "DM Sans", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
117 --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
118 --radius: 12px;
119 --radius-sm: 8px;
120 --radius-lg: 16px;
121 }
122​
123 * {
124 box-sizing: border-box;
125 margin: 0;
126 padding: 0;
127 }
128​
129 html {
130 color-scheme: dark;
131 scroll-behavior: smooth;
132 }
133​
134 body {
135 background: var(--bg);
136 color: var(--fg);
137 font-family: var(--font-sans);
138 font-feature-settings: "ss01", "ss02";
139 -webkit-font-smoothing: antialiased;
140 -moz-osx-font-smoothing: grayscale;
141 min-height: 100vh;
142 overflow-x: hidden;
143 line-height: 1.5;
144 }
145​
146 body::after {
147 content: "";
148 position: fixed;
149 inset: 0;
150 pointer-events: none;
151 opacity: 0.035;
152 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");
153 background-repeat: repeat;
154 background-size: 256px 256px;
155 z-index: 9999;
156 }
157​
158 a {
159 color: inherit;
160 text-decoration: none;
161 }
162​
163 button {
164 font-family: inherit;
165 cursor: pointer;
166 border: 0;
167 background: none;
168 color: inherit;
169 }
170​
171 img,
172 svg {
173 display: block;
174 max-width: 100%;
175 }
176​
177 .eyebrow {
178 font-family: var(--font-mono);
179 font-size: 11px;
180 letter-spacing: 0.14em;
181 text-transform: uppercase;
182 color: var(--fg-dim);
183 font-weight: 500;
184 }
185​
186 .display {
187 font-weight: 500;
188 letter-spacing: -0.035em;
189 line-height: 1.05;
190 }
191​
192 .container {
193 width: 100%;
194 max-width: 1240px;
195 margin: 0 auto;
196 padding: 0 32px;
197 }
198​
199 .btn {
200 display: inline-flex;
201 align-items: center;
202 justify-content: center;
203 gap: 8px;
204 font-weight: 500;
205 font-size: 14px;
206 padding: 10px 18px;
207 border-radius: 8px;
208 transition: transform 0.18s ease, background 0.18s ease,
209 border-color 0.18s ease, color 0.18s ease;
210 white-space: nowrap;
211 }
212​
213 .btn-primary {
214 background: var(--fg);
215 color: #09090b;
216 font-weight: 600;
217 }
218​
219 .btn-primary:hover {
220 transform: translateY(-1px);
221 background: #fff;
222 }
223​
224 .btn-primary:active {
225 transform: translateY(0);
226 }
227​
228 .btn-ghost {
229 color: var(--fg-muted);
230 border: 1px solid var(--border);
231 background: transparent;
232 }
233​
234 .btn-ghost:hover {
235 color: var(--fg);
236 border-color: var(--border-strong);
237 background: rgba(255, 255, 255, 0.02);
238 }
239​
240 .btn-lg {
241 padding: 14px 22px;
242 font-size: 15px;
243 border-radius: 10px;
244 }
245​
246 .tile {
247 position: relative;
248 border: 1px solid var(--border);
249 border-radius: var(--radius);
250 background: linear-gradient(180deg, rgba(255, 255, 255, 0.015), rgba(255, 255, 255, 0));
251 overflow: hidden;
252 }
253​
254 :focus-visible {
255 outline: 2px solid var(--accent);
256 outline-offset: 2px;
257 border-radius: 4px;
258 }
259​
260 @keyframes fade-in {
261 from {
262 opacity: 0;
263 transform: translateY(8px);
264 }
265 to {
266 opacity: 1;
267 transform: translateY(0);
268 }
269 }
270​
271 @keyframes pulse {
272 50% { opacity: 0.4; }
273 }
274​
275 @keyframes spin {
276 to { transform: rotate(360deg); }
277 }
278​
279 @keyframes floatDrift {
280 0%, 100% { translate: 0 0; }
281 50% { translate: 0 -10px; }
282 }
283​
284 @keyframes blink {
285 50% { opacity: 0; }
286 }
287</style>
288​
289<style>
290 .page {
291 min-height: 100vh;
292 display: flex;
293 flex-direction: column;
294 overflow-x: clip;
295 }
296​
297 .nav {
298 position: sticky;
299 top: 0;
300 z-index: 50;
301 backdrop-filter: blur(18px);
302 -webkit-backdrop-filter: blur(18px);
303 background: color-mix(in srgb, var(--bg) 75%, transparent);
304 border-bottom: 1px solid transparent;
305 transition: border-color 0.3s ease;
306 }
307​
308 .nav.is-scrolled {
309 border-bottom-color: var(--border);
310 }
311​
312 .nav-inner {
313 max-width: 1240px;
314 margin: 0 auto;
315 padding: 12px 32px;
316 display: flex;
317 align-items: center;
318 justify-content: space-between;
319 gap: 24px;
320 }
321​
322 .nav-brand {
323 display: inline-flex;
324 align-items: center;
325 color: var(--fg);
326 transition: color 0.2s ease;
327 }
328​
329 .nav-brand:hover {
330 color: #fff;
331 }
332​
333 .nav-brand-name {
334 font-size: 16px;
335 font-weight: 650;
336 letter-spacing: -0.025em;
337 line-height: 1;
338 }
339​
340 .nav-right {
341 display: inline-flex;
342 align-items: center;
343 gap: 8px;
344 }
345​
346 .nav-stars {
347 display: inline-flex;
348 align-items: center;
349 gap: 7px;
350 height: 36px;
351 padding: 0 14px;
352 border: 1px solid var(--border);
353 border-radius: 999px;
354 background: rgba(255, 255, 255, 0.02);
355 color: var(--fg-muted);
356 font-size: 13px;
357 letter-spacing: -0.01em;
358 white-space: nowrap;
359 transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
360 }
361​
362 .nav-stars:hover {
363 color: var(--fg);
364 border-color: var(--border-strong);
365 background: rgba(255, 255, 255, 0.04);
366 }
367​
368 .nav-stars strong {
369 color: var(--fg);
370 font-weight: 600;
371 }
372​
373 .nav-stars svg {
374 color: var(--warn);
375 flex-shrink: 0;
376 }
377​
378 .main {
379 flex: 1;
380 display: flex;
381 flex-direction: column;
382 }
383​
384 .footer {
385 margin-top: auto;
386 border-top: 1px solid var(--border);
387 padding: 40px 0 32px;
388 }
389​
390 .footer-inner {
391 max-width: 1240px;
392 margin: 0 auto;
393 padding: 0 32px;
394 display: flex;
395 flex-wrap: wrap;
396 gap: 24px;
397 align-items: center;
398 justify-content: space-between;
399 }
400​
401 .footer-brand {
402 display: flex;
403 align-items: center;
404 gap: 10px;
405 font-size: 13px;
406 color: var(--fg-dim);
407 }
408​
409 .footer-brand img {
410 width: 20px;
411 height: 20px;
412 border-radius: 4px;
413 }
414​
415 .footer-links {
416 display: flex;
417 flex-wrap: wrap;
418 justify-content: flex-end;
419 gap: 20px;
420 }
421​
422 .footer-links a {
423 font-size: 13px;
424 color: var(--fg-dim);
425 transition: color 0.2s ease;
426 }
427​
428 .footer-links a:hover {
429 color: var(--fg);
430 }
431​
432 @media (max-width: 820px) {
433 .nav-inner,
434 .footer-inner {
435 padding-left: 20px;
436 padding-right: 20px;
437 }
438​
439 .legal-document-page .nav {
440 display: none;
441 }
442​
443 .footer {
444 padding-bottom: max(32px, env(safe-area-inset-bottom));
445 }
446​
447 .footer-inner {
448 align-items: flex-start;
449 flex-direction: column;
450 gap: 28px;
451 }
452​
453 .footer-links {
454 display: grid;
455 grid-template-columns: repeat(3, minmax(0, 1fr));
456 width: 100%;
457 gap: 14px 20px;
458 justify-content: initial;
459 }
460 }
461​
462 @media (max-width: 420px) {
463 .nav-inner {
464 gap: 12px;
465 }
466​
467 .nav-stars {
468 height: 34px;
469 gap: 6px;
470 padding: 0 12px;
471 font-size: 12px;
472 }
473 }
474</style>