-
Notifications
You must be signed in to change notification settings - Fork 1
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
1 parent
bf0172f
commit f17d716
Showing
22 changed files
with
3,747 additions
and
2,074 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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// @refresh reload | ||
import { Router } from "@solidjs/router"; | ||
import { FileRoutes } from "@solidjs/start"; | ||
import { Suspense } from "solid-js"; | ||
import Nav from "~/components/Nav"; | ||
import "./app.css"; | ||
|
||
export default function App() { | ||
return ( | ||
<Router | ||
root={(props) => ( | ||
<> | ||
<Nav /> | ||
<Suspense>{props.children}</Suspense> | ||
</> | ||
)} | ||
> | ||
<FileRoutes /> | ||
</Router> | ||
); | ||
} |
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,21 @@ | ||
import { useLocation } from '@solidjs/router'; | ||
|
||
export default function Nav() { | ||
const location = useLocation(); | ||
const active = (path: string) => | ||
path == location.pathname | ||
? 'border-sky-600' | ||
: 'border-transparent hover:border-sky-600'; | ||
return ( | ||
<nav class="bg-sky-800"> | ||
<ul class="container flex items-center p-3 text-gray-200"> | ||
<li class={`border-b-2 ${active('/')} mx-1.5 sm:mx-6`}> | ||
<a href="/">Home</a> | ||
</li> | ||
<li class={`border-b-2 ${active('/about')} mx-1.5 sm:mx-6`}> | ||
<a href="/about">About</a> | ||
</li> | ||
</ul> | ||
</nav> | ||
); | ||
} |
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,3 +1,3 @@ | ||
import { mount, StartClient } from "solid-start/entry-client"; | ||
import { mount, StartClient } from "@solidjs/start/client"; | ||
|
||
mount(() => <StartClient />, document); | ||
mount(() => <StartClient />, document.getElementById("app")); |
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,9 +1,20 @@ | ||
import { | ||
StartServer, | ||
createHandler, | ||
renderAsync, | ||
} from "solid-start/entry-server"; | ||
import { createHandler, StartServer } from "@solidjs/start/server"; | ||
|
||
export default createHandler( | ||
renderAsync((event) => <StartServer event={event} />) | ||
); | ||
export default createHandler(() => ( | ||
<StartServer | ||
document={({ assets, children, scripts }) => ( | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
<link rel="icon" href="/favicon.ico" /> | ||
{assets} | ||
</head> | ||
<body> | ||
<div id="app">{children}</div> | ||
{scripts} | ||
</body> | ||
</html> | ||
)} | ||
/> | ||
)); |
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 +1 @@ | ||
/// <reference types="solid-start/env" /> | ||
/// <reference types="@solidjs/start/env" /> |
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
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
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
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
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
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
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
Oops, something went wrong.