added noscript component
This commit is contained in:
@@ -32,6 +32,30 @@ export default function RootLayout({
|
|||||||
<html lang="en" className={`${mono.variable} ${sans.variable}`} suppressHydrationWarning>
|
<html lang="en" className={`${mono.variable} ${sans.variable}`} suppressHydrationWarning>
|
||||||
<head />
|
<head />
|
||||||
<body>
|
<body>
|
||||||
|
<noscript >
|
||||||
|
<div style={{
|
||||||
|
width: '100vw',
|
||||||
|
height: '100vh',
|
||||||
|
alignContent: 'center',
|
||||||
|
}}>
|
||||||
|
|
||||||
|
<div style={{
|
||||||
|
alignSelf: 'center',
|
||||||
|
alignItems: 'center',
|
||||||
|
fontFamily: 'var(--mono)',
|
||||||
|
padding: '20px',
|
||||||
|
textAlign: 'center',
|
||||||
|
background: '#555',
|
||||||
|
color: '#fff',
|
||||||
|
display: 'flex',
|
||||||
|
flexDirection: 'row',
|
||||||
|
}}>
|
||||||
|
<img src={"favicon.ico"} width={64} style={{marginLeft: '25%'}}/>
|
||||||
|
<span>JavaScript is required to run this application. Please enable JavaScript to continue.</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</noscript>
|
||||||
<ThemeProvider attribute="data-theme">
|
<ThemeProvider attribute="data-theme">
|
||||||
<ThemeSwitch/>
|
<ThemeSwitch/>
|
||||||
{children}
|
{children}
|
||||||
|
|||||||
@@ -42,6 +42,8 @@ export default function Home() {
|
|||||||
|
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<Nav section={"profile"} />
|
<Nav section={"profile"} />
|
||||||
<main>
|
<main>
|
||||||
<Profile />
|
<Profile />
|
||||||
|
|||||||
@@ -5,12 +5,17 @@ import Link from "next/link";
|
|||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
section: string;
|
section: string;
|
||||||
subtitle?: string;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const items = ["profile", "project"];
|
const items = ["profile", "project"];
|
||||||
|
|
||||||
export default function Nav({ section, subtitle }: Props) {
|
export default function Nav({ section }: Props) {
|
||||||
|
|
||||||
|
|
||||||
|
let subtitle = null;
|
||||||
|
if (section == "project"){
|
||||||
|
|
||||||
|
}
|
||||||
return (
|
return (
|
||||||
<nav
|
<nav
|
||||||
style={{
|
style={{
|
||||||
|
|||||||
Reference in New Issue
Block a user