Img optimized

This commit is contained in:
Daniel Kluge 2022-10-18 23:40:09 +02:00
parent 09af95bde9
commit c003b0627d
3 changed files with 15 additions and 13 deletions

View File

@ -1,19 +1,22 @@
/* eslint-disable @next/next/no-img-element */ /* eslint-disable @next/next/no-img-element */
import type { NextPage } from "next"; import type { NextPage } from "next";
import Link from "next/link"; import Link from "next/link";
import Image from "next/image";
import { TerminalWindow, House, User } from "phosphor-react"; import { TerminalWindow, House, User } from "phosphor-react";
import ThemeSwitch from "./ThemeSwitch"; import ThemeSwitch from "./ThemeSwitch";
import styles from "../../styles/Blog/Navigation.module.scss"; import styles from "../../styles/Blog/Navigation.module.scss";
import logo from "../../public/icon.png";
const Navigation: NextPage<{}> = () => { const Navigation: NextPage<{}> = () => {
return <nav className={styles.navigation}> return <nav className={styles.navigation}>
<Link href={"/"}> <Link href={"/"}>
<a className={`nostyle ${styles.imgContainer}`}> <a className={`nostyle ${styles.imgContainer} ${styles.logo}`}>
<picture> <Image src={logo} alt={"Logo"} layout={"fill"} />
{/*<picture>
<source srcSet="/icon.png" type="image/png" /> <source srcSet="/icon.png" type="image/png" />
<img src="/icon.png" alt={"Website icon, a red eye"} className={styles.logo} /> <img src="/icon.png" alt={"Website icon, a red eye"} className={styles.logo} />
</picture> </picture>*/}
</a> </a>
</Link> </Link>
<div className={styles.navLink}> <div className={styles.navLink}>

View File

@ -32,16 +32,14 @@ const Blog: NextPage<{ content: ContentList }> = ({content}) => {
</div>; </div>;
}; };
return <> return <Layout>
<Layout> <h1>Hello there!</h1>
<h1>Hello there!</h1> <p>Miaumiau Lorem ipsum</p>
<p>Miaumiau Lorem ipsum</p> <h2>Projects</h2>
<h2>Projects</h2> { generateCards("project") }
{ generateCards("project") } <h2>Diaries</h2>
<h2>Diaries</h2> { generateCards("diary") }
{ generateCards("diary") } </Layout>;
</Layout>
</>;
}; };

View File

@ -29,6 +29,7 @@
.logo { .logo {
height: calc(1em + 40px - 20px); height: calc(1em + 40px - 20px);
width: calc((501 / 204) * (1em + 40px - 20px));
} }
.navLink { .navLink {