Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes to Home Page Formatting #147

Closed
wants to merge 8 commits into from
Closed
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
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"stripe-angular": "0.5.0",
"swagger-ui": "2.2.10",
"tslib": "1.10.0",
"yarn": "^1.19.1",
Copy link
Member

@SudharakaP SudharakaP Oct 14, 2019

Choose a reason for hiding this comment

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

This is unnecessary. The generator of this project (JHipster) auto installs yarn locally. If you go to your root folder of the project you'll see a npm directory and within it a yarn directory (provided that you build the project with ./mvnw).

Copy link
Author

Choose a reason for hiding this comment

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

yarn suggested to do 'yarn audit autofix' to fix some yarn irregularities. I did that and yarn has added this.

"zone.js": "0.9.1"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/app/home/email/email.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ <h3>Drop Us a Message</h3>
</div>
</div>
</div>
<div class="col-12">
<div class="col-12 text-center">
<button [disabled]="!contactForm.valid" mat-raised-button color="primary" type="submit"
name="btnSubmit" value="">Send Message
</button>
Expand Down
106 changes: 53 additions & 53 deletions src/main/webapp/app/home/email/email.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,68 +7,68 @@ import { MatSnackBar } from '@angular/material';
import { JhiAlertService } from 'ng-jhipster';

@Component({
selector: 'jhi-email',
templateUrl: './email.component.html',
styleUrls: ['./email.scss']
selector: 'jhi-email',
templateUrl: './email.component.html',
styleUrls: ['./email.component.scss']
})
export class EmailComponent implements OnInit {
contactForm = this.fb.group({
contactName: ['', Validators.required],
contactEmail: ['', [Validators.required, Validators.email]],
contactPhone: [''],
contactMsg: ['', Validators.required]
});

get contactName() {
return this.contactForm.get('contactName');
}
contactForm = this.fb.group({
contactName: ['', Validators.required],
contactEmail: ['', [Validators.required, Validators.email]],
contactPhone: [''],
contactMsg: ['', Validators.required]
});

get contactEmail() {
return this.contactForm.get('contactEmail');
}
get contactName() {
return this.contactForm.get('contactName');
}

get contactPhone() {
return this.contactForm.get('contactPhone');
}
get contactEmail() {
return this.contactForm.get('contactEmail');
}

get contactMsg() {
return this.contactForm.get('contactMsg');
}
get contactPhone() {
return this.contactForm.get('contactPhone');
}

onSubmit() {
this.sendRequest().subscribe(
() => {
this._snackBar.open('Thanks for writing to us! We will get back to you soon!', null, {
duration: 5000,
panelClass: ['contact-form-snack-bar']
});
this.contactForm.reset();
},
err => {
this.onError(err.message);
}
);
}
get contactMsg() {
return this.contactForm.get('contactMsg');
}

sendRequest(): Observable<any> {
return this.http.post<any>('https://usebasin.com/f/b5ed73d03aa5', this.contactForm.value, {
headers: new HttpHeaders({
Accept: 'application/json'
}),
observe: 'response'
onSubmit() {
this.sendRequest().subscribe(
() => {
this._snackBar.open('Thanks for writing to us! We will get back to you soon!', null, {
duration: 5000,
panelClass: ['contact-form-snack-bar']
});
}
this.contactForm.reset();
},
err => {
this.onError(err.message);
}
);
}

sendRequest(): Observable<any> {
return this.http.post<any>('https://usebasin.com/f/b5ed73d03aa5', this.contactForm.value, {
headers: new HttpHeaders({
Accept: 'application/json'
}),
observe: 'response'
});
}

constructor(
private fb: FormBuilder,
private http: HttpClient,
private _snackBar: MatSnackBar,
private jhiAlertService: JhiAlertService
) {}
constructor(
private fb: FormBuilder,
private http: HttpClient,
private _snackBar: MatSnackBar,
private jhiAlertService: JhiAlertService
) {}

ngOnInit() {}
ngOnInit() {}

private onError(errorMessage: string) {
this.jhiAlertService.error(errorMessage, null, null);
}
private onError(errorMessage: string) {
this.jhiAlertService.error(errorMessage, null, null);
}
}
45 changes: 0 additions & 45 deletions src/main/webapp/app/home/email/email.scss

This file was deleted.

8 changes: 4 additions & 4 deletions src/main/webapp/app/home/home.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ <h1 class="display-3">Welcome to Python-Sinhala!</h1>
<img class="img-fluid" src="../../content/images/book_for_education.svg" alt="Affordable">
</div>
<div class="col-md-6 col-12 order-md-1">
<h1 class="display-5">Accessible without Bounds...</h1>
<h1 class="display-4">Accessible without Bounds...</h1>
<p>We want to make education accessible to everyone; and commit to make our courses accessible to
everyone in all parts of Sri-Lanka now and always.</p>
</div>
Expand All @@ -31,7 +31,7 @@ <h1 class="display-5">Accessible without Bounds...</h1>
<img class="img-fluid" src="../../content/images/non-profit.svg" alt="Non-Profit">
</div>
<div class="col-md-6">
<h1 class="display-5">Not For Profit...</h1>
<h1 class="display-4">Not For Profit...</h1>
<p>We are a non-profit organizaiton incorporated in British Columbia and only sell our courses for the minimum amount of money needed to cover
bandwidth and operational costs.</p>
</div>
Expand All @@ -41,7 +41,7 @@ <h1 class="display-5">Not For Profit...</h1>
<img class="img-fluid" src="../../content/images/deal_handshakes.svg" alt="Expand">
</div>
<div class="col-md-6 col-12 order-md-1">
<h1 class="display-5">Think Big, Strive for More...</h1>
<h1 class="display-4">Think Big, Strive for More...</h1>
<p>We aspire to cover all subjects related to the standardized examination curriculum in Sri-Lanka
and strive to make partnerships more tutors and educational institutions that
share our goal.</p>
Expand All @@ -50,7 +50,7 @@ <h1 class="display-5">Think Big, Strive for More...</h1>
</ul>
</div>
</section>
<section class="background_outer_div">
<section id="ourCommitment" class="background_outer_div">
<div class="d-none d-md-block">
<img class="background_ani kenburns-bottom" src="../../content/images/books_background.jpg" alt="books">
</div>
Expand Down
Loading