generated from Seekra/repository-template
Add NotFound.vue #48 #50
Generated
+1
@@ -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
@@ -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',
|
||||||
|
jakob.scheid marked this conversation as resolved
Outdated
|
|||||||
|
component: NotFound
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const router = createRouter({
|
const router = createRouter({
|
||||||
|
jakob.scheid marked this conversation as resolved
Outdated
jakob.scheid
commented
Omit the space at the end of the line. Omit the space at the end of the line.
|
|||||||
|
|||||||
@@ -0,0 +1,32 @@
|
|||||||
|
<template>
|
||||||
|
<div class="not-found">
|
||||||
|
jakob.scheid marked this conversation as resolved
Outdated
jakob.scheid
commented
Do not use a container .search-content in a not found page. Do not use a container *.search-content* in a not found page.
|
|||||||
|
<span class="error-message">
|
||||||
|
jakob.scheid marked this conversation as resolved
Outdated
jakob.scheid
commented
The not found page should be minimal, so omit the header. The navigation bar already contains Seekra. The not found page should be minimal, so omit the header. The navigation bar already contains *Seekra*.
|
|||||||
|
The page you are looking for does not exist. Please check the URL or return to the search page.
|
||||||
|
</span>
|
||||||
|
jakob.scheid marked this conversation as resolved
Outdated
jakob.scheid
commented
No HTTP status code. That is confusing for people who are not familiar with technology. No HTTP status code. That is confusing for people who are not familiar with technology.
|
|||||||
|
<RouterLink to="/" id="link">Back to Search</RouterLink>
|
||||||
|
jakob.scheid marked this conversation as resolved
Outdated
jakob.scheid
commented
Do not write ERROR uppercase. Do not write *ERROR* uppercase.
|
|||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.not-found {
|
||||||
|
text-align: center;
|
||||||
|
padding-top: 80px;
|
||||||
|
display: flex;
|
||||||
|
jakob.scheid marked this conversation as resolved
Outdated
jakob.scheid
commented
Copying styles is a very bad idea. Nothing should be redundant. Copying styles is a very bad idea. Nothing should be redundant.
|
|||||||
|
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>
|
||||||
Reference in New Issue
Block a user
Use camel case (notFound).