Skip to content

Commit

Permalink
DON-889: Update WGMF home page card at noon tomorrow for opening
Browse files Browse the repository at this point in the history
  • Loading branch information
bdsl committed Oct 10, 2023
1 parent 0160492 commit 256dfed
Showing 1 changed file with 30 additions and 29 deletions.
59 changes: 30 additions & 29 deletions src/app/home/home.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,28 @@ import {PageMetaService} from '../page-meta.service';
import {HighlightCard} from "./HighlightCard";
import {environment} from "../../environments/environment";

const ArtsForImpactCard: HighlightCard = {
headerText: "Applications for Arts for Impact are now open!",
backgroundImageUrl: new URL('/assets/images/red-coral-texture.png', environment.donateGlobalUriPrefix),
iconColor: 'brand-afa-pink',
bodyText: 'Apply by 15th December 2023',
button: {
text: "Apply now",
href: new URL('/artsforimpact/', environment.blogUriPrefix)
}
} as const;
const wgmfCampaignIsOpen = new Date() > new Date('2023-10-11T12:00:00');

const SignUpCard: HighlightCard = {
headerText: 'Join our mailing list!',
backgroundImageUrl: new URL('/assets/images/anchor-match-fund.jpg', environment.donateGlobalUriPrefix),
iconColor: 'primary',
bodyText: 'Get the latest updates and campaign reminders straight to your inbox',
const WGMFCard = wgmfCampaignIsOpen ? {
headerText: 'Double your donation in the Women and Girls Match Fund',
bodyText: "Donate between 11th - 18th October 2023",
iconColor: "brand-wgmf-purple",
backgroundImageUrl: new URL('/assets/images/wmg-purple-texture.jpg', environment.donateGlobalUriPrefix),
button: {
text: 'Sign up now',
href: new URL('http://eepurl.com/bDbW3r')
text: "Donate Now",
href: new URL('/women-and-girls-2023/', environment.donateGlobalUriPrefix),
}
} as const;
} as const :
{
headerText: 'Save the date for Women and Girls Match Fund',
bodyText: "11th - 18th October 2023",
iconColor: "brand-wgmf-purple",
backgroundImageUrl: new URL('/assets/images/wmg-purple-texture.jpg', environment.donateGlobalUriPrefix),
button: {
text: "Find out more",
href: new URL('/women-and-girls-2023/', environment.donateGlobalUriPrefix),
}
} as const;

@Component({
selector: 'app-home',
Expand All @@ -40,16 +41,7 @@ export class HomeComponent implements OnInit {


highlightCards: readonly HighlightCard[] = [
{
headerText: 'Save the date for Women and Girls Match Fund',
bodyText: "11th - 18th October 2023",
iconColor: "brand-wgmf-purple",
backgroundImageUrl: new URL('/assets/images/wmg-purple-texture.jpg', environment.donateGlobalUriPrefix),
button: {
text: "Find out more",
href: new URL('/women-and-girls-2023/', environment.donateGlobalUriPrefix),
}
},
WGMFCard,
{
headerText: 'Double your donation for Global’s Make Some Noise',
backgroundImageUrl: new URL('/assets/images/blue-texture.jpg', environment.donateGlobalUriPrefix),
Expand All @@ -60,7 +52,16 @@ export class HomeComponent implements OnInit {
href: new URL('/campaign/a056900001xpxqVAAQ', environment.donateGlobalUriPrefix)
}
},
new Date() > new Date('2023-10-09T12:00:00') ? ArtsForImpactCard : SignUpCard,
{
headerText: "Applications for Arts for Impact are now open!",
backgroundImageUrl: new URL('/assets/images/red-coral-texture.png', environment.donateGlobalUriPrefix),
iconColor: 'brand-afa-pink',
bodyText: 'Apply by 15th December 2023',
button: {
text: "Apply now",
href: new URL('/artsforimpact/', environment.blogUriPrefix)
}
} as const,
];

public constructor(
Expand Down

0 comments on commit 256dfed

Please sign in to comment.