feat: add not found component (#327)

Fixes #110
This commit is contained in:
Jonathan Xu
2018-11-18 14:46:43 +05:30
committed by Abhay Chawla
parent dffce8a5e0
commit 2feee9d8a2
9 changed files with 197 additions and 51 deletions
@@ -0,0 +1,5 @@
<div id="particles-js"></div>
<div class="text">
<h1 id="title">404</h1>
<p id="subtitle">Something went wrong.</p>
</div>
@@ -0,0 +1,28 @@
#particles-js {
position: absolute;
width: 100%;
height: 100%;
background: cornflowerblue;
}
.text {
position: absolute;
top: 50%;
right: 50%;
transform: translate(50%,-50%);
max-width: 90%;
padding: 2em 3em;
color: white;
font-family: 'Raleway', sans-serif;
display: flex;
flex-direction: column;
align-items: center;
}
#title {
font-size: 120pt;
}
#subtitle {
font-size: 12pt;
}
@@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { NotFoundComponent } from './not-found.component';
describe('NotFoundComponent', () => {
let component: NotFoundComponent;
let fixture: ComponentFixture<NotFoundComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ NotFoundComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(NotFoundComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
+17
View File
@@ -0,0 +1,17 @@
import { Component, OnInit } from '@angular/core';
declare var particlesJS: any;
@Component({
selector: 'mifosx-not-found',
templateUrl: './not-found.component.html',
styleUrls: ['./not-found.component.scss']
})
export class NotFoundComponent implements OnInit {
constructor() { }
ngOnInit() {
particlesJS.load('particles-js', '/assets/particles.json');
}
}