Skip to content
This repository has been archived by the owner on Jul 6, 2022. It is now read-only.

Commit

Permalink
feat: 404 page added (#457)
Browse files Browse the repository at this point in the history
  • Loading branch information
sumana2001 authored May 30, 2022
1 parent 009af63 commit 62a43f7
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 0 deletions.
Binary file added src/assets/logo-404.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import VueMatomo from "vue-matomo";
import "./semantic-ui-utils/main.css";
import App from "./App.vue";
import QuestionView from "./views/QuestionView.vue";
import NotFound from './views/NotFound.vue'
import NutritionView from "./views/NutritionView.vue";
import NutritionInteractiveView from "./views/NutritionInteractiveView.vue";
import TableAnnotation from "./views/TableAnnotation.vue";
Expand Down Expand Up @@ -52,6 +53,7 @@ const routes = [
{ path: "/logos/search", component: LogoSearchView },
{ path: "/logos/:id", component: LogoUpdateView },
{ path: "/subsetQuestion", component: SubsetQuestionView },
{ path: '*', name: 'Not Found', component: NotFound}
];

const router = new VueRouter({
Expand Down
40 changes: 40 additions & 0 deletions src/views/NotFound.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<template>
<center>
<img src="~/../assets/logo-404.png" class="logo" />
<h1 class="text-404">
Whoops! The page you're looking for can't be found.
</h1>
<p class="redirect-404">
Want to play some games? <a href="/">Click here</a>
</p>
</center>
</template>

<script>
export default {
name: "NotFound",
};
</script>

<style scoped>
.logo {
width:60%;
height:auto;
}
.text-404 {
font-size: 2em;
margin-top:-2rem;
}
.redirect-404 {
padding-top: 1em;
font-size: 1.2em;
}
.redirect-404 a {
text-decoration: none;
}
@media only screen and (max-width: 767px) {
.logo {
width:100%;
}
}
</style>

0 comments on commit 62a43f7

Please sign in to comment.