formatting pass

main
Zynh Ludwig 2024-06-10 21:13:41 -07:00
parent 6a99eae558
commit 2efbd45eff
8 changed files with 27 additions and 18 deletions

View File

@ -3,4 +3,4 @@ module.exports = {
tailwindcss: {}, tailwindcss: {},
autoprefixer: {}, autoprefixer: {},
}, },
} };

View File

@ -7,7 +7,7 @@ import "./app.css";
export default function App() { export default function App() {
return ( return (
<Router <Router
root={props => ( root={(props) => (
<> <>
<Nav /> <Nav />
<Suspense>{props.children}</Suspense> <Suspense>{props.children}</Suspense>

View File

@ -4,7 +4,7 @@ export default function Counter() {
const [count, setCount] = createSignal(0); const [count, setCount] = createSignal(0);
return ( return (
<button <button
class="w-[200px] rounded-full bg-gray-100 border-2 border-gray-300 focus:border-gray-400 active:border-gray-400 px-[2rem] py-[1rem]" class="w-[200px] rounded-full bg-gray-100 border-2 border-gray-300 focus:border-gray-400 active:border-gray-400 px-[2rem] py-[1rem]"
onClick={() => setCount(count() + 1)} onClick={() => setCount(count() + 1)}
> >
Clicks: {count()} Clicks: {count()}

View File

@ -3,7 +3,9 @@ import { useLocation } from "@solidjs/router";
export default function Nav() { export default function Nav() {
const location = useLocation(); const location = useLocation();
const active = (path: string) => const active = (path: string) =>
path == location.pathname ? "border-sky-600" : "border-transparent hover:border-sky-600"; path == location.pathname
? "border-sky-600"
: "border-transparent hover:border-sky-600";
return ( return (
<nav class="bg-sky-800"> <nav class="bg-sky-800">
<ul class="container flex items-center p-3 text-gray-200"> <ul class="container flex items-center p-3 text-gray-200">

View File

@ -3,14 +3,9 @@ import { A } from "@solidjs/router";
export default function NotFound() { export default function NotFound() {
return ( return (
<main class="text-center mx-auto text-gray-700 p-4"> <main class="text-center mx-auto text-gray-700 p-4">
<h1 class="max-6-xs text-6xl text-sky-700 font-thin uppercase my-16">Not Found</h1> <h1 class="max-6-xs text-6xl text-sky-700 font-thin uppercase my-16">
<p class="mt-8"> Not Found
Visit{" "} </h1>
<a href="https://solidjs.com" target="_blank" class="text-sky-600 hover:underline">
solidjs.com
</a>{" "}
to learn how to build Solid apps.
</p>
<p class="my-4"> <p class="my-4">
<A href="/" class="text-sky-600 hover:underline"> <A href="/" class="text-sky-600 hover:underline">
Home Home

View File

@ -4,11 +4,17 @@ import Counter from "~/components/Counter";
export default function About() { export default function About() {
return ( return (
<main class="text-center mx-auto text-gray-700 p-4"> <main class="text-center mx-auto text-gray-700 p-4">
<h1 class="max-6-xs text-6xl text-sky-700 font-thin uppercase my-16">About Page</h1> <h1 class="max-6-xs text-6xl text-sky-700 font-thin uppercase my-16">
About Page
</h1>
<Counter /> <Counter />
<p class="mt-8"> <p class="mt-8">
Visit{" "} Visit{" "}
<a href="https://solidjs.com" target="_blank" class="text-sky-600 hover:underline"> <a
href="https://solidjs.com"
target="_blank"
class="text-sky-600 hover:underline"
>
solidjs.com solidjs.com
</a>{" "} </a>{" "}
to learn how to build Solid apps. to learn how to build Solid apps.

View File

@ -4,11 +4,17 @@ import Counter from "~/components/Counter";
export default function Home() { export default function Home() {
return ( return (
<main class="text-center mx-auto text-gray-700 p-4"> <main class="text-center mx-auto text-gray-700 p-4">
<h1 class="max-6-xs text-6xl text-sky-700 font-thin uppercase my-16">Hello world!</h1> <h1 class="max-6-xs text-6xl text-sky-700 font-thin uppercase my-16">
Hello world!
</h1>
<Counter /> <Counter />
<p class="mt-8"> <p class="mt-8">
Visit{" "} Visit{" "}
<a href="https://solidjs.com" target="_blank" class="text-sky-600 hover:underline"> <a
href="https://solidjs.com"
target="_blank"
class="text-sky-600 hover:underline"
>
solidjs.com solidjs.com
</a>{" "} </a>{" "}
to learn how to build Solid apps. to learn how to build Solid apps.

View File

@ -2,7 +2,7 @@
module.exports = { module.exports = {
content: ["./src/**/*.{html,js,jsx,ts,tsx}"], content: ["./src/**/*.{html,js,jsx,ts,tsx}"],
theme: { theme: {
extend: {} extend: {},
}, },
plugins: [] plugins: [],
}; };