From 4c9bca0c1c9bb0c085f1b1601d34afde94a055ce Mon Sep 17 00:00:00 2001 From: Albert Suarez Date: Mon, 10 Jun 2019 14:15:15 +0200 Subject: [PATCH] :sparkles: Added contact page --- web/src/app/app-routing.module.ts | 2 ++ web/src/app/app.module.ts | 4 ++- web/src/app/contact/contact.component.html | 8 ++++++ web/src/app/contact/contact.component.scss | 8 ++++++ web/src/app/contact/contact.component.spec.ts | 25 +++++++++++++++++ web/src/app/contact/contact.component.ts | 27 +++++++++++++++++++ web/src/app/header/header.component.html | 2 +- web/src/app/header/header.component.ts | 2 -- 8 files changed, 74 insertions(+), 4 deletions(-) create mode 100644 web/src/app/contact/contact.component.html create mode 100644 web/src/app/contact/contact.component.scss create mode 100644 web/src/app/contact/contact.component.spec.ts create mode 100644 web/src/app/contact/contact.component.ts diff --git a/web/src/app/app-routing.module.ts b/web/src/app/app-routing.module.ts index 5bc478a..cb9f83d 100644 --- a/web/src/app/app-routing.module.ts +++ b/web/src/app/app-routing.module.ts @@ -5,12 +5,14 @@ import { PlayComponent } from './play/play.component'; import { ErrorComponent } from './error/error.component'; import { ProjectComponent } from './project/project.component'; import { TeamComponent } from './team/team.component'; +import { ContactComponent } from './contact/contact.component'; const routes: Routes = [ { path: '', component: HomeComponent }, { path: 'play', component: PlayComponent }, { path: 'project', component: ProjectComponent }, { path: 'team', component: TeamComponent }, + { path: 'contact', component: ContactComponent }, { path: '**', component: ErrorComponent } ]; diff --git a/web/src/app/app.module.ts b/web/src/app/app.module.ts index 832cbe5..6699ac8 100644 --- a/web/src/app/app.module.ts +++ b/web/src/app/app.module.ts @@ -13,6 +13,7 @@ import { HeaderComponent } from './header/header.component'; import { ProjectComponent } from './project/project.component'; import { TeamComponent } from './team/team.component'; import { FooterComponent } from './footer/footer.component'; +import { ContactComponent } from './contact/contact.component'; @NgModule({ declarations: [ @@ -23,7 +24,8 @@ import { FooterComponent } from './footer/footer.component'; HeaderComponent, ProjectComponent, TeamComponent, - FooterComponent + FooterComponent, + ContactComponent ], imports: [ BrowserModule, diff --git a/web/src/app/contact/contact.component.html b/web/src/app/contact/contact.component.html new file mode 100644 index 0000000..084e7b6 --- /dev/null +++ b/web/src/app/contact/contact.component.html @@ -0,0 +1,8 @@ + + +
+

Queremos conocer tu opinión de ​Mia: Un cortometraje interactivo​. Cuéntanos tu experiencia interactiva para que podamos publicarla en nuestras redes sociales. Tenemos cuenta en Instagram.

+

Para más información, no dudes en contactarnos en nuestra dirección de correo electrónico. Allí resolveremos cualquier duda que tengas sobre el cotrometraje o el proyecto interactivo en sí mismo. Y recuerda, tu opinión nos importa.

+
+ + diff --git a/web/src/app/contact/contact.component.scss b/web/src/app/contact/contact.component.scss new file mode 100644 index 0000000..8aca469 --- /dev/null +++ b/web/src/app/contact/contact.component.scss @@ -0,0 +1,8 @@ +a { + color: #333; + transition: color 0.5s ease-in-out; +} + +a:hover { + color: #000; +} diff --git a/web/src/app/contact/contact.component.spec.ts b/web/src/app/contact/contact.component.spec.ts new file mode 100644 index 0000000..427633e --- /dev/null +++ b/web/src/app/contact/contact.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ContactComponent } from './contact.component'; + +describe('ContactComponent', () => { + let component: ContactComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ ContactComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(ContactComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/web/src/app/contact/contact.component.ts b/web/src/app/contact/contact.component.ts new file mode 100644 index 0000000..c8367d9 --- /dev/null +++ b/web/src/app/contact/contact.component.ts @@ -0,0 +1,27 @@ +import { Component, OnInit, AfterViewInit, OnDestroy } from '@angular/core'; +import * as config from '../config'; + +@Component({ + selector: 'app-contact', + templateUrl: './contact.component.html', + styleUrls: ['./contact.component.scss'] +}) +export class ContactComponent implements OnInit, AfterViewInit, OnDestroy { + + instagramUser = config.instagramUser; + emailAddress = config.emailAddress; + + constructor() { } + + ngOnInit() { + } + + ngAfterViewInit() { + document.querySelector('body').classList.add('white'); + } + + ngOnDestroy(): void { + document.querySelector('body').classList.remove('white'); + } + +} diff --git a/web/src/app/header/header.component.html b/web/src/app/header/header.component.html index b2cb148..4be133f 100644 --- a/web/src/app/header/header.component.html +++ b/web/src/app/header/header.component.html @@ -3,6 +3,6 @@ diff --git a/web/src/app/header/header.component.ts b/web/src/app/header/header.component.ts index 5863e38..eae1d7b 100644 --- a/web/src/app/header/header.component.ts +++ b/web/src/app/header/header.component.ts @@ -13,8 +13,6 @@ export class HeaderComponent implements OnInit { team = config.team; contact = config.contact; - emailAddress = config.emailAddress; - constructor() { } ngOnInit() {