-
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
1177dac
commit e22c2fc
Showing
8 changed files
with
70 additions
and
61 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
.ChartArea | ||
display: flex | ||
margin-left: -1em | ||
|
||
.Chart | ||
box-shadow: var(--shadow) |
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 |
---|---|---|
|
@@ -5,7 +5,6 @@ | |
margin-right: 1em | ||
|
||
width: 15% | ||
max-height: 80vh | ||
display: flex | ||
z-index: 0 | ||
|
||
|
41 changes: 21 additions & 20 deletions
41
styles/index.module.sass → Components/UI/NavBar/NavBar.module.sass
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,20 +1,21 @@ | ||
.NavBar | ||
display: flex | ||
flex-direction: column | ||
justify-content: center | ||
align-items: center | ||
|
||
.Link | ||
display: flex | ||
flex-direction: column | ||
justify-content: center | ||
align-items: center | ||
width: 100% | ||
background-color: var(--alt-color) | ||
color: var(--text-color) | ||
font-weight: bold | ||
cursor: pointer | ||
|
||
&:hover | ||
background-color: var(--text-color) | ||
color: var(--bg-color) | ||
.NavBar | ||
display: flex | ||
flex-direction: column | ||
justify-content: center | ||
align-items: center | ||
|
||
.Link | ||
display: flex | ||
flex-direction: column | ||
justify-content: center | ||
align-items: center | ||
width: 100% | ||
background-color: var(--alt-color) | ||
color: var(--text-color) | ||
font-weight: bold | ||
cursor: pointer | ||
|
||
&:hover | ||
background-color: var(--text-color) | ||
color: var(--bg-color) | ||
|
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,27 @@ | ||
import Link from 'next/link' | ||
import Image from 'next/image' | ||
|
||
import useVariableInterpolation from '../../../util/useVariableInterpolation' | ||
|
||
import styles from './NavBar.module.sass' | ||
|
||
const CHARTLIST = [ 'population', 'budget' ] as const | ||
|
||
const NavBar = (): JSX.Element => { | ||
const { t } = useVariableInterpolation('common') | ||
|
||
const charts: JSX.Element[] = CHARTLIST.map((chartName, index) => { | ||
const tChartName = t(`chartList.${chartName}`) | ||
return ( | ||
<Link key={`Chart-${index}-${chartName}`} className={styles.Link} href={`/${chartName}`}> | ||
<Image src={`/icons/${chartName}.svg`} width='50' height='50' alt={tChartName} /> | ||
{tChartName} | ||
</Link> | ||
) | ||
}) | ||
|
||
return <nav className={styles.NavBar}>{charts}</nav> | ||
} | ||
|
||
export default NavBar | ||
|
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