More Navigation work
This commit is contained in:
parent
378525e152
commit
59da7d5c34
@ -1,10 +1,18 @@
|
|||||||
|
/* eslint-disable @next/next/no-img-element */
|
||||||
import type { NextPage } from "next";
|
import type { NextPage } from "next";
|
||||||
|
import Link from "next/link";
|
||||||
|
import styles from "../../styles/Blog/Navigation.module.scss";
|
||||||
|
|
||||||
const Navigation: NextPage<{}> = () => {
|
const Navigation: NextPage<{}> = () => {
|
||||||
return <nav>
|
return <nav className={styles.navigation}>
|
||||||
<div className="logo"></div>
|
<Link href={"/"} passHref>
|
||||||
<div className="navLink">Projects</div>
|
<picture>
|
||||||
<div className="navLink">About me</div>
|
<source srcSet="/icon.png" type="image/png" />
|
||||||
|
<img src="/icon.png" alt={"Website icon, a red eye"} className={styles.logo} />
|
||||||
|
</picture>
|
||||||
|
</Link>
|
||||||
|
<div className={styles.navLink}>Projects</div>
|
||||||
|
<div className={styles.navLink}>About me</div>
|
||||||
</nav>;
|
</nav>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
BIN
public/icon.png
Normal file
BIN
public/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 27 KiB |
33
styles/Blog/Navigation.module.scss
Normal file
33
styles/Blog/Navigation.module.scss
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
.navigation {
|
||||||
|
display: block;
|
||||||
|
max-width: 1000px;
|
||||||
|
min-width: 300px;
|
||||||
|
box-shadow: 0px 2px 5px gray;
|
||||||
|
margin: 0 auto;
|
||||||
|
padding: 20px;
|
||||||
|
font-size: 120%;
|
||||||
|
height: calc(1em + 40px);
|
||||||
|
border-radius: calc((1em + 40px) / 2);
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.logo {
|
||||||
|
display: inline-block;
|
||||||
|
margin-top: -10px;
|
||||||
|
height: calc(1em + 40px - 20px);
|
||||||
|
position: absolute;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navLink {
|
||||||
|
display: inline-block;
|
||||||
|
transition: text-decoration 0.2s ease-in-out;
|
||||||
|
margin: auto 5px;
|
||||||
|
|
||||||
|
&:nth-of-type(1) {
|
||||||
|
margin-left: calc((501 / 204) * (1em + 40px - 20px) + 15px);
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user