diff --git a/src/app/app.routes.ts b/src/app/app.routes.ts index 83f193f3..85cc662d 100644 --- a/src/app/app.routes.ts +++ b/src/app/app.routes.ts @@ -56,7 +56,12 @@ export const routes: Routes = [ }, { path: '', component: HomeComponent, title: 'Computing Science Student Society' }, // 404 will go down there - { path: '**', component: HomeComponent } + { + path: '**', + loadComponent: () => + import('./pages/not-found/not-found.component').then(m => m.NotFoundComponent), + title: makeTitle('Not Found') + } ] as const; const BASE_ROUTES = routes.reduce((acc, route) => { diff --git a/src/app/components/nav-bar/nav-bar.component.scss b/src/app/components/nav-bar/nav-bar.component.scss index 44691a69..c16e5c33 100644 --- a/src/app/components/nav-bar/nav-bar.component.scss +++ b/src/app/components/nav-bar/nav-bar.component.scss @@ -40,7 +40,7 @@ $navbar-w: 20rem; background-color: theme.$bg3; border-right: $border; z-index: 100; - overflow: scroll; + overflow: auto; &__heading { font-size: 1.1rem; diff --git a/src/app/pages/not-found/not-found.component.html b/src/app/pages/not-found/not-found.component.html new file mode 100644 index 00000000..9f479770 --- /dev/null +++ b/src/app/pages/not-found/not-found.component.html @@ -0,0 +1,3 @@ +
The editor could not open the file "{{ this.router.url }}"
diff --git a/src/app/pages/not-found/not-found.component.scss b/src/app/pages/not-found/not-found.component.scss new file mode 100644 index 00000000..d16d0570 --- /dev/null +++ b/src/app/pages/not-found/not-found.component.scss @@ -0,0 +1,12 @@ +:host { + display: flex; + width: 100%; + height: 100%; + justify-content: center; + align-items: center; + flex-direction: column; +} + +fa-icon { + color: hsl(360 64.3% 44.8%); +} diff --git a/src/app/pages/not-found/not-found.component.spec.ts b/src/app/pages/not-found/not-found.component.spec.ts new file mode 100644 index 00000000..5b65d9ea --- /dev/null +++ b/src/app/pages/not-found/not-found.component.spec.ts @@ -0,0 +1,23 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { NotFoundComponent } from './not-found.component'; + +describe('NotFoundComponent', () => { + let component: NotFoundComponent; + let fixture: ComponentFixture