Code style

This commit is contained in:
2022-10-29 21:13:28 +02:00
parent 81fc439e7f
commit 8034aadb93
10 changed files with 42 additions and 42 deletions

View File

@ -12,8 +12,8 @@ const ContentPage: NextPage<{ content: ProjectRender | DiaryRender }> = ({ conte
return (<>
{content.type === "diary" ? <DiaryPageSelector title={content.title} pageSelected={content.pageSelected} name={content.name} pages={content.entries} /> : null}
<div className={styles.more}>
{content.more ? <a href={content.more} className={"nostyle"}><Icon path={mdiWeb} size={"2em"} title="More" id={`mdi_content_more_link_${content.name}`} /></a> : null}
{content.repo ? <a href={content.repo} className={"nostyle"}><Git size={"2em"} title={"Repository"} id={`mdi_content_repo_link_${content.name}`} /></a> : null}
{content.more ? <a href={content.more} className="nostyle"><Icon path={mdiWeb} size="2em" title="More" id={`mdi_content_more_link_${content.name}`} /></a> : null}
{content.repo ? <a href={content.repo} className="nostyle"><Git size="2em" title="Repository" id={`mdi_content_repo_link_${content.name}`} /></a> : null}
</div>
<div className={styles.asciidoc} dangerouslySetInnerHTML={{ __html: content.html }}>
</div>

View File

@ -14,13 +14,13 @@ const Layout: NextPage<ILayoutProps> = ({ title, children }) => {
<title>{title ?? "c0ntroller.de"}</title>
</Head>
<div id={styles.blogBody}>
<header id={"top"}>
<header id="top">
<Navigation />
</header>
<main>
{ children }
</main>
<footer id={"bottom"}>
<footer id="bottom">
Copyright und so nen Stuff
</footer>
</div>

View File

@ -11,29 +11,29 @@ import logo from "../../public/img/icon.png";
const Navigation: NextPage<{}> = () => {
return <nav className={styles.navigation}>
<Link href={"/"}>
<Link href="/">
<a className={`nostyle ${styles.imgContainer} ${styles.logo}`}>
<Image src={logo} alt={"Logo"} layout={"fill"} />
{/*<picture>
<source srcSet="/icon.png" type="image/png" />
<img src="/icon.png" alt={"Website icon, a red eye"} className={styles.logo} />
</picture>*/}
<Image src={logo} alt="Logo" layout="fill" />
</a>
</Link>
<div className={styles.navLink}>
<Link href={"/"}><a className="nostyle">
<Link href="/"><a className="nostyle">
<span className={styles.linkText}>Projects</span>
<span className={styles.linkIcon}><Icon path={mdiHome} size={"2em"} title={"Home and Projects"} id={"mdi_nav_home"} /></span>
<span className={styles.linkIcon}><Icon path={mdiHome} size="2em" title="Home and Projects" id="mdi_nav_home" /></span>
</a></Link>
</div>
<div className={styles.navLink}>
<Link href={"/me"}><a className="nostyle">
<Link href="/me"><a className="nostyle">
<span className={styles.linkText}>About Me</span>
<span className={styles.linkIcon}><Icon path={mdiAccount} size={"2em"} title={"About Me"} id={"mdi_nav_aboutme"} /></span>
<span className={styles.linkIcon}><Icon path={mdiAccount} size="2em" title="About Me" id="mdi_nav_aboutme" /></span>
</a></Link>
</div>
<div className={styles.spacer}></div>
<div className={styles.navIcon}><a className="nostyle" href={"/terminal"}><Icon path={mdiConsole} size={"2em"} title={"Terminal"} id={"mdi_nav_terminal"} /></a></div>
<div className={styles.navIcon}>
<Link href="/terminal"><a className="nostyle">
<Icon path={mdiConsole} size="2em" title="Terminal" id="mdi_nav_terminal" />
</a></Link>
</div>
<ThemeSwitch />
</nav>;
};

View File

@ -36,7 +36,7 @@ const ThemeSwitch: NextPage<{ size?: string }> = ({ size }) => {
if (!mounted) {
return <div className={styles.switch} title="Theme switching needs JS to be enabled.">
<Icon path={mdiLanguageJavascript} size={size || "1.5em"} className={styles.placeHolder} id={"mdi_themeswitch_noscript"} />
<Icon path={mdiLanguageJavascript} size={size || "1.5em"} className={styles.placeHolder} id="mdi_themeswitch_noscript" />
</div>;
}
@ -44,8 +44,8 @@ const ThemeSwitch: NextPage<{ size?: string }> = ({ size }) => {
const moonClasses = fadeProps.moon || (theme === "light" ? styles.selected : undefined);
return <div className={styles.switch}>
<div className={sunClasses} onClick={() => switchTheme("light")}><Icon path={mdiWhiteBalanceSunny} size={size || "1.5em"} title={"Light theme"} id={"mdi_themeswitch_light"} /></div>
<div className={moonClasses} onClick={() => switchTheme("dark")}><Icon path={mdiWeatherNight} size={size || "1.5em"} title={"Dark theme"} id={"mdi_themeswitch_dark"} /></div>
<div className={sunClasses} onClick={() => switchTheme("light")}><Icon path={mdiWhiteBalanceSunny} size={size || "1.5em"} title="Light theme" id="mdi_themeswitch_light" /></div>
<div className={moonClasses} onClick={() => switchTheme("dark")}><Icon path={mdiWeatherNight} size={size || "1.5em"} title="Dark theme" id="mdi_themeswitch_dark" /></div>
</div>;
};