diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index aab32fe..4d3e9cf 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -28,6 +28,7 @@ import { EngagementsComponent } from './pages/tables/engagements/engagements.com import { BikeEventsComponent } from './pages/tables/bike-events/bike-events.component'; import { BikeEventComponent } from './pages/dataPages/bike-event/bike-event.component'; import { BikeEventTypesComponent } from './pages/tables/bike-event-types/bike-event-types.component'; +import { PageNotFoundComponent } from './pages/page-not-found/page-not-found.component'; const routes: Routes = [ { path: 'login', component: LoginComponent }, @@ -60,7 +61,7 @@ const routes: Routes = [ { path: 'table/workshopTypes', component: WorkshopTypesComponent, canActivate: [AuthGuard] }, { path: '', redirectTo: 'tableOverview', pathMatch: 'full' }, { path: 'table', redirectTo: 'tableOverview', pathMatch: 'full' }, - { path: '**', redirectTo: 'tableOverview' }, + { path: '**', component: PageNotFoundComponent }, ]; @NgModule({ diff --git a/src/app/app.module.ts b/src/app/app.module.ts index df05f0b..d265ddf 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -91,6 +91,7 @@ import {FormSelectSearchComponent} from './components/from-select-search/form-se import {DeleteDialogComponent} from './components/dialogs/delete/delete.dialog.component'; import {AddDialogComponent} from './components/dialogs/add/add.dialog.component'; import {EditDialogComponent} from './components/dialogs/edit/edit.dialog.component'; +import { PageNotFoundComponent } from './pages/page-not-found/page-not-found.component'; @NgModule({ @@ -141,6 +142,7 @@ import {EditDialogComponent} from './components/dialogs/edit/edit.dialog.compone BikeEventTypesComponent, WorkshopTypesComponent, FilterRowComponent, + PageNotFoundComponent, ], imports: [ BrowserModule, diff --git a/src/app/pages/page-not-found/page-not-found.component.html b/src/app/pages/page-not-found/page-not-found.component.html new file mode 100644 index 0000000..428490d --- /dev/null +++ b/src/app/pages/page-not-found/page-not-found.component.html @@ -0,0 +1,10 @@ +
+
+

404 Die angeforderte Seite konnte nicht gefunden werden.

+
+ Zur Seitenübersicht +
+
+ +
+
diff --git a/src/app/pages/page-not-found/page-not-found.component.scss b/src/app/pages/page-not-found/page-not-found.component.scss new file mode 100644 index 0000000..a0b7689 --- /dev/null +++ b/src/app/pages/page-not-found/page-not-found.component.scss @@ -0,0 +1,32 @@ +.page-wrapper { + height: 100%; + width: 100%; + overflow: hidden; + display: flex; + align-items: center; + flex-direction: column; + .text-box { + flex: none; + margin: 1em; + } + .img-box { + flex: 1; + display: flex; + align-items: center; + img { + align-self: center; + animation-name: translate; // Name der Animation + animation-duration: 10s; // Dauer der Animation + animation-iteration-count: 1; // Anzahl der Wiederholungen + } + } +} + +@keyframes translate { + 0% { + transform: translate(200vh, -25vh); + } + 100% { + transform: translateX(0px); + } +} diff --git a/src/app/pages/page-not-found/page-not-found.component.spec.ts b/src/app/pages/page-not-found/page-not-found.component.spec.ts new file mode 100644 index 0000000..697a946 --- /dev/null +++ b/src/app/pages/page-not-found/page-not-found.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { PageNotFoundComponent } from './page-not-found.component'; + +describe('PageNotFoundComponent', () => { + let component: PageNotFoundComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ PageNotFoundComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(PageNotFoundComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/pages/page-not-found/page-not-found.component.ts b/src/app/pages/page-not-found/page-not-found.component.ts new file mode 100644 index 0000000..5faa15b --- /dev/null +++ b/src/app/pages/page-not-found/page-not-found.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-page-not-found', + templateUrl: './page-not-found.component.html', + styleUrls: ['./page-not-found.component.scss'] +}) +export class PageNotFoundComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/assets/404.png b/src/assets/404.png new file mode 100644 index 0000000..54ea452 Binary files /dev/null and b/src/assets/404.png differ