Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { FormContainerComponent } from './modules/sample-providers/routes/form-container/form-container.component';
import { SubmissionSuccessComponent } from './modules/sample-providers/routes/submissionSuccess';

const routes: Routes = [{ path: '', component: FormContainerComponent }];
const routes: Routes = [
{ path: '', component: FormContainerComponent },
{ path: 'success', component: SubmissionSuccessComponent },
];

@NgModule({
imports: [RouterModule.forRoot(routes)],
exports: [RouterModule]
exports: [RouterModule],
})
export class AppRoutingModule {}
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';

@Component({
selector: 'app-form-container',
Expand All @@ -7,11 +8,12 @@ import { Component, OnInit } from '@angular/core';
})
export class FormContainerComponent implements OnInit {
showSuccess = false;
constructor() {}
constructor(private router: Router) {}

ngOnInit(): void {}

public submitForm(data): void {
this.showSuccess = true;
this.router.navigate(['success']);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<div class="backdrop">
<div class="left-side">
<div class="header">
<span class="button" (click)="navigate()">< Back</span>
<h1>Submission Received!</h1>
</div>
<p>Thank you for your interest in Splice.<br>The wait time for getting a reply is 10 business days.</p>
</div>
</div>
52 changes: 52 additions & 0 deletions src/app/modules/sample-providers/routes/submissionSuccess.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
:host {
width: 100%;
height: 100%;
position: fixed;
margin-left: calc(-20% - 5px);
margin-top: -8px;
background-color: black;
}

.backdrop {
background-image: url('https://splice.com/blog/wp-content/uploads/2020/08/[email protected]');
background-repeat: no-repeat;
background-position: right;
background-size: contain;
color: white;
width: 100%;
height: 100%;
}

.left-side {
width: 40%;
background-color: black;
padding: 80px;
height: 100%
}

.header {
margin-top: 25%;
}

h1 {
padding-top: 7px;
}

p {
font-size: 2rem;
}

span.button {
float: left;
background: #03f;
text-align: center;
padding: 7px 20px;
margin-right: 10px;
border-radius: 100px;
font-size: 15px;
color: #fff;
font-weight: 600;
text-decoration: none;
border: none;
cursor: pointer;
}
15 changes: 15 additions & 0 deletions src/app/modules/sample-providers/routes/submissionSuccess.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { Component } from '@angular/core';
import { Router } from '@angular/router';

@Component({
selector: 'submission-success',
templateUrl: './submissionSuccess.html',
styleUrls: ['./submissionSuccess.scss'],
})
export class SubmissionSuccessComponent {
constructor(public router: Router) {}

navigate() {
this.router.navigate(['./']);
}
}
7 changes: 6 additions & 1 deletion src/app/modules/sample-providers/sample-providers.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,14 @@ import { RouterModule } from '@angular/router';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { FormContainerComponent } from './routes/form-container/form-container.component';
import { SubmissionFormComponent } from './components/submission-form/submission-form.component';
import { SubmissionSuccessComponent } from './routes/submissionSuccess';

@NgModule({
declarations: [FormContainerComponent, SubmissionFormComponent],
declarations: [
FormContainerComponent,
SubmissionFormComponent,
SubmissionSuccessComponent,
],
imports: [CommonModule, FormsModule, ReactiveFormsModule, RouterModule],
})
export class SampleProvidersModule {}