Code style
This commit is contained in:
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>;
|
||||
};
|
||||
|
@ -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>;
|
||||
|
||||
};
|
||||
|
@ -11,7 +11,7 @@ const Spinner: NextPage<{size: number, color?: string}> = ({ size, color }) => {
|
||||
const vbSizeX = (2 * x0) + side + (2 * padding);
|
||||
const vbSizeY = diameterY + (2 * padding);
|
||||
|
||||
return <div style={{height: size, width: size}} className={styles.spinnerContainer}><svg height={"100%"} width={"100%"} viewBox={`-${padding} -${padding} ${vbSizeX} ${vbSizeY}`} className={styles.spinner}>
|
||||
return <div style={{height: size, width: size}} className={styles.spinnerContainer}><svg height="100%" width="100%" viewBox={`-${padding} -${padding} ${vbSizeX} ${vbSizeY}`} className={styles.spinner}>
|
||||
<polygon points={`${x0},${diameterY} 0,${diameterY/2} ${x0},0 ${x0+side},0 ${2*x0 + side},${diameterY/2} ${x0+side},${diameterY}`} className={styles.spinnerPath} style={{stroke: color}} />
|
||||
</svg></div>;
|
||||
};
|
||||
|
@ -160,7 +160,7 @@ const REPLInput: NextPage<REPLInputParams> = ({historyCallback, historyClear, in
|
||||
return <div className={styles.wrapperwrapper}>
|
||||
<span className={styles.inputstart}>$ </span>
|
||||
<div className={styles.wrapper}>
|
||||
<input ref={inputRef as MutableRefObject<HTMLInputElement>} className={styles.in} type={"text"} onChange={replinOnChange} onKeyDown={keyEvent} spellCheck={"false"} autoComplete={"off"} autoFocus maxLength={20} />
|
||||
<input ref={inputRef as MutableRefObject<HTMLInputElement>} className={styles.in} type="text" onChange={replinOnChange} onKeyDown={keyEvent} spellCheck="false" autoComplete="off" autoFocus maxLength={20} />
|
||||
<span className={styles.completionWrapper}><span ref={typed} className={styles.typed}></span><span ref={completion} className={styles.completion}></span></span>
|
||||
</div>
|
||||
</div>;
|
||||
|
Reference in New Issue
Block a user