The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 21, 06:00 UTC
| 1 | <script setup lang="ts"> |
| 2 | // Title lives on the page so the dev test's hot-reload marker rewrite |
| 3 | // targets this file. |
| 4 | useHead({ title: "Nuxt on Hetzner" }); |
| 5 | |
| 6 | // SSR reads the Hetzner Server environment through the plain Node contract: |
| 7 | // `process.env`. `useState` serializes the server-read value into the |
| 8 | // payload so the client render matches. |
| 9 | const greeting = useState("greeting", () => { |
| 10 | if (import.meta.server) { |
| 11 | return typeof process.env.GREETING === "string" ? process.env.GREETING : "Hello!"; |
| 12 | } |
| 13 | return "Hello!"; |
| 14 | }); |
| 15 | </script> |
| 16 | |
| 17 | <template> |
| 18 | <main> |
| 19 | <h1 class="text-3xl font-bold">{{ greeting }}</h1> |
| 20 | <Card |
| 21 | title="Styled with Tailwind CSS" |
| 22 | body="This card is a Vue component styled with Tailwind utilities." |
| 23 | /> |
| 24 | <NuxtLink class="mt-4 inline-block underline" to="/about">about (prerendered)</NuxtLink> |
| 25 | </main> |
| 26 | </template> |