Added paths and some standard code used in different projects
This commit is contained in:
committed by
Erik Tiekstra
parent
e2114e79b9
commit
03ba526798
@@ -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>
|
||||
@@ -0,0 +1,4 @@
|
||||
.page-not-found {
|
||||
text-align: center;
|
||||
padding: 5rem;
|
||||
}
|
||||
@@ -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();
|
||||
});
|
||||
});
|
||||
@@ -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 {}
|
||||
@@ -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 {}
|
||||
@@ -0,0 +1,3 @@
|
||||
<digi-ng-typography-base>
|
||||
<section class="start">Start funkar!</section>
|
||||
</digi-ng-typography-base>
|
||||
@@ -0,0 +1,101 @@
|
||||
@import 'variables/breakpoints';
|
||||
@import 'variables/colors';
|
||||
@import 'variables/gutters';
|
||||
@import 'variables/typography';
|
||||
@import 'mixins/ie11';
|
||||
@import 'mixins/typography';
|
||||
|
||||
.start {
|
||||
&__header {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
margin: $af__gutter-goliath 0;
|
||||
}
|
||||
|
||||
&__heading {
|
||||
position: absolute;
|
||||
margin: 0;
|
||||
bottom: $af__gutter-xxl;
|
||||
left: -$af__gutter-m;
|
||||
background-color: $af__color-primary;
|
||||
color: $af__color-text-light;
|
||||
padding: $af__gutter-m $af__gutter-xxl;
|
||||
}
|
||||
|
||||
&__intro {
|
||||
max-width: 700px;
|
||||
}
|
||||
|
||||
&__subheading {
|
||||
font-size: $af__font-size-h1 !important;
|
||||
margin: $af__gutter-xxl 0 !important;
|
||||
@include dafa__typography-ornament;
|
||||
}
|
||||
|
||||
&__background-image {
|
||||
width: 100%;
|
||||
height: 200px;
|
||||
object-fit: cover;
|
||||
object-position: center 33%;
|
||||
|
||||
@media (min-width: $af__breakpoint-m) {
|
||||
height: 250px;
|
||||
}
|
||||
|
||||
@media (min-width: $af__breakpoint-l) {
|
||||
height: 290px;
|
||||
}
|
||||
|
||||
@media (min-width: $af__breakpoint-xl) {
|
||||
height: 320px;
|
||||
}
|
||||
}
|
||||
|
||||
&__cta-wrapper {
|
||||
background-color: $af__color-background-alt-tertiary;
|
||||
margin: $af__gutter-xxl 0;
|
||||
padding: $af__gutter-xxl;
|
||||
}
|
||||
|
||||
&__cta {
|
||||
display: flex;
|
||||
gap: $af__gutter-xl;
|
||||
}
|
||||
|
||||
&__puff {
|
||||
width: calc(100% / 3);
|
||||
|
||||
@include ie11 {
|
||||
&:not(:first-child) {
|
||||
margin-left: $af__gutter-xl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&__footer {
|
||||
margin-top: $af__gutter-goliath;
|
||||
background-color: $af__color-background-light-gray;
|
||||
padding: $af__gutter-xxl 0 $af__gutter-goliath;
|
||||
}
|
||||
|
||||
&__footer-heading {
|
||||
margin-top: 0 !important;
|
||||
margin-bottom: $af__gutter-l !important;
|
||||
}
|
||||
|
||||
&__card-wrapper {
|
||||
display: flex;
|
||||
align-content: stretch;
|
||||
gap: $af__gutter-xxl;
|
||||
}
|
||||
|
||||
&__card {
|
||||
max-width: 400px;
|
||||
flex-basis: 100%;
|
||||
}
|
||||
|
||||
&__card-link {
|
||||
display: inline-block;
|
||||
margin-top: $af__gutter-l;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||
import { StartComponent } from './start.component';
|
||||
|
||||
describe('StartComponent', () => {
|
||||
let component: StartComponent;
|
||||
let fixture: ComponentFixture<StartComponent>;
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [StartComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(StartComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,11 @@
|
||||
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'dafa-start',
|
||||
templateUrl: './start.component.html',
|
||||
styleUrls: ['./start.component.scss'],
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
})
|
||||
export class StartComponent {
|
||||
constructor() {}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
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 { StartComponent } from './start.component';
|
||||
|
||||
@NgModule({
|
||||
declarations: [StartComponent],
|
||||
imports: [CommonModule, RouterModule.forChild([{ path: '', component: StartComponent }]), DigiNgTypographyBaseModule],
|
||||
})
|
||||
export class StartModule {}
|
||||
Reference in New Issue
Block a user