Skip to content
Source
Sign inSign up
TanStack/cli
Open History to see the last commit

index.tsx

86 lines3.6 KB

1import { createFileRoute } from '@tanstack/solid-router'
2​
3export const Route = createFileRoute('/')({ component: App })
4​
5function App() {
6 return (
7 <main class="page-wrap px-4 pb-8 pt-14">
8 <section class="island-shell rise-in relative overflow-hidden rounded-[2rem] px-6 py-10 sm:px-10 sm:py-14">
9 <div class="pointer-events-none absolute -left-20 -top-24 h-56 w-56 rounded-full bg-[radial-gradient(circle,rgba(79,184,178,0.32),transparent_66%)]" />
10 <div class="pointer-events-none absolute -bottom-20 -right-20 h-56 w-56 rounded-full bg-[radial-gradient(circle,rgba(47,106,74,0.18),transparent_66%)]" />
11 <p class="island-kicker mb-3">TanStack Start Base Template</p>
12 <h1 class="display-title mb-5 max-w-3xl text-4xl leading-[1.02] font-bold tracking-tight text-[var(--sea-ink)] sm:text-6xl">
13 Start simple, ship quickly.
14 </h1>
15 <p class="mb-8 max-w-2xl text-base text-[var(--sea-ink-soft)] sm:text-lg">
16 A tropical, breathable app starter with full-document SSR, server functions,
17 streaming, and type-safe routing. Calm on the eyes. Fast in production.
18 </p>
19 <div class="flex flex-wrap gap-3">
20 <a
21 href="/blog"
22 class="rounded-full border border-[rgba(50,143,151,0.3)] bg-[rgba(79,184,178,0.14)] px-5 py-2.5 text-sm font-semibold text-[var(--lagoon-deep)] no-underline transition hover:-translate-y-0.5 hover:bg-[rgba(79,184,178,0.24)]"
23 >
24 Explore Posts
25 </a>
26 <a
27 href="https://tanstack.com/router"
28 target="_blank"
29 rel="noopener noreferrer"
30 class="rounded-full border border-[rgba(23,58,64,0.2)] bg-white/50 px-5 py-2.5 text-sm font-semibold text-[var(--sea-ink)] no-underline transition hover:-translate-y-0.5 hover:border-[rgba(23,58,64,0.35)]"
31 >
32 Router Guide
33 </a>
34 </div>
35 </section>
36​
37 <section class="mt-8 grid gap-4 sm:grid-cols-2 lg:grid-cols-4">
38 {[
39 [
40 'Type-Safe Routing',
41 'Routes and links stay in sync across every page.',
42 ],
43 [
44 'Server Functions',
45 'Call server code from your UI without creating API boilerplate.',
46 ],
47 [
48 'Streaming by Default',
49 'Ship progressively rendered responses for faster experiences.',
50 ],
51 [
52 'Tailwind Native',
53 'Design quickly with utility-first styling and reusable tokens.',
54 ],
55 ].map(([title, desc], index) => (
56 <article
57 class="island-shell feature-card rise-in rounded-2xl p-5"
58 style={{ 'animation-delay': `${index * 90 + 80}ms` }}
59 >
60 <h2 class="mb-2 text-base font-semibold text-[var(--sea-ink)]">
61 {title}
62 </h2>
63 <p class="m-0 text-sm text-[var(--sea-ink-soft)]">{desc}</p>
64 </article>
65 ))}
66 </section>
67​
68 <section class="island-shell mt-8 rounded-2xl p-6">
69 <p class="island-kicker mb-2">Quick Start</p>
70 <ul class="m-0 list-disc space-y-2 pl-5 text-sm text-[var(--sea-ink-soft)]">
71 <li>
72 Edit <code>src/routes/index.tsx</code> to customize the home page.
73 </li>
74 <li>
75 Update <code>src/components/Header.tsx</code> for navigation and
76 product links.
77 </li>
78 <li>
79 Add routes in <code>src/routes</code> and tweak visual tokens in{' '}
80 <code>src/styles.css</code>.
81 </li>
82 </ul>
83 </section>
84 </main>
85 )