manual ids for mdi because of SSR
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" /></a> : null}
|
||||
{content.repo ? <a href={content.repo} className={"nostyle"}><Git size={"2em"} title={"Repository"} /></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>
|
||||
|
@ -23,17 +23,17 @@ const Navigation: NextPage<{}> = () => {
|
||||
<div className={styles.navLink}>
|
||||
<Link href={"/"}><a className="nostyle">
|
||||
<span className={styles.linkText}>Projects</span>
|
||||
<span className={styles.linkIcon}><Icon path={mdiHome} size={"2em"} title={"Home and Projects"} /></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">
|
||||
<span className={styles.linkText}>About Me</span>
|
||||
<span className={styles.linkIcon}><Icon path={mdiAccount} size={"2em"} title={"About Me"} /></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"} /></a></div>
|
||||
<div className={styles.navIcon}><a className="nostyle" href={"/terminal"}><Icon path={mdiConsole} size={"2em"} title={"Terminal"} id={"mdi_nav_terminal"} /></a></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} />
|
||||
<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"} /></div>
|
||||
<div className={moonClasses} onClick={() => switchTheme("dark")}><Icon path={mdiWeatherNight} size={size || "1.5em"} title={"Dark theme"} /></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>;
|
||||
|
||||
};
|
||||
|
Reference in New Issue
Block a user