Skip to content

Commit

Permalink
Merge pull request #18 from CerealKiller97/dev
Browse files Browse the repository at this point in the history
Footer on contact and 404 page FIXED
  • Loading branch information
Stefan Bogdanović authored Sep 10, 2019
2 parents f51c8b1 + 12302cf commit 6bc8204
Show file tree
Hide file tree
Showing 10 changed files with 170 additions and 96 deletions.
174 changes: 112 additions & 62 deletions src/app/modules/contact/components/contact/contact.component.html
Original file line number Diff line number Diff line change
@@ -1,77 +1,127 @@
<!-- <h1 class="text-center light-text">
Contact
<span>
<mat-icon>mail</mat-icon>
</span>
</h1>
<form [formGroup]="contactForm">
<div class="row">
<div class="col col-lg-6 offset-col-lg-3">
<!-- <div class="container my-5 mx-5">
<mat-toolbar>
<h1 class="light-text text-center">Contact</h1>
</mat-toolbar>
<div class="row">
<p class="light-text text-center"> Do you have any questions? Please do not hesitate to contact us directly. Our
team will come
back to you within a
matter of hours to help you.
</p>
<form [formGroup]="contactForm">
<div class="col">
<div class="mx-5 my-5">
<mat-form-field>
<input matInput formControlName="name" placeholder="Enter your name..." />
<span *ngIf="!contactForm.get('name').valid && contactForm.get('name').touched">Name field is
required.</span>
</mat-form-field>
</div>
</div>
</div>
<div class="mx-5 my-5">
<mat-form-field>
<input matInput formControlName="subject" placeholder="Enter your subject..." />
</mat-form-field>
</div>
</form> -->
<div class="col">
<div class="mx-5 my-5">
<mat-form-field>
<input matInput formControlName="email" placeholder="Enter your email..." />
<span *ngIf="!contactForm.get('email').valid && contactForm.get('email').touched">Email field is
required.</span>
</mat-form-field>
</div>
</div>
<div class="w-100"></div>
<div class="col">
<div class="mx-5 my-5">
<mat-form-field>
<input matInput formControlName="subject" placeholder="Enter your subject..." />
<span *ngIf="!contactForm.get('subject').valid && contactForm.get('subject').touched">Subject field is
required.</span>
</mat-form-field>
</div>
</div>
<div class="col">
<div class="mx-5 my-5">
<mat-form-field>
<textarea matInput formControlName="body" placeholder="Message body..."></textarea>
<span *ngIf="!contactForm.get('body').valid && contactForm.get('body').touched">Body field is
required.</span>
</mat-form-field>
</div>
<button mat-raised-button color="primary" type="button" (click)="onSubmitContactForm();">Submit</button>
</div>
</form>
</div>
</div>
-->

<div class="container">
<section class="container my-5 mx-5">
<div class="row">
<mat-toolbar>
<h1 class="light-text text-center">Contact</h1>
</mat-toolbar>
<div class="row">
<!--Grid column-->
<div class="col-lg-12">
<form [formGroup]="contactForm">
<div class="col">
<div class="mx-5 my-5">
<mat-form-field>
<input matInput formControlName="name" placeholder="Enter your name..." />
<span *ngIf="!contactForm.get('name').valid && contactForm.get('name').touched">Name field is
required.</span>
</mat-form-field>

<!--Grid row-->
<div class="row">

<!--Grid column-->
<div class="col">
<div class="mx-5 my-5">
<mat-form-field>
<input matInput formControlName="name" placeholder="Enter your name..." />
<span *ngIf="!contactForm.get('name').valid && contactForm.get('name').touched">Name field is
required.</span>
</mat-form-field>
</div>
</div>
</div>
<div class="col">
<div class="mx-5 my-5">
<mat-form-field>
<input matInput formControlName="email" placeholder="Enter your email..." />
<span *ngIf="!contactForm.get('email').valid && contactForm.get('email').touched">Email field is
required.</span>
</mat-form-field>
<!--Grid column-->

<!--Grid column-->
<div class="col-md-6">
<div class="col">
<div class="mx-5 my-5">
<mat-form-field>
<input matInput formControlName="email" placeholder="Enter your email..." />
<span *ngIf="!contactForm.get('email').valid && contactForm.get('email').touched">Email field is
required.</span>
</mat-form-field>
</div>
</div>
</div>
<!--Grid column-->

</div>
<div class="w-100"></div>
<div class="col">
<div class="mx-5 my-5">
<mat-form-field>
<input matInput formControlName="subject" placeholder="Enter your subject..." />
<span *ngIf="!contactForm.get('subject').valid && contactForm.get('subject').touched">Subject field is
required.</span>
</mat-form-field>
<!--Grid row-->

<!--Grid row-->
<div class="row">

<div class="col">
<div class="mx-5 my-5">
<mat-form-field>
<input matInput formControlName="subject" placeholder="Enter your subject..." />
<span *ngIf="!contactForm.get('subject').valid && contactForm.get('subject').touched">Subject field is
required.</span>
</mat-form-field>
</div>
</div>
</div>
<div class="col">
<div class="mx-5 my-5">
<mat-form-field>
<textarea matInput formControlName="body" placeholder="Message body..."></textarea>
<span *ngIf="!contactForm.get('body').valid && contactForm.get('body').touched">Body field is
required.</span>
</mat-form-field>

<div class="col-md-6">

<div class="col">
<div class="mx-5 my-5">
<mat-form-field>
<textarea matInput formControlName="body" placeholder="Message body..."></textarea>
<span *ngIf="!contactForm.get('body').valid && contactForm.get('body').touched">Body field is
required.</span>
</mat-form-field>
</div>

</div>
</div>
<button mat-raised-button color="primary" type="button" (click)="onSubmitContactForm();">Submit</button>
</div>
<button mat-raised-button color="primary" type="button" (click)="onSubmitContactForm();">Submit</button>
</form>
</div>
</div>
</section>
18 changes: 12 additions & 6 deletions src/app/modules/errors/components/errors/errors.component.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
<div class="container">
<div class="row">
<div class="col-md-6 offset-md-3">
<h1 class="light-text">Ooops look you got lost :( 404 page</h1>
<mat-grid-list cols="1" rowHeight="500">
<mat-grid-tile>
<div class="container my-5 mx-5">
<div class="row">
<div class="col-md-6 offset-md-3">
<h1 class="light-text">Ooops looks you got lost :( 404 page</h1>
<button mat-raised-button (click)="goBack();">Go back</button>
</div>
</div>
</div>
</div>
</div>

</mat-grid-tile>
</mat-grid-list>
9 changes: 6 additions & 3 deletions src/app/modules/errors/components/errors/errors.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,13 @@ import { Component, OnInit } from '@angular/core';
styleUrls: ['./errors.component.css']
})
export class ErrorsComponent implements OnInit {
constructor() {}

constructor() { }
ngOnInit() {}

ngOnInit() {
}
// gaming/contact

public goBack(): void {
history.back();
}
}
12 changes: 6 additions & 6 deletions src/app/modules/errors/errors.module.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { ErrorsComponent } from './components/errors/errors.component';
import { Routes, RouterModule } from '@angular/router';
import { NgModule } from '@angular/core';
import { MatButtonModule } from '@angular/material/button';
import { MatGridListModule } from '@angular/material/grid-list';

import { RouterModule, Routes } from '@angular/router';
import { ErrorsComponent } from './components/errors/errors.component';
const routes: Routes = [
{
path: '',
Expand All @@ -14,7 +14,7 @@ const routes: Routes = [

@NgModule({
declarations: [ErrorsComponent],
imports: [CommonModule, RouterModule.forChild(routes), MatGridListModule],
exports: [ErrorsComponent, RouterModule, MatGridListModule]
imports: [CommonModule, RouterModule.forChild(routes), MatGridListModule, MatButtonModule],
exports: [ErrorsComponent, RouterModule, MatGridListModule, MatButtonModule]
})
export class ErrorsModule {}
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,8 @@
.padding-left {
padding-left: 5px !important;
}

.fixed {
position: fixed !important;
bottom: 0;
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<mat-toolbar color="primary">
<mat-toolbar color="primary" [ngClass]="{'fixed': shouldBeFixed}">
<small class="text-center light-text">&copy; 2019 Stefan Bogdanović</small>
<span class="example-fill-remaining-space"></span>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';

@Component({
selector: 'app-footer',
templateUrl: './footer.component.html',
styleUrls: ['./footer.component.css']
})
export class FooterComponent implements OnInit {
constructor() {}
public shouldBeFixed: boolean;

ngOnInit() {}
constructor(private readonly route: ActivatedRoute, private readonly router: Router) {}

ngOnInit() {
let url: string;
if (this.router.routerState.snapshot.url === '/gaming/contact') {
this.shouldBeFixed = true;
} else if (this.router.routerState.snapshot.url === '/contact') {
this.shouldBeFixed = true;
}
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div *ngIf="loading" id="overlay">
<!-- <h1 id="loading-text" class="light-text text-center mx-2 my-5"></h1> -->
<!-- <mat-spinner class="my-5" [value]="400" color="warn"></mat-spinner> -->
<app-fingerprint-spinner [animationDuration]="1000" [size]="100" [color]="'#ff1d5e'">
<!-- <mat-spinner class="my-5" [value]="400" color="warn"></mat-spinner> ff1d5e-->
<app-fingerprint-spinner [animationDuration]="1000" [size]="100" [color]="'#ffffff'">
</app-fingerprint-spinner>
</div>
25 changes: 13 additions & 12 deletions src/app/modules/shared-components/shared-components.module.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { MatInputModule } from '@angular/material/input';
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
import { MatSnackBar, MatSnackBarContainer, SimpleSnackBar } from '@angular/material/snack-bar';
import { RouterModule } from '@angular/router';
import { CustomIconService } from '@serviceicons/custom-icons.service';
import { FingerprintSpinnerModule, SemipolarSpinnerModule } from 'angular-epic-spinners';
import { HeaderComponent } from './components';
import { BugReportDialogComponent } from './components/bug-report-dialog/bug-report-dialog.component';
import { FooterComponent } from './components/footer/footer.component';
import { HeroComponent } from './components/hero/hero.component';
import { LoadingSpinnerComponent } from './components/loading-spinner/loading-spinner.component';
import { FingerprintSpinnerModule } from 'angular-epic-spinners';
import { RouterModule } from '@angular/router';
import { MaterialModule } from './material/material.module';
import { NotificationComponent } from './components/notification/notification.component';
import { CustomIconService } from '@serviceicons/custom-icons.service';
import { HeroComponent } from './components/hero/hero.component';
import { BugReportDialogComponent } from './components/bug-report-dialog/bug-report-dialog.component';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
import { MaterialModule } from './material/material.module';

import { MatInputModule } from '@angular/material/input';
import { MatSnackBar, MatSnackBarContainer, SimpleSnackBar } from '@angular/material/snack-bar';
@NgModule({
declarations: [
HeaderComponent,
Expand All @@ -32,7 +32,8 @@ import { MatSnackBar, MatSnackBarContainer, SimpleSnackBar } from '@angular/mate
FormsModule,
MatInputModule,
ReactiveFormsModule,
MatProgressSpinnerModule
MatProgressSpinnerModule,
SemipolarSpinnerModule
],
exports: [
HeaderComponent,
Expand Down
3 changes: 1 addition & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,5 @@
"angularCompilerOptions": {
"fullTemplateTypeCheck": true,
"strictInjectionParameters": true
},

}
}

1 comment on commit 6bc8204

@vercel
Copy link

@vercel vercel bot commented on 6bc8204 Sep 10, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.