This commit is contained in:
Daniel Flanagan 2024-08-23 23:39:15 -05:00
parent c83d31f6ae
commit 1a3c11ebf0
2 changed files with 42 additions and 21 deletions

View file

@ -5,10 +5,10 @@ export default function App({ Component }: PageProps) {
<head> <head>
<meta charset='utf-8' /> <meta charset='utf-8' />
<meta name='viewport' content='width=device-width, initial-scale=1.0' /> <meta name='viewport' content='width=device-width, initial-scale=1.0' />
<title>bank</title> <title>Bank</title>
<link rel='stylesheet' href='/styles.css' /> <link rel='stylesheet' href='/styles.css' />
</head> </head>
<body class='bg-bg text-text'> <body class='bg-bg text-text min-w-full min-h-dvh'>
<Component /> <Component />
</body> </body>
</html> </html>

View file

@ -1,25 +1,46 @@
import { useSignal } from '@preact/signals' import { VNode } from 'https://esm.sh/v128/preact@10.19.6/src/index.js'
import Counter from '../islands/Counter.tsx' import { JSX } from 'preact'
interface Budget {
name: string
target: number
buffer?: number
}
interface IconButtonProps {
text: string
icon: string
}
function IconButton(
{ icon, text, ...props }:
& IconButtonProps
& JSX.HTMLAttributes<HTMLAnchorElement>,
) {
return (
<a
href='#'
class='p-2 flex flex-col flex-1 bg-bg justify-center items-center text-center'
{...props}
>
<i>{icon}</i>
<span>{text}</span>
</a>
)
}
export default function Home() { export default function Home() {
const count = useSignal(3)
return ( return (
<div class='px-4 py-8 mx-auto'> <div class='flex flex-col sm:flex-row min-h-full'>
<div class='max-w-screen-md mx-auto flex flex-col items-center justify-center'> <main class='p-2'>
<img This is the main content
class='my-6' </main>
src='/logo.svg'
width='128' <nav class='w-full mt-auto sm:ml-auto flex flex-1 bg-mantle gap-1 p-1'>
height='128' <IconButton text='Some Text' icon='Some Icon' />
alt='the Fresh logo: a sliced lemon dripping with juice' <IconButton text='Some Text' icon='Some Icon' />
/> <IconButton text='Some Text' icon='Some Icon' />
<h1 class='text-4xl font-bold'>Welcome to Fresh</h1> </nav>
<p class='my-4'>
Try updating this message in the
<code class='mx-2'>./routes/index.tsx</code> file, and refresh.
</p>
<Counter count={count} />
</div>
</div> </div>
) )
} }