added noscript component
This commit is contained in:
@@ -31,7 +31,31 @@ export default function RootLayout({
|
||||
return (
|
||||
<html lang="en" className={`${mono.variable} ${sans.variable}`} suppressHydrationWarning>
|
||||
<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">
|
||||
<ThemeSwitch/>
|
||||
{children}
|
||||
|
||||
@@ -42,6 +42,8 @@ export default function Home() {
|
||||
|
||||
</header>
|
||||
|
||||
|
||||
|
||||
<Nav section={"profile"} />
|
||||
<main>
|
||||
<Profile />
|
||||
|
||||
@@ -5,12 +5,17 @@ import Link from "next/link";
|
||||
|
||||
type Props = {
|
||||
section: string;
|
||||
subtitle?: string;
|
||||
};
|
||||
|
||||
const items = ["profile", "project"];
|
||||
|
||||
export default function Nav({ section, subtitle }: Props) {
|
||||
export default function Nav({ section }: Props) {
|
||||
|
||||
|
||||
let subtitle = null;
|
||||
if (section == "project"){
|
||||
|
||||
}
|
||||
return (
|
||||
<nav
|
||||
style={{
|
||||
|
||||
Reference in New Issue
Block a user