This repository was archived by the owner on Apr 29, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
5 changed files
with
116 additions
and
41 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 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 |
---|---|---|
@@ -0,0 +1,78 @@ | ||
import Link from 'next/link'; | ||
|
||
/** | ||
* Navbar drawer item. | ||
*/ | ||
export default function NavDrawerItem(props: { | ||
children: React.ReactNode; | ||
to: string; | ||
newTab?: boolean; | ||
}) { | ||
const { children, to, newTab } = props; | ||
|
||
if (newTab) { | ||
return ( | ||
<li | ||
css={{ | ||
margin: 0, | ||
padding: '8px 0', | ||
'&::before': { | ||
content: 'none', | ||
}, | ||
}} | ||
> | ||
<a | ||
href={to} | ||
target="_blank" | ||
rel="noreferrer" | ||
css={{ | ||
textDecoration: 'none', | ||
fontSize: 18, | ||
fontWeight: 500, | ||
color: 'white', | ||
marginLeft: 50, | ||
userSelect: 'none', | ||
transition: '250ms ease', | ||
'&:hover': { | ||
color: '#fafafa', | ||
}, | ||
}} | ||
> | ||
{children} | ||
</a> | ||
</li> | ||
); | ||
} | ||
|
||
return ( | ||
<li | ||
css={{ | ||
margin: 0, | ||
padding: '8px 0', | ||
'&::before': { | ||
content: 'none', | ||
}, | ||
}} | ||
> | ||
<Link href={to}> | ||
<a | ||
href={to} | ||
css={{ | ||
textDecoration: 'none', | ||
fontSize: 18, | ||
fontWeight: 500, | ||
color: 'white', | ||
marginLeft: 50, | ||
userSelect: 'none', | ||
transition: '250ms ease', | ||
'&:hover': { | ||
color: '#fafafa', | ||
}, | ||
}} | ||
> | ||
{children} | ||
</a> | ||
</Link> | ||
</li> | ||
); | ||
} |
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,10 +1,23 @@ | ||
import NavDrawerItem from './nav-drawer-item'; | ||
import routes from '../routes'; | ||
|
||
/** | ||
* Navbar drawer. | ||
*/ | ||
export default function NavDrawer(props: { | ||
open: () => void; | ||
onClose: () => void; | ||
onOpen: () => void; | ||
}) { | ||
return <></>; | ||
export default function NavDrawer() { | ||
return ( | ||
<ul | ||
css={{ | ||
margin: 0, | ||
padding: '24px 0', | ||
backgroundColor: 'black', | ||
}} | ||
> | ||
<NavDrawerItem to={routes.theory.index}>theory</NavDrawerItem> | ||
<NavDrawerItem to={routes.theory.caseStudy}>case study</NavDrawerItem> | ||
<NavDrawerItem to={routes.blog} newTab> | ||
blog | ||
</NavDrawerItem> | ||
</ul> | ||
); | ||
} |
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