trailing slash fix

This commit is contained in:
2026-09-10 21:40:29 +02:00
parent fb8e3d0ed9
commit 58ce567c86
6 changed files with 27 additions and 9 deletions
+1
View File
@@ -2,6 +2,7 @@ import { defineConfig } from 'astro/config';
import react from '@astrojs/react';
export default defineConfig({
site: 'https://28k8.moonweb.org',
trailingSlash: 'never',
integrations: [react()],
server: { host: '0.0.0.0' },
vite: { server: { allowedHosts: true } }
+17
View File
@@ -0,0 +1,17 @@
# Redirect trailing slashes to non-trailing slash URLs
/bbs/ /bbs 301
/bbs/pc/ /bbs/pc 301
/bbs/pc/phobia/ /bbs/pc/phobia 301
/bbs/pc/trancemission/ /bbs/pc/trancemission 301
/bbs/pc/skyline/ /bbs/pc/skyline 301
/bbs/pc/kosmos-design/ /bbs/pc/kosmos-design 301
/bbs/atari/ /bbs/atari 301
/bbs/atari/tropic-dreams/ /bbs/atari/tropic-dreams 301
/bbs/amiga/ /bbs/amiga 301
/bbs/amiga/esprit/ /bbs/amiga/esprit 301
/bbs/amiga/mods/ /bbs/amiga/mods 301
/bbs/fido/ /bbs/fido 301
/bbs/fido/ansi-art/ /bbs/fido/ansi-art 301
/bbs/fido/nodelist/ /bbs/fido/nodelist 301
/bbs/fido/cds/ /bbs/fido/cds 301
/bbs/legal-notice/ /bbs/legal-notice 301
+5 -5
View File
@@ -3,11 +3,11 @@ import { playLine1Sequence, markConnected } from '../lib/sound';
type DialState = 'idle' | 'dialing';
export default function ModemIntro() {
const [state, setState] = useState<DialState>('idle');
function selectLine(line: 1 | 2) {
if (line === 2) { markConnected(); window.location.href = '/bbs/'; return; }
function selectLine(line: 1 | 2) {
if (line === 2) { markConnected(); window.location.href = '/bbs'; return; }
setState('dialing');
playLine1Sequence(() => { markConnected(); window.location.href = '/bbs/'; });
}
playLine1Sequence(() => { markConnected(); window.location.href = '/bbs'; });
}
useEffect(() => {
if (state !== 'idle') return;
function onKeyDown(e: KeyboardEvent) {
@@ -23,7 +23,7 @@ export default function ModemIntro() {
| 28k8 [MODEM] ATDT +49-821-2191-038 |
+------------------------------------------+`}</pre>
{state === 'idle' && (
<pre style={{ textAlign: 'center' }}><a href="#" onClick={(e) => { e.preventDefault(); selectLine(1); }}>{`> Line 1: +49-821-2191-038 [VFC V34] 28800 <`}</a>{'\n\n'}<a href="/bbs/" onClick={(e) => { e.preventDefault(); selectLine(2); }}>{`> Line 2: +49-821-2191-036 [X75] 64000 <`}</a>{'\n\n'}<span className="select-line-hint">{`>>>>>>>>> SELECT A LINE TO CONNECT <<<<<<<<<`}</span></pre>
<pre style={{ textAlign: 'center' }}><a href="#" onClick={(e) => { e.preventDefault(); selectLine(1); }}>{`> Line 1: +49-821-2191-038 [VFC V34] 28800 <`}</a>{'\n\n'}<a href="/bbs" onClick={(e) => { e.preventDefault(); selectLine(2); }}>{`> Line 2: +49-821-2191-036 [X75] 64000 <`}</a>{'\n\n'}<span className="select-line-hint">{`>>>>>>>>> SELECT A LINE TO CONNECT <<<<<<<<<`}</span></pre>
)}
{state === 'dialing' && <p style={{ textAlign: 'center' }}>Dialing... please wait.</p>}
</div>
+1 -1
View File
@@ -3,5 +3,5 @@ export interface Props { showBack?: boolean; }
const { showBack = true } = Astro.props;
---
<div class="nav-bar">
{showBack && <a href="/bbs/">[B] Back to Main Menu</a>}
{showBack && <a href="/bbs">[B] Back to Main Menu</a>}
</div>
+1 -1
View File
@@ -1,6 +1,6 @@
export type KeymapEntry = { key: string; href: string; label: string };
export const GLOBAL_NAV_KEYS: KeymapEntry[] = [
{ key: 'B', href: '/bbs/', label: 'Back to Main Menu' },
{ key: 'B', href: '/bbs', label: 'Back to Main Menu' },
{ key: 'Q', href: 'disconnect', label: 'Disconnect' },
{ key: 'I', href: '/bbs/legal-notice', label: 'Legal Notice' },
];
+1 -1
View File
@@ -22,7 +22,7 @@ const box = `<span class="c-main-red">\u2554${hr}\u2557
<div style="margin-top: 4rem; text-align: center;">
<pre class="ansi-text" style="display:inline-block; text-align:left;" set:html={box} />
<p style="margin-top: 2rem;">
<a href="/bbs/" style="border:1px solid var(--red-dark); padding:0.4rem 1rem; display:inline-block; text-decoration:none;">[B] Back to Main Menu</a>
<a href="/bbs" style="border:1px solid var(--red-dark); padding:0.4rem 1rem; display:inline-block; text-decoration:none;">[B] Back to Main Menu</a>
</p>
<p style="color: var(--grey); font-size: 0.85em; margin-top: 1rem;">
Press <span class="c-main-red">B</span> to return to the main menu.