Added paths and some standard code used in different projects

This commit is contained in:
Erik Tiekstra
2021-03-16 15:37:48 +01:00
committed by Erik Tiekstra
parent e2114e79b9
commit 03ba526798
72 changed files with 1109 additions and 282 deletions

View File

@@ -0,0 +1,10 @@
<digi-ng-typography-base [afCompressed]="true">
<section class="page-not-found">
<h1 class="heading">Oj då! Vi kan inte hitta sidan.</h1>
<p>Det kan bero på att länken du använder är felaktig eller att sidan inte längre finns.</p>
<a class="dafa__link dafa__link--with-icon" routerLink="/">
<digi-ng-icon-arrow-left class="dafa__digi-ng-icon" aria-hidden="true"></digi-ng-icon-arrow-left>
Gå tillbaka till startsidan
</a>
</section>
</digi-ng-typography-base>

View File

@@ -0,0 +1,4 @@
.page-not-found {
text-align: center;
padding: 5rem;
}

View File

@@ -0,0 +1,25 @@
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { PageNotFoundComponent } from './page-not-found.component';
describe('PageNotFoundComponent', () => {
let component: PageNotFoundComponent;
let fixture: ComponentFixture<PageNotFoundComponent>;
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ PageNotFoundComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(PageNotFoundComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@@ -0,0 +1,9 @@
import { ChangeDetectionStrategy, Component } from '@angular/core';
@Component({
selector: 'dafa-page-not-found',
templateUrl: './page-not-found.component.html',
styleUrls: ['./page-not-found.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class PageNotFoundComponent {}

View File

@@ -0,0 +1,17 @@
import { DigiNgIconArrowLeftModule } from '@af/digi-ng/_icon/icon-arrow-left';
import { DigiNgTypographyBaseModule } from '@af/digi-ng/_typography/typography-base';
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import { PageNotFoundComponent } from './page-not-found.component';
@NgModule({
declarations: [PageNotFoundComponent],
imports: [
CommonModule,
RouterModule.forChild([{ path: '', component: PageNotFoundComponent }]),
DigiNgTypographyBaseModule,
DigiNgIconArrowLeftModule,
],
})
export class PageNotFoundModule {}