Skip to content

Commit

Permalink
✨ Added contact page
Browse files Browse the repository at this point in the history
  • Loading branch information
AlbertSuarez committed Jun 10, 2019
1 parent 8a443c6 commit 4c9bca0
Show file tree
Hide file tree
Showing 8 changed files with 74 additions and 4 deletions.
2 changes: 2 additions & 0 deletions web/src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
];

Expand Down
4 changes: 3 additions & 1 deletion web/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: [
Expand All @@ -23,7 +24,8 @@ import { FooterComponent } from './footer/footer.component';
HeaderComponent,
ProjectComponent,
TeamComponent,
FooterComponent
FooterComponent,
ContactComponent
],
imports: [
BrowserModule,
Expand Down
8 changes: 8 additions & 0 deletions web/src/app/contact/contact.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<app-header></app-header>

<div class="container">
<p>Queremos conocer tu opinión de ​<i>Mia: Un cortometraje interactivo​</i>. Cuéntanos tu experiencia interactiva para que podamos publicarla en nuestras redes sociales. Tenemos cuenta en <a *ngIf="instagramUser" href="https://instagram.com/{{instagramUser}}" target="_blank">Instagram.</a></p>
<p>Para más información, no dudes en contactarnos en nuestra dirección de <a *ngIf="emailAddress" href="mailto:{{emailAddress}}">correo electrónico</a>. Allí resolveremos cualquier duda que tengas sobre el cotrometraje o el proyecto interactivo en sí mismo. Y recuerda, tu opinión nos importa.</p>
</div>

<app-footer></app-footer>
8 changes: 8 additions & 0 deletions web/src/app/contact/contact.component.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
a {
color: #333;
transition: color 0.5s ease-in-out;
}

a:hover {
color: #000;
}
25 changes: 25 additions & 0 deletions web/src/app/contact/contact.component.spec.ts
Original file line number Diff line number Diff line change
@@ -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<ContactComponent>;

beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ ContactComponent ]
})
.compileComponents();
}));

beforeEach(() => {
fixture = TestBed.createComponent(ContactComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
27 changes: 27 additions & 0 deletions web/src/app/contact/contact.component.ts
Original file line number Diff line number Diff line change
@@ -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');
}

}
2 changes: 1 addition & 1 deletion web/src/app/header/header.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
<div class="nav-links">
<a href="/project">{{ project }}</a>
<a href="/team">{{ team }}</a>
<a *ngIf="emailAddress" href="mailto:{{emailAddress}}">{{ contact }}</a>
<a href="/contact">{{ contact }}</a>
</div>
</div>
2 changes: 0 additions & 2 deletions web/src/app/header/header.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ export class HeaderComponent implements OnInit {
team = config.team;
contact = config.contact;

emailAddress = config.emailAddress;

constructor() { }

ngOnInit() {
Expand Down

0 comments on commit 4c9bca0

Please sign in to comment.