File tree Expand file tree Collapse file tree 6 files changed +58
-0
lines changed
Expand file tree Collapse file tree 6 files changed +58
-0
lines changed Original file line number Diff line number Diff line change @@ -89,6 +89,7 @@ AppRouter.map(function () {
8989 this . route ( 'module' , { path : '/modules/:module' } ) ;
9090 this . route ( 'data-class' , { path : '/data/classes/:class' } ) ;
9191 this . route ( 'data-module' , { path : '/data/modules/:module' } ) ;
92+ this . route ( 'not-found' , { path : '/*' } ) ;
9293} ) ;
9394
9495/*
Original file line number Diff line number Diff line change 1+ import Route from '@ember/routing/route' ;
2+ import { inject as service } from '@ember/service' ;
3+
4+ export default class NotFoundRoute extends Route {
5+ @service fastboot ;
6+
7+ beforeModel ( ) {
8+ if ( ! this . fastboot . isFastBoot ) {
9+ return ;
10+ }
11+
12+ this . fastboot . response . statusCode = 404 ;
13+ }
14+ }
Original file line number Diff line number Diff line change @@ -109,6 +109,18 @@ a.class-field-description--link:hover svg {
109109 fill : var (--color-brand );
110110}
111111
112+ .whoops {
113+ display : flex;
114+ flex-direction : column;
115+ justify-content : center;
116+ align-items : center;
117+ }
118+
119+ .whoops img {
120+ width : 40% ;
121+ margin : var (--spacing-2 );
122+ }
123+
112124@media (min-width : 845px ) {
113125 .es-header {
114126 padding : 0 var (--spacing-4 );
@@ -124,3 +136,14 @@ a.class-field-description--link:hover svg {
124136 margin-top : var (--spacing-4 );
125137 }
126138}
139+
140+ @media (max-width : 450px ) {
141+ .whoops img {
142+ width : 80% ;
143+ margin : var (--spacing-4 );
144+ }
145+
146+ .whoops__message {
147+ margin : var (--spacing-4 );
148+ }
149+ }
Original file line number Diff line number Diff line change 1+ <article class =" whoops" >
2+ <img src =" /assets/images/stinky-fish.png" alt =" tomster stinky fish" />
3+ <h2 class =" whoops__title" >Ack! 404 friend, you're in the wrong place</h2 >
4+ <div class =" whoops__message" >
5+ <span >
6+ <LinkTo @route =' index' >Click here to go home</LinkTo >
7+ </span >
8+ </div >
9+ </article >
Original file line number Diff line number Diff line change 1+ import { module , test } from 'qunit' ;
2+ import { setupTest } from 'ember-qunit' ;
3+
4+ module ( 'Unit | Route | not-found' , function ( hooks ) {
5+ setupTest ( hooks ) ;
6+
7+ test ( 'it exists' , function ( assert ) {
8+ let route = this . owner . lookup ( 'route:not-found' ) ;
9+ assert . ok ( route ) ;
10+ } ) ;
11+ } ) ;
You can’t perform that action at this time.
0 commit comments