diff --git a/app/not-found.tsx b/app/not-found.tsx new file mode 100644 index 0000000..6939106 --- /dev/null +++ b/app/not-found.tsx @@ -0,0 +1,127 @@ +import Link from 'next/link' +import { ArrowLeft, FolderGit2 } from 'lucide-react' +import { Button } from '@/components/ui/button' +import { RequestedPath } from '@/components/requested-path' + +export const metadata = { + title: '404 – Seite nicht gefunden | Jamulix', + description: 'Diese Seite ist vom Lochkartenstapel gefallen.', + robots: { index: false, follow: true }, +} + +export default function NotFound() { + return ( +
+ {/* Fly.io-style gradient mesh background (dark mode only) */} +
+ + {/* Subtle grid overlay */} +
+ + {/* Logo */} +
+
+ + Jamulix + +
+
+ +
+
+
+ {/* Text Content */} +
+
+ + Fehler 404 · Seite nicht gefunden + + + + +

+ Diese Seite ist vom Lochkartenstapel gefallen. +

+
+ +

+ Seit 50 Jahren Code – und trotzdem verlegt man gelegentlich + etwas. Die gesuchte Seite existiert nicht, nicht mehr oder + noch nicht. Vielleicht war auch nur ein übereifriges{' '} + rm -rf{' '} + am Werk. +

+ +
+ + +
+
+ + {/* Terminal */} +
+
+
+ + + + + jamulix@jamulix.de: ~ + +
+ +
+                  $ cd {'\n'}
+                  
+                    bash: cd: : Datei oder Verzeichnis nicht gefunden
+                  {'\n'}
+                  $ find / -name "seite" 2>/dev/null{'\n'}
+                  $ cat seite.f{'\n'}
+                  C     GESTANZT 1976 – STAPEL LEIDER RUNTERGEFALLEN{'\n'}
+                        GO TO 404{'\n'}
+                  $ sudo !!{'\n'}
+                  
+                    jamulix ist nicht in der sudoers-Datei. Dieser Vorfall wird gemeldet.
+                  {'\n'}
+                  ${' '}
+                  
+                
+
+ +

+ Tipp: Auch nach 50 Jahren hilft ls meistens weiter. +

+
+
+
+
+
+ ) +} diff --git a/components/requested-path.tsx b/components/requested-path.tsx new file mode 100644 index 0000000..9ceb432 --- /dev/null +++ b/components/requested-path.tsx @@ -0,0 +1,19 @@ +'use client' + +import { useEffect, useState } from 'react' + +// Shows the requested URL path; falls back to a placeholder without JS +export function RequestedPath() { + const [path, setPath] = useState('/gesuchte-seite') + + useEffect(() => { + const raw = window.location.pathname + try { + setPath(decodeURI(raw)) + } catch { + setPath(raw) // malformed percent-encoding + } + }, []) + + return {path} +} diff --git a/deploy_to_localhost.sh b/deploy_to_localhost.sh index 205ea51..c8cc3d3 100755 --- a/deploy_to_localhost.sh +++ b/deploy_to_localhost.sh @@ -17,6 +17,10 @@ echo "Setze symbolischen Link: index.html → landingpage/index.html" sudo rm -f /var/www/html/index.html sudo ln -s landingpage/index.html /var/www/html/index.html +echo "Kopiere 404-Seite: landingpage/404.html → 404.html" +sudo cp landingpage/404.html /var/www/html/404.html +sudo chown www-data:www-data /var/www/html/404.html + sudo chown -R www-data:www-data /var/www/html/landingpage/ echo "" diff --git a/deploy_to_production.sh b/deploy_to_production.sh index 522f953..9daad67 100755 --- a/deploy_to_production.sh +++ b/deploy_to_production.sh @@ -30,5 +30,8 @@ rsync -av --delete -e "ssh -S $SSH_SOCKET" landingpage/ "$REMOTE_USER@$REMOTE_HO echo "Setze symbolischen Link: index.html → landingpage/index.html" ssh -S "$SSH_SOCKET" "$REMOTE_USER@$REMOTE_HOST" "rm -f '$REMOTE_DIR/index.html' && ln -s landingpage/index.html '$REMOTE_DIR/index.html'" +echo "Kopiere 404-Seite: landingpage/404.html → 404.html" +ssh -S "$SSH_SOCKET" "$REMOTE_USER@$REMOTE_HOST" "cp '$REMOTE_DIR/landingpage/404.html' '$REMOTE_DIR/404.html'" + echo "" echo "Deployment abgeschlossen: https://jamulix.de"