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 () {
89
89
this . route ( 'module' , { path : '/modules/:module' } ) ;
90
90
this . route ( 'data-class' , { path : '/data/classes/:class' } ) ;
91
91
this . route ( 'data-module' , { path : '/data/modules/:module' } ) ;
92
+ this . route ( 'not-found' , { path : '/*' } ) ;
92
93
} ) ;
93
94
94
95
/*
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 {
109
109
fill : var (--color-brand );
110
110
}
111
111
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
+
112
124
@media (min-width : 845px ) {
113
125
.es-header {
114
126
padding : 0 var (--spacing-4 );
@@ -124,3 +136,14 @@ a.class-field-description--link:hover svg {
124
136
margin-top : var (--spacing-4 );
125
137
}
126
138
}
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