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

Commit fb8084e

Browse files
authored
WIP 1
1 parent 1fb6a8a commit fb8084e

File tree

4 files changed

+35
-14
lines changed

4 files changed

+35
-14
lines changed

src/components/CanvasSection.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export const CanvasSection = () => {
77
return (
88
<section id='canvas-section' className='m-4 absolute inset-0 flex justify-center items-center'>
99
<div className='relative w-full h-full max-w-[500px] max-h-[500px] flex justify-center items-center'>
10-
{!wasm ? null : <Canvas wasm={wasm}/>}
10+
{/* {!wasm ? null : <Canvas wasm={wasm}/>} */}
1111
</div>
1212
</section>
1313
)

src/components/Header.tsx

+9-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
1-
export const Header = () => {
1+
interface HeaderProps {
2+
className?: string
3+
}
4+
5+
export const Header: React.FC<HeaderProps> = ({
6+
className = ''
7+
}) => {
28
return (
3-
<header className='p-4 box-border'>
4-
<h1 className='text-center md:text-left text-lg'>DISPLACEMENT</h1>
9+
<header className={`bg-black/75 drop-shadow-2xl px-4 flex items-center justify-center md:justify-start ${className}`}>
10+
<h1 className='md:text-left text-lg'>DISPLACEMENT</h1>
511
</header>
612
)
713
}

src/components/Layout.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ export const Layout: React.FC<LayoutProps> = ({
99
children,
1010
}) => {
1111
return (
12-
<div className='fixed inset-0 overflow-hidden flex flex-col'>
12+
<>
1313
<Header/>
14-
<main className='flex-1 relative'>
14+
<main>
1515
{children}
1616
</main>
17-
</div>
17+
</>
1818
)
1919
}

src/pages/index.tsx

+22-7
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,34 @@
11
import type { NextPage } from 'next'
22
import { BottomBarSection } from '../components/BottomBarSection';
33
import { CanvasSection } from '../components/CanvasSection'
4+
import { Header } from '../components/Header';
45
import { Layout } from '../components/Layout';
56
import { SectionsContainer } from '../components/SectionsContainer';
67
import { SettingsSection } from '../components/SettingsSection';
78

89
const Home: NextPage = () => {
910
return (
10-
<Layout>
11-
<SectionsContainer
12-
primary={<CanvasSection/>}
13-
secondary={<SettingsSection/>}
14-
bottomBar={<BottomBarSection/>}
15-
/>
16-
</Layout>
11+
<>
12+
<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'>
13+
<h1 className='text-2xl font-bold md:text-left'>DISPLACEMENT</h1>
14+
</header>
15+
<div className='md:flex'>
16+
<section className='mt-16 h-[calc(100vh-theme(spacing.16))] relative md:flex-1'>
17+
<div className='absolute inset-4 overflow-y-auto'>
18+
<div className='absolute inset-0 flex justify-center items-center bg-red-900'>
19+
<div className='w-full h-full max-w-[500px] max-h-[500px] bg-red-500'>
20+
21+
</div>
22+
</div>
23+
</div>
24+
</section>
25+
<section className='mt-16 h-[calc(100vh-theme(spacing.16))] relative md:flex-1'>
26+
<div className='absolute inset-4 overflow-y-auto bg-sky-700'>
27+
28+
</div>
29+
</section>
30+
</div>
31+
</>
1732
)
1833
}
1934

0 commit comments

Comments
 (0)