[FEAT] 404 page

This commit is contained in:
2026-01-02 21:35:55 +01:00
parent ce69598175
commit e481a6e897
2 changed files with 32 additions and 0 deletions

View File

@@ -49,6 +49,11 @@ const router = createRouter({
name: 'editor', name: 'editor',
component: () => import('../views/EditorView.vue'), component: () => import('../views/EditorView.vue'),
}, },
{
path: '/:pathMatch(.*)*',
name: 'not-found',
component: () => import('../views/NotFound.vue'),
},
], ],
scrollBehavior(to, from, savedPosition) { scrollBehavior(to, from, savedPosition) {
if (savedPosition) { if (savedPosition) {

27
src/views/NotFound.vue Normal file
View File

@@ -0,0 +1,27 @@
<template>
<div class="flex flex-col items-center justify-center min-h-[60vh] text-center px-4">
<div class="mb-8 relative">
<div class="text-9xl font-black text-gray-200 dark:text-gray-800 select-none">404</div>
<div class="absolute inset-0 flex items-center justify-center">
<div class="text-6xl">👻</div>
</div>
</div>
<h1 class="text-3xl font-bold text-gray-900 dark:text-gray-100 mb-4">Page not found</h1>
<p class="text-lg text-gray-600 dark:text-gray-400 max-w-md mb-8">
Oops! The page you're looking for doesn't exist or has been moved.
</p>
<router-link
to="/"
class="px-6 py-3 bg-indigo-600 hover:bg-indigo-700 text-white font-medium rounded-xl transition-all shadow-lg hover:shadow-indigo-500/30 flex items-center gap-2"
>
<i class="fas fa-home"></i>
<span>Go home</span>
</router-link>
</div>
</template>
<script setup lang="ts">
// No script logic needed for this simple view
</script>