Skip to content

Commit

Permalink
ATL-10: Add catch-all 404 route/page
Browse files Browse the repository at this point in the history
  • Loading branch information
Cesar Villalobos committed Mar 14, 2023
1 parent ae15fcb commit 6fa43bf
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 6 deletions.
4 changes: 4 additions & 0 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@
<script lang="ts" setup>
//
</script>

<style>
@import '@/styles/hartsfield-global.scss'
</style>
13 changes: 12 additions & 1 deletion src/router.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { createRouter, createWebHistory } from 'vue-router'
import DefaultVue from '@/layouts/default/Default.vue'
import Home from '@/views/Home.vue'
import Login from '@/views/Login.vue'
import NotFound from '@/views/NotFound.vue'


const routes = [
Expand All @@ -15,6 +15,17 @@ const routes = [
component: Home,
},
],
},
{
path: '/',
component: DefaultVue,
children: [
{
path: '/:pathMatch(.*)*',
name: 'NotFound',
component: NotFound,
},
],
}
]

Expand Down
3 changes: 3 additions & 0 deletions src/styles/hartsfield-global.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.frosted {
background-color: #6d8cb4c3!important;
}
6 changes: 1 addition & 5 deletions src/views/Login.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<v-container class="fill-height" style="">
<v-container class="fill-height">
<v-responsive class="d-flex align-center text-center fill-height ">
<v-sheet
border
Expand Down Expand Up @@ -45,8 +45,4 @@
.accent-border {
border: 1px solid #083c7c !important;
}
.frosted {
background-color: #6d8cb4c3!important;
}
</style>
29 changes: 29 additions & 0 deletions src/views/NotFound.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<template>
<v-container class="fill-height">
<v-responsive class="d-flex align-center text-center fill-height ">
<v-sheet
border
rounded
:height="300"
:width="800"
class="frosted px-8 py-6 accent-border accent-text mx-auto "
>
<p class="mt-3 text-h1">404</p>

<p class="mt-8 text-h5 font-weight-light" >
Page not found
</p>

<div class="mt-8">
<router-link to="/" class="font-weight-light">Go back to the home page</router-link>
</div>
</v-sheet>
</v-responsive>
</v-container>
</template>

<script lang="ts">
export default {
name: 'NotFound'
}
</script>

0 comments on commit 6fa43bf

Please sign in to comment.