Commit cee31ad8 authored by earndt's avatar earndt

[W8D2] (ArndtED) Adds images to country components

parent 17e629ba
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { AccountComponent } from './account.component';
describe('AccountComponent', () => {
let component: AccountComponent;
let fixture: ComponentFixture<AccountComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ AccountComponent ]
})
.compileComponents();
});
beforeEach(() => {
fixture = TestBed.createComponent(AccountComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-account',
templateUrl: './account.component.html',
styleUrls: ['./account.component.css']
})
export class AccountComponent implements OnInit {
constructor() { }
ngOnInit(): void {
}
}
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { AccountComponent } from './account/account.component';
import { EnglandComponent } from './england/england.component';
import { FranceComponent } from './france/france.component';
import { GreeceComponent } from './greece/greece.component';
import { SpainComponent } from './spain/spain.component';
const routes: Routes = [];
const routes: Routes = [
{path:'england', component: EnglandComponent},
{path:'france', component: FranceComponent},
{path:'spain', component: SpainComponent},
{path:'greece', component: GreeceComponent},
{path:'account', component: AccountComponent}
];
@NgModule({
imports: [RouterModule.forRoot(routes)],
......
.dynamic-container{
margin-top: 35px;
height: calc(100vh-70px);
overflow-y: auto;
overflow-x: hidden;
padding: 50px 20px 20px 50px;
}
\ No newline at end of file
<router-outlet></router-outlet>
<header></header>
<div class='content' role='main'>
<div class='dynamic-container col-md-10 col-xl-10'>
<router-outlet></router-outlet>
</div>
</div>
<footer></footer>
import { NgModule } from '@angular/core';
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
import { BrowserModule } from '@angular/platform-browser';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { HeaderComponent } from './header/header.component';
import { FooterComponent } from './footer/footer.component';
import { EnglandComponent } from './england/england.component';
import { FranceComponent } from './france/france.component';
import { SpainComponent } from './spain/spain.component';
import { GreeceComponent } from './greece/greece.component';
import { AccountComponent } from './account/account.component';
@NgModule({
declarations: [
AppComponent
AppComponent,
HeaderComponent,
FooterComponent,
EnglandComponent,
FranceComponent,
SpainComponent,
GreeceComponent,
AccountComponent
],
imports: [
BrowserModule,
AppRoutingModule
AppRoutingModule,
NgbModule,
],
providers: [],
bootstrap: [AppComponent]
......
.img{
height: 350px;
width: 350px;
padding-left: 5px;
}
<div class='imgContainer' >
<img class='img' src='/assets/images/england/england-bridge.jpg' />
<img class='img' src='/assets/images/england/england-parliament.jpg' />
<img class='img' src='/assets/images/england/england-stonehedge.jpg' />
</div>
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { EnglandComponent } from './england.component';
describe('EnglandComponent', () => {
let component: EnglandComponent;
let fixture: ComponentFixture<EnglandComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ EnglandComponent ]
})
.compileComponents();
});
beforeEach(() => {
fixture = TestBed.createComponent(EnglandComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-england',
templateUrl: './england.component.html',
styleUrls: ['./england.component.css']
})
export class EnglandComponent implements OnInit {
constructor() { }
ngOnInit(): void {
}
}
.footer{
height: 5rem;
background: #6fb7f1;
bottom: 0;
right: 0;
left: 0;
position:fixed;
}
ul {
font-family: Arial, Verdana;
font-size: 14px;
margin: 0 auto;
padding: 0;
margin-top: 20px;
/* width:600px; */
list-style: none;
}
ul li {
display: block;
position: relative;
float: left;
padding-left: 20px;;
}
\ No newline at end of file
<div class='footer'>
<ul>
<li>About Us</li>
<li>Careers</li>
<li>Contact Us</li>
</ul>
</div>
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { FooterComponent } from './footer.component';
describe('FooterComponent', () => {
let component: FooterComponent;
let fixture: ComponentFixture<FooterComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ FooterComponent ]
})
.compileComponents();
});
beforeEach(() => {
fixture = TestBed.createComponent(FooterComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'footer',
templateUrl: './footer.component.html',
styleUrls: ['./footer.component.css']
})
export class FooterComponent implements OnInit {
constructor() { }
ngOnInit(): void {
}
}
.img{
height: 350px;
width: 350px;
padding-left: 5px;
}
\ No newline at end of file
<div class='imgContainer' >
<img class='img' src='/assets/images/france/france-cafe.jpg' />
<img class='img' src='/assets/images/france/france-tower.jpg' />
<img class='img' src='/assets/images/france/france-town.jpg' />
</div>
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { FranceComponent } from './france.component';
describe('FranceComponent', () => {
let component: FranceComponent;
let fixture: ComponentFixture<FranceComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ FranceComponent ]
})
.compileComponents();
});
beforeEach(() => {
fixture = TestBed.createComponent(FranceComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-france',
templateUrl: './france.component.html',
styleUrls: ['./france.component.css']
})
export class FranceComponent implements OnInit {
constructor() { }
ngOnInit(): void {
}
}
.img{
height: 350px;
width: 350px;
padding-left: 5px;
}
\ No newline at end of file
<div class='imgContainer' >
<img class='img' src='/assets/images/greece/greece-beach.jpg' />
<img class='img' src='/assets/images/greece/greece-santorini.jpg' />
<img class='img' src='/assets/images/greece/greece-steps.jpg' />
</div>
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { GreeceComponent } from './greece.component';
describe('GreeceComponent', () => {
let component: GreeceComponent;
let fixture: ComponentFixture<GreeceComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ GreeceComponent ]
})
.compileComponents();
});
beforeEach(() => {
fixture = TestBed.createComponent(GreeceComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-greece',
templateUrl: './greece.component.html',
styleUrls: ['./greece.component.css']
})
export class GreeceComponent implements OnInit {
constructor() { }
ngOnInit(): void {
}
}
.header{
background: #6fb7f1;
height: 4em;
position: fixed;
top: 0;
right: 0;
left: 0;
}
.btn{
margin-top: 30px;
margin-left: 10px
}
.btnMenu{
margin-top:20px;
margin-left: 20px;
display:inline-block;
}
.account{
position:absolute;
right:10px;
margin-top: 30px;
}
\ No newline at end of file
<div class='header'>
<div class='btnMenu'>
<button [routerLink]="['/england']">England</button>
<button [routerLink]="['/france']">France</button>
<button [routerLink]="['/greece']">Greece</button>
<button [routerLink]="['/spain']">Spain</button>
</div>
<span class='account'>
<i class="fa fa-user" [routerLink]="['/account']"></i>
</span>
</div>
\ No newline at end of file
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { HeaderComponent } from './header.component';
describe('HeaderComponent', () => {
let component: HeaderComponent;
let fixture: ComponentFixture<HeaderComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ HeaderComponent ]
})
.compileComponents();
});
beforeEach(() => {
fixture = TestBed.createComponent(HeaderComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'header',
templateUrl: './header.component.html',
styleUrls: ['./header.component.css']
})
export class HeaderComponent implements OnInit {
constructor() { }
ngOnInit(): void {
}
}
.img{
height: 350px;
width: 350px;
padding-left: 5px;
}
\ No newline at end of file
<div class='imgContainer' >
<img class='img' src='/assets/images/spain/spain-barcelona.jpg' />
<img class='img' src='/assets/images/spain/spain-cathedral.jpg' />
<img class='img' src='/assets/images/spain/spain-dance.jpg' />
</div>
\ No newline at end of file
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { SpainComponent } from './spain.component';
describe('SpainComponent', () => {
let component: SpainComponent;
let fixture: ComponentFixture<SpainComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ SpainComponent ]
})
.compileComponents();
});
beforeEach(() => {
fixture = TestBed.createComponent(SpainComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-spain',
templateUrl: './spain.component.html',
styleUrls: ['./spain.component.css']
})
export class SpainComponent implements OnInit {
constructor() { }
ngOnInit(): void {
}
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment