-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- move landing info to LandingComponent - add PageNotFoundComponent for 404's - update unit tests - degrade zone.js version to resolve unit test errors: angular/zone.js#832 - alphabetize styles
- Loading branch information
Showing
16 changed files
with
180 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,11 @@ | ||
<div class="ak"> | ||
<div class="ak-landing-content"> | ||
<h1>Hello, I'm Anna</h1> | ||
</div> | ||
|
||
<!-- navigation --> | ||
<ak-nav class="ak-nav"></ak-nav> | ||
|
||
<!-- pages --> | ||
<section class="ak-pages"> | ||
<ak-about></ak-about> | ||
<ak-work></ak-work> | ||
<ak-contact></ak-contact> | ||
</section> | ||
<div class="ak-page"> | ||
<router-outlet></router-outlet> | ||
</div> | ||
|
||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,15 @@ | ||
@import '~styles.scss'; | ||
|
||
|
||
.ak { | ||
display: flex; | ||
flex-direction: row-reverse; | ||
justify-content: space-between; | ||
align-items: center; | ||
display: flex; | ||
height: 100%; | ||
justify-content: space-between; | ||
} | ||
|
||
.ak-landing-content { | ||
display: flex; | ||
justify-content: center; | ||
.ak-page { | ||
align-items: center; | ||
display: flex; | ||
flex-grow: 3; | ||
} | ||
|
||
.ak-pages { | ||
display: none; | ||
justify-content: center; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<h1>Hello, I'm Anna Kutch</h1> |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { LandingComponent } from './landing.component'; | ||
|
||
describe('LandingComponent', () => { | ||
let component: LandingComponent; | ||
let fixture: ComponentFixture<LandingComponent>; | ||
|
||
beforeEach(async(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [ LandingComponent ] | ||
}) | ||
.compileComponents(); | ||
})); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(LandingComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should be created', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
|
||
it('should render title in a h1 tag', async(() => { | ||
const fixture = TestBed.createComponent(LandingComponent); | ||
fixture.detectChanges(); | ||
const compiled = fixture.debugElement.nativeElement; | ||
expect(compiled.querySelector('h1').textContent).toContain("Hello, I'm Anna"); | ||
})); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'ak-landing', | ||
templateUrl: './landing.component.html', | ||
styleUrls: ['./landing.component.scss'] | ||
}) | ||
export class LandingComponent implements OnInit { | ||
|
||
constructor() { } | ||
|
||
ngOnInit() { | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
<nav> | ||
<ul class="ak-nav-items"> | ||
<li class="ak-nav-item">About</li> | ||
<li routerLink="home" class="ak-nav-item">Home</li> | ||
<li class="ak-nav-line"></li> | ||
<li class="ak-nav-item">Work</li> | ||
<li routerLink="about" class="ak-nav-item">About</li> | ||
<li class="ak-nav-line"></li> | ||
<li class="ak-nav-item">Contact</li> | ||
<li routerLink="work" class="ak-nav-item">Work</li> | ||
<li class="ak-nav-line"></li> | ||
<li routerLink="contact" class="ak-nav-item">Contact</li> | ||
<li class="ak-nav-line"></li> | ||
</ul> | ||
</nav> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<p> | ||
Uh oh! Page not found! | ||
</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
@import '~styles.scss'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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<PageNotFoundComponent>; | ||
|
||
beforeEach(async(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [ PageNotFoundComponent ] | ||
}) | ||
.compileComponents(); | ||
})); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(PageNotFoundComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should be created', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'ak-page-not-found', | ||
templateUrl: './page-not-found.component.html', | ||
styleUrls: ['./page-not-found.component.scss'] | ||
}) | ||
export class PageNotFoundComponent implements OnInit { | ||
|
||
constructor() { } | ||
|
||
ngOnInit() { | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { Routes, RouterModule } from '@angular/router'; | ||
|
||
import { LandingComponent } from '../landing/landing.component'; | ||
import { AboutComponent } from '../about/about.component'; | ||
import { WorkComponent } from '../work/work.component'; | ||
import { ContactComponent } from '../contact/contact.component'; | ||
import { PageNotFoundComponent } from '../page-not-found/page-not-found.component'; | ||
|
||
const routes: Routes = [ | ||
{ | ||
path: 'about', | ||
component: AboutComponent | ||
}, | ||
{ | ||
path: 'work', | ||
component: WorkComponent | ||
}, | ||
{ | ||
path: 'contact', | ||
component: ContactComponent | ||
}, | ||
{ | ||
path: 'home', | ||
component: LandingComponent | ||
}, | ||
{ | ||
path: '', | ||
redirectTo: '/home', | ||
pathMatch: 'full' | ||
}, | ||
{ | ||
path: '**', | ||
component: PageNotFoundComponent | ||
} | ||
]; | ||
|
||
@NgModule({ | ||
imports: [RouterModule.forRoot(routes)], | ||
exports: [RouterModule] | ||
}) | ||
|
||
export class RoutingModule { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,3 +13,7 @@ h1 { | |
font-weight: normal; | ||
margin: 0; | ||
} | ||
|
||
li { | ||
outline: none; | ||
} |