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

DON-889: Update homepage for WGMF opening tommorow #1341

Merged
merged 2 commits into from
Oct 10, 2023
Merged
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
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+01: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
Loading