Adding new template with automatique routing

This commit is contained in:
Alexandre
2021-02-22 13:40:00 +01:00
parent 97a4535c81
commit 9648bb5230
14 changed files with 961 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
export default function About(props) {
return (
<section class="bg-pink-100 text-gray-700 p-8">
<h1 class="text-2xl font-bold">About</h1>
<p class="mt-4">A page all about this website.</p>
<pre class="mt-4">
<code>{JSON.stringify(props, null, 2)}</code>
</pre>
</section>
);
}
+30
View File
@@ -0,0 +1,30 @@
import { createSignal } from "solid-js";
export default function Home() {
const [count, setCount] = createSignal(0);
return (
<section class="bg-gray-100 text-gray-700 p-8">
<h1 class="text-2xl font-bold">Home</h1>
<p class="mt-4">This is the home page.</p>
<div class="flex items-center space-x-2">
<button
class="border rounded-lg px-2 border-gray-900"
onClick={() => setCount(count() - 1)}
>
-
</button>
<output class="p-10px">Count: {count}</output>
<button
class="border rounded-lg px-2 border-gray-900"
onClick={() => setCount(count() + 1)}
>
+
</button>
</div>
</section>
);
}