update home logic
continuous-integration/drone/push Build is passing Details

master
unknown 2024-08-04 15:06:49 -06:00
parent 70146f0e73
commit 13d5eca9ef
2 changed files with 23 additions and 4 deletions

View File

@ -45,7 +45,7 @@
<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>
<div class="row tint" *ngIf="showSpecial" >
<div class="row tint" *ngIf="showVGC" >
<div class="row-content">
<div class="row-content-col-left center">
<img style="max-height:500px" ofbFadeInOnScroll src="assets/images/original/VictoryGospelCrusade.png" height="500">
@ -79,7 +79,7 @@
</div>
</div>
<div class="row" *ngIf="showSpecial && 1 === 2" >
<div class="row" *ngIf="showSpecial" >
<div class="row-content">
<div class="row-content-col-left center">
<img style="max-height:500px" ofbFadeInOnScroll src="assets/images/home-images/tiny/Cowboy Carnival.jpg" height="500">

View File

@ -14,9 +14,10 @@ import { YoutubePopupComponent } from '../popups/youtube-popup/youtube-popup.com
})
export class HomeComponent {
backgroundTop: string = "0px";
public get showSpecial() : boolean {
let maxDate = new Date(2024,7,15,11); // September 18th 2018 -- Set the month one month behind since JavaScript dates are 0 based
public get showVGC() : boolean {
let maxDate = new Date(2024,7,15,11); // August 15th 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()) {
@ -30,6 +31,24 @@ export class HomeComponent {
}
return true;
}
public get showSpecial() : boolean {
let maxDate = new Date(2022,8,18,11); // September 18th 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;
if (now.getDate() == maxDate.getDate()) {
if (now.getHours() > maxDate.getHours()) return false;
}
}
}
return true;
}
public get showCallToAction(): boolean {
let maxDate = new Date(2020,4,10); // July 8th 2018 -- Set the month one month behind since JavaScript dates are 0 based
let now = new Date();