-
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
1 parent
cfe4095
commit ad37d92
Showing
16 changed files
with
220 additions
and
45 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import Link from 'next/link'; | ||
import { useState } from 'react'; | ||
import styles from './styles.module.scss'; | ||
|
||
export function NavBar(){ | ||
const [ selectedPage, setSelectedPage ] = useState('home'); | ||
|
||
return( | ||
|
||
<nav className={styles.nav}> | ||
<img src="/icons/small-logo.svg" alt="logo" /> | ||
|
||
<div> | ||
<Link href="/"> | ||
<div className={selectedPage === 'home'? styles.selected : ''} onClick={()=>setSelectedPage('home')}> | ||
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http:https://www.w3.org/2000/svg"> | ||
<path d="M4 12L16 2.66663L28 12V26.6666C28 27.3739 27.719 28.0522 27.219 28.5522C26.7189 29.0523 26.0406 29.3333 25.3333 29.3333H6.66667C5.95942 29.3333 5.28115 29.0523 4.78105 28.5522C4.28095 28.0522 4 27.3739 4 26.6666V12Z" stroke={selectedPage === 'home'? '#5965E0': '#aaaaaa'} strokeWidth="2.5" strokeLinecap="round" strokeLinejoin="round"/> | ||
<path d="M12 29.3333V16H20V29.3333" stroke={selectedPage === 'home'? '#5965E0': '#aaaaaa'} strokeWidth="2.5" strokeLinecap="round" strokeLinejoin="round"/> | ||
</svg> | ||
</div> | ||
</Link> | ||
|
||
<Link href="/ranking"> | ||
<div className={selectedPage === 'ranking'? styles.selected : ''} onClick={()=>setSelectedPage('ranking')}> | ||
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http:https://www.w3.org/2000/svg"> | ||
<g> | ||
<path d="M16.0001 20C21.1547 20 25.3334 15.8214 25.3334 10.6667C25.3334 5.51205 21.1547 1.33337 16.0001 1.33337C10.8454 1.33337 6.66675 5.51205 6.66675 10.6667C6.66675 15.8214 10.8454 20 16.0001 20Z" stroke={selectedPage === 'ranking'? '#5965E0': '#aaaaaa'} strokeWidth="2.5" strokeLinecap="round" strokeLinejoin="round"/> | ||
<path d="M10.9466 18.52L9.33325 30.6667L15.9999 26.6667L22.6666 30.6667L21.0533 18.5067" stroke={selectedPage === 'ranking'? '#5965E0': '#aaaaaa'} strokeWidth="2.5" strokeLinecap="round" strokeLinejoin="round"/> | ||
</g> | ||
</svg> | ||
</div> | ||
</Link> | ||
|
||
</div> | ||
</nav> | ||
); | ||
} |
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,62 @@ | ||
|
||
.nav { | ||
position: absolute; | ||
top: 0; | ||
left: 0; | ||
height: 100%; | ||
width: 6rem; | ||
background: var(--white); | ||
|
||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
|
||
img { | ||
padding: 1rem; | ||
height: 4.5rem; | ||
width: 4.5rem; | ||
} | ||
|
||
> div { | ||
height: 100%; | ||
width: 100%; | ||
gap: 2rem; | ||
display: flex; | ||
flex-direction: column; | ||
width: 100%; | ||
justify-content: center; | ||
|
||
> div { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
position: relative; | ||
|
||
cursor: pointer; | ||
|
||
&.selected::before { | ||
content: " "; | ||
display: inline-block; | ||
width: 0.3rem; | ||
height: 3rem; | ||
background: var(--blue); | ||
position: absolute; | ||
left: 0; | ||
border-bottom-right-radius: 5px; | ||
border-top-right-radius: 5px; | ||
} | ||
} | ||
} | ||
} | ||
|
||
@media screen and (max-width: 800px){ | ||
.nav { | ||
width: 100vw; | ||
height: 6rem; | ||
|
||
flex-direction: row; | ||
> div { | ||
flex-direction: row; | ||
} | ||
} | ||
} |
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,10 +1,13 @@ | ||
import { ChallengeContextProvider } from '../context/ChallengeContext'; | ||
import { NavBar } from '../components/NavBar'; | ||
import '../styles/globals.scss'; | ||
|
||
function MyApp({ Component, pageProps }) { | ||
return( | ||
<Component {...pageProps} /> | ||
) | ||
<> | ||
<NavBar /> | ||
<Component {...pageProps} /> | ||
</> | ||
) | ||
} | ||
|
||
export default MyApp |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
export default function Ranking(){ | ||
return( | ||
<div className="container"> | ||
<h1>ranking</h1> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,4 +45,5 @@ a { | |
|
||
display: flex; | ||
flex-direction: column; | ||
} | ||
} | ||
|
Oops, something went wrong.
ad37d92
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs: