-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cedf566
commit d5d5abf
Showing
11 changed files
with
174 additions
and
186 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
'use client' | ||
|
||
import { useHover } from 'react-use' | ||
|
||
import Link from 'next/link' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,53 @@ | ||
import { PiHamburger, PiHamburgerFill } from 'react-icons/pi' | ||
|
||
import { NAV_ICON_SIZE } from '@/config/constants/navigation' | ||
|
||
import { HoverableElement } from '../hoverables' | ||
import Navbar from './navbar' | ||
import User from './user' | ||
|
||
// const enum BURGER_SIZE { | ||
// DEFAULT = '16px', | ||
// MD = '32px', | ||
// } | ||
|
||
export default function WithSidebar({ | ||
contentNearby, | ||
}: Readonly<{ | ||
contentNearby: React.ReactNode | ||
}>) { | ||
const linkWrapper = 'item-center flex w-56 flex-col items-start gap-4' | ||
const contentWrapper = 'flex-1 overflow-auto p-8' | ||
const linkWrapper = | ||
'item-center flex flex-col items-start gap-4 w-full md:w-56' | ||
const contentWrapper = 'flex-1 overflow-auto p-4 md:p-8' | ||
|
||
return ( | ||
<div className='h-screen overflow-hidden'> | ||
<input type='checkbox' id='sidebar-toggle' className='hidden' /> | ||
<div className='flex h-full'> | ||
<div className='fixed-no-scroll h-full w-64 flex-none'> | ||
<div className='flex h-screen flex-col items-start justify-between p-6'> | ||
<div className='flex flex-col gap-4 rounded-medium'> | ||
<nav className={linkWrapper}> | ||
<Navbar linksGroup='top' withLogo /> | ||
</nav> | ||
</div> | ||
<div> | ||
<nav className={linkWrapper}> | ||
<Navbar linksGroup='bottom' /> | ||
<User /> | ||
</nav> | ||
</div> | ||
<div className='fixed-no-scroll hidden h-full w-64 flex-none md:flex'> | ||
<div className='flex h-screen flex-col items-start justify-between p-4 md:p-8'> | ||
<nav className={linkWrapper}> | ||
<Navbar linksGroup='top' withLogo /> | ||
</nav> | ||
<nav className={linkWrapper}> | ||
<Navbar linksGroup='bottom' /> | ||
<User /> | ||
</nav> | ||
</div> | ||
</div> | ||
<div className={contentWrapper}>{contentNearby}</div> | ||
</div> | ||
<label | ||
htmlFor='sidebar-toggle' | ||
className='fixed right-[16px] top-[16px] z-10 cursor-pointer rounded-medium bg-background md:right-[32px] md:top-[32px] md:hidden' | ||
// className={`fixed right-[${BURGER_SIZE.DEFAULT}] top-[${BURGER_SIZE.DEFAULT}] z-10 bg-background rounded-medium cursor-pointer md:right-[${BURGER_SIZE.MD}] md:top-[${BURGER_SIZE.MD}] md:hidden`} | ||
> | ||
<HoverableElement | ||
element={<PiHamburger size={NAV_ICON_SIZE} />} | ||
hoveredElement={<PiHamburgerFill size={NAV_ICON_SIZE} />} | ||
withShift={false} | ||
/> | ||
</label> | ||
</div> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.