forked from saas-templates/go-svelte
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
51 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,16 @@ | ||
<script lang="ts"> | ||
import Router from "svelte-spa-router"; | ||
import { wrap } from "svelte-spa-router/wrap"; | ||
import Home from "./pages/Home.svelte"; | ||
import NotFound from "./pages/NotFound.svelte"; | ||
import Home from "./routes/Home.svelte"; | ||
import NotFound from "./routes/NotFound.svelte"; | ||
const routes = { | ||
"/": Home, | ||
"*": NotFound, | ||
}; | ||
</script> | ||
|
||
<Router {routes} /> | ||
<div class="bg-black"> | ||
<Router {routes} /> | ||
</div> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<script lang="ts"> | ||
import { onMount } from "svelte"; | ||
let count = 0; | ||
onMount(() => { | ||
const ih = setInterval(() => { | ||
count = count + 1; | ||
}, 1000); | ||
return () => clearInterval(ih); | ||
}); | ||
</script> | ||
|
||
<div class="w-full h-screen text-white grid place-items-center"> | ||
<div class="flex flex-col gap-6 text-center"> | ||
<h1 class="text-red-400 text-3xl">Welcome to Svelte SPA!</h1> | ||
<p class="max-w-2xl"> | ||
This is a Svelte SPA. So everything on this page including the text and | ||
wiggly counter below are rendered using javascript on client-side. | ||
</p> | ||
<p class="animate-bounce text-xl">{count}</p> | ||
<div class="mt-6"> | ||
<a | ||
class="rounded-md py-4 px-12 text-white bg-gradient-to-br from-red-500 to-cyan-600 p-1 hover:border font-medium" | ||
href="/">Go Home</a | ||
> | ||
</div> | ||
</div> | ||
</div> |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters