Auto hide VBS
parent
b366733a52
commit
ff8880dd2a
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
<div id="content-wrapper">
|
||||
|
||||
<div style="text-align: center; position: relative; margin-bottom: 15px;">
|
||||
<div style="text-align: center; position: relative; margin-bottom: 15px;" *ngIf="showVBS">
|
||||
<div style="position: absolute; width: 100%; height: calc(65% + 15px); top: 35%; background-color: white;"></div>
|
||||
<img src="assets/images/home-images/tiny/VBS_small.jpg" style="width:75%; max-width: 350px; position: relative; z-index: 1; box-shadow: 0 0 20px pink;" >
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -23,7 +23,19 @@ export class HomeComponent {
|
|||
return true;
|
||||
}
|
||||
public get showCallToAction(): boolean {
|
||||
let maxDate = new Date(2019,6,8); // September 6th 2018 -- Set the month one month behind since JavaScript dates are 0 based
|
||||
let maxDate = new Date(2019,6,8); // July 8th 2018 -- Set the month one month behind since JavaScript dates are 0 based
|
||||
let now = new Date();
|
||||
if (now.getFullYear() > maxDate.getFullYear()) return false;
|
||||
if (now.getFullYear() == maxDate.getFullYear()) {
|
||||
if (now.getMonth() > maxDate.getMonth()) return false;
|
||||
if (now.getMonth() == maxDate.getMonth()) {
|
||||
if (now.getDate() > maxDate.getDate()) return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
public get showVBS(): boolean {
|
||||
let maxDate = new Date(2019,7,22); // August 22nd 2018 -- Set the month one month behind since JavaScript dates are 0 based
|
||||
let now = new Date();
|
||||
if (now.getFullYear() > maxDate.getFullYear()) return false;
|
||||
if (now.getFullYear() == maxDate.getFullYear()) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue