added noscript component

This commit is contained in:
Hunter W.
2026-06-09 18:11:17 -04:00
parent 5cc96b4ef1
commit 116a2ca06b
3 changed files with 34 additions and 3 deletions

View File

@@ -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}

View File

@@ -42,6 +42,8 @@ export default function Home() {
</header>
<Nav section={"profile"} />
<main>
<Profile />

View File

@@ -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={{