mirror of
https://github.com/hazemKrimi/personal-website.git
synced 2026-05-01 18:00:26 +00:00
Add about page
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { FC, useContext, useRef, useEffect } from 'react';
|
||||
import { DarkModeContext } from './DarkMode';
|
||||
import { useRouter } from 'next/router';
|
||||
import styled from 'styled-components';
|
||||
import IconButton from './IconButton';
|
||||
import Button from './Button';
|
||||
@@ -53,6 +54,7 @@ const Bar = styled.nav<StyledProps>`
|
||||
const MobileNav: FC<Props> = ({ open, close }) => {
|
||||
const { dark, toggle } = useContext(DarkModeContext);
|
||||
const ref = useRef<HTMLDivElement>(null);
|
||||
const router = useRouter();
|
||||
|
||||
useEffect(() => {
|
||||
document.addEventListener('mousedown', (event: MouseEvent) => {
|
||||
@@ -79,7 +81,14 @@ const MobileNav: FC<Props> = ({ open, close }) => {
|
||||
<IconButton icon={dark ? '/dark-close.svg' : '/light-close.svg'} onClick={close} />
|
||||
</div>
|
||||
<div className='mobile-button-wrapper'>
|
||||
<Button>About</Button>
|
||||
<Button
|
||||
onClick={() => {
|
||||
close();
|
||||
router.push('/about');
|
||||
}}
|
||||
>
|
||||
About
|
||||
</Button>
|
||||
</div>
|
||||
<div className='mobile-button-wrapper'>
|
||||
<Button>Blog</Button>
|
||||
|
||||
+4
-4
@@ -1,10 +1,10 @@
|
||||
import { FC, useContext, useState } from 'react';
|
||||
import { DarkModeContext } from './DarkMode';
|
||||
import { useRouter } from 'next/router';
|
||||
import styled from 'styled-components';
|
||||
import Image from 'next/image';
|
||||
import Button from './Button';
|
||||
import IconButton from './IconButton';
|
||||
import { useRouter } from 'next/router';
|
||||
import MobileNav from './MobileNav';
|
||||
|
||||
const Bar = styled.nav`
|
||||
@@ -72,15 +72,15 @@ const Nav: FC = () => {
|
||||
</div>
|
||||
<div className='buttons'>
|
||||
<IconButton icon={dark ? '/sun.svg' : '/moon.svg'} onClick={toggle} />
|
||||
<Button>About</Button>
|
||||
<Button onClick={() => router.push('/about')}>About</Button>
|
||||
<Button>Blog</Button>
|
||||
<Button>Portfolio</Button>
|
||||
<Button variant='outline' onClick={() => router.push('/resume.pdf')}>
|
||||
<Button variant='outline' onClick={() => window.open('/hazem-krimi.pdf', '_blank')}>
|
||||
Resume
|
||||
</Button>
|
||||
</div>
|
||||
<div className='mobile-buttons'>
|
||||
<Button variant='outline' onClick={() => router.push('/hazem-krimi.pdf')}>
|
||||
<Button variant='outline' onClick={() => window.open('/hazem-krimi.pdf', '_blank')}>
|
||||
Resume
|
||||
</Button>
|
||||
<IconButton
|
||||
|
||||
Reference in New Issue
Block a user