✨ Adding new template with automatique routing
This commit is contained in:
@@ -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>
|
||||
);
|
||||
}
|
||||
@@ -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>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user