Skip to content
This repository has been archived by the owner on Nov 19, 2023. It is now read-only.

Commit

Permalink
WIP 1
Browse files Browse the repository at this point in the history
  • Loading branch information
satelllte authored Jun 24, 2022
1 parent c967cbd commit 89b7202
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/components/CanvasSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const CanvasSection = () => {
return (
<section id='canvas-section' className='m-4 absolute inset-0 flex justify-center items-center'>
<div className='relative w-full h-full max-w-[500px] max-h-[500px] flex justify-center items-center'>
{!wasm ? null : <Canvas wasm={wasm}/>}
{/* {!wasm ? null : <Canvas wasm={wasm}/>} */}
</div>
</section>
)
Expand Down
12 changes: 9 additions & 3 deletions src/components/Header.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
export const Header = () => {
interface HeaderProps {
className?: string
}

export const Header: React.FC<HeaderProps> = ({
className = ''
}) => {
return (
<header className='p-4 box-border'>
<h1 className='text-center md:text-left text-lg'>DISPLACEMENT</h1>
<header className={`bg-black/75 drop-shadow-2xl px-4 flex items-center justify-center md:justify-start ${className}`}>
<h1 className='md:text-left text-lg'>DISPLACEMENT</h1>
</header>
)
}
6 changes: 3 additions & 3 deletions src/components/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ export const Layout: React.FC<LayoutProps> = ({
children,
}) => {
return (
<div className='fixed inset-0 overflow-hidden flex flex-col'>
<>
<Header/>
<main className='flex-1 relative'>
<main>
{children}
</main>
</div>
</>
)
}
29 changes: 22 additions & 7 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,34 @@
import type { NextPage } from 'next'
import { BottomBarSection } from '../components/BottomBarSection';
import { CanvasSection } from '../components/CanvasSection'
import { Header } from '../components/Header';
import { Layout } from '../components/Layout';
import { SectionsContainer } from '../components/SectionsContainer';
import { SettingsSection } from '../components/SettingsSection';

const Home: NextPage = () => {
return (
<Layout>
<SectionsContainer
primary={<CanvasSection/>}
secondary={<SettingsSection/>}
bottomBar={<BottomBarSection/>}
/>
</Layout>
<>
<header className='fixed top-0 inset-x-0 h-16 z-10 bg-black/75 drop-shadow-2xl px-4 flex items-center justify-center md:justify-start'>
<h1 className='text-2xl font-bold md:text-left'>DISPLACEMENT</h1>
</header>
<div className='md:flex'>
<section className='mt-16 h-[calc(100vh-theme(spacing.16))] relative md:flex-1'>
<div className='absolute inset-4 overflow-y-auto'>
<div className='absolute inset-0 flex justify-center items-center bg-red-900'>
<div className='w-full h-full max-w-[500px] max-h-[500px] bg-red-500'>

</div>
</div>
</div>
</section>
<section className='mt-16 h-[calc(100vh-theme(spacing.16))] relative md:flex-1'>
<div className='absolute inset-4 overflow-y-auto bg-sky-700'>

</div>
</section>
</div>
</>
)
}

Expand Down

0 comments on commit 89b7202

Please sign in to comment.