Add NotFound.vue #48 #50

Merged
jakob.scheid merged 22 commits from feature/not-found-page into main 2026-05-14 16:21:30 +02:00
3 changed files with 40 additions and 1 deletions
+1
View File
@@ -2060,6 +2060,7 @@
"resolved": "https://registry.npmjs.org/vite-plugin-html/-/vite-plugin-html-3.2.2.tgz", "resolved": "https://registry.npmjs.org/vite-plugin-html/-/vite-plugin-html-3.2.2.tgz",
"integrity": "sha512-vb9C9kcdzcIo/Oc3CLZVS03dL5pDlOFuhGlZYDCJ840BhWl/0nGeZWf3Qy7NlOayscY4Cm/QRgULCQkEZige5Q==", "integrity": "sha512-vb9C9kcdzcIo/Oc3CLZVS03dL5pDlOFuhGlZYDCJ840BhWl/0nGeZWf3Qy7NlOayscY4Cm/QRgULCQkEZige5Q==",
"dev": true, "dev": true,
"license": "MIT",
"dependencies": { "dependencies": {
"@rollup/pluginutils": "^4.2.0", "@rollup/pluginutils": "^4.2.0",
"colorette": "^2.0.16", "colorette": "^2.0.16",
+7 -1
View File
@@ -18,6 +18,7 @@ import { createRouter, createWebHistory } from 'vue-router';
import SearchView from '../views/SearchView.vue'; import SearchView from '../views/SearchView.vue';
import SearchResultsView from '@/features/search/views/SearchResultsView.vue'; import SearchResultsView from '@/features/search/views/SearchResultsView.vue';
import NotFound from '../views/NotFound.vue';
const routes = [ const routes = [
{ {
@@ -35,7 +36,12 @@ const routes = [
meta: { meta: {
title: (route) => route.query.q title: (route) => route.query.q
} }
} },
{
path: '/:pathMatch(.*)*',
name: 'notFound',
component: NotFound
},
]; ];
const router = createRouter({ const router = createRouter({
+32
View File
@@ -0,0 +1,32 @@
<template>
<div class="not-found">
<span class="error-message">
The page you are looking for does not exist. Please check the URL or return to the search page.
</span>
<RouterLink to="/" id="link">Back to Search</RouterLink>
</div>
</template>
<style scoped>
.not-found {
text-align: center;
padding-top: 80px;
display: flex;
flex-direction: column;
align-items: center;
gap: 12px;
}
.error-message{
margin: 0;
font-weight: 600;
font-size: 2vw;
}
#link {
align-items: center;
display: flex;
justify-content: center;
margin-top: 20px;
padding: 10px 20px;
text-decoration: none;
}
</style>