diff --git a/src/components/NavBar.astro b/src/components/NavBar.astro index 5b7c442..916bf0b 100644 --- a/src/components/NavBar.astro +++ b/src/components/NavBar.astro @@ -3,5 +3,5 @@ export interface Props { showBack?: boolean; } const { showBack = true } = Astro.props; ---
diff --git a/src/components/TerminalShell.tsx b/src/components/TerminalShell.tsx index 354d62c..486c337 100644 --- a/src/components/TerminalShell.tsx +++ b/src/components/TerminalShell.tsx @@ -7,7 +7,6 @@ export default function TerminalShell({ children }: { children?: React.ReactNode if (e.metaKey || e.ctrlKey || e.altKey) return; const entry = findKeyEntry(e.key); if (!entry) return; - if (entry.href === 'back') { window.history.back(); return; } if (entry.href === 'disconnect') { resetConnected(); window.location.href = '/'; return; } window.location.href = entry.href; } diff --git a/src/lib/keymap.ts b/src/lib/keymap.ts index 55e0220..a00d64a 100644 --- a/src/lib/keymap.ts +++ b/src/lib/keymap.ts @@ -1,6 +1,6 @@ export type KeymapEntry = { key: string; href: string; label: string }; export const GLOBAL_NAV_KEYS: KeymapEntry[] = [ - { key: 'B', href: 'back', label: 'Back' }, + { key: 'B', href: '/bbs/', label: 'Back to Main Menu' }, { key: 'Q', href: 'disconnect', label: 'Disconnect' }, { key: 'I', href: '/bbs/legal-notice', label: 'Legal Notice' }, ]; diff --git a/src/pages/404.astro b/src/pages/404.astro new file mode 100644 index 0000000..f3b8d18 --- /dev/null +++ b/src/pages/404.astro @@ -0,0 +1,33 @@ +--- +import TerminalLayout from '../layouts/TerminalLayout.astro'; +import StatusBar from '../components/StatusBar.astro'; +import LetterFooter from '../components/LetterFooter.astro'; +const W = 50; +const hr = '\u2550'.repeat(W - 2); +const sp = (n: number) => ' '.repeat(n); +const pad = (textLen: number) => sp(W - 4 - textLen); +const box = `\u2554${hr}\u2557 +\u2551${sp(W - 2)}\u2551 +\u2551 *** ERROR 404 ***${pad(17)}\u2551 +\u2551${sp(W - 2)}\u2551 +\u2551 Node not found in nodelist.${pad(27)}\u2551 +\u2551 The address you are trying to reach${pad(35)}\u2551 +\u2551 does not exist on this BBS.${pad(27)}\u2551 +\u2551${sp(W - 2)}\u2551 +\u2551 Check the nodelist and try again.${pad(33)}\u2551 +\u2551${sp(W - 2)}\u2551 +\u255A${hr}\u255D`; +--- ++ Press B to return to the main menu. +
+