Refactor main hero header events

This commit is contained in:
Helen Chong 2024-04-29 13:07:49 +08:00
parent c83da017ff
commit 1830f0b8c8
61 changed files with 5821 additions and 11701 deletions

View File

@ -98,14 +98,12 @@
const todayEvent = getTodayEvent(); const todayEvent = getTodayEvent();
if (todayEvent != "No event") { if (todayEvent) {
heroTopBarEl.classList.remove('hidden'); heroTopBarEl.classList.remove('hidden');
heroTopBarEl.innerHTML = todayEvent.blurb;
if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { if (todayEvent.class) {
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); headerImgEl.classList.add(todayEvent.class);
} else {
headerImgEl.classList.add(getBanner(todayEvent));
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent);
} }
} }
@ -114,196 +112,100 @@
const month = date.getMonth() + 1; const month = date.getMonth() + 1;
const day = date.getDate(); const day = date.getDate();
if (month == 3 && day == 1) const currentYear = date.getFullYear();
return "Zero Discrimination Day"; const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear();
else if (month == 3 && day == 8) const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate;
return "International Women's Day";
else if (month == 3 && day == 31) if (month === 3 && day === 1)
return "Trans Day of Visibility"; return {
else if (month == 4 && day == 6) blurb: `Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>`,
return "International Asexuality Day"; class: "flag-progress-intersex",
else if (month == 4 && day == 26) };
return "Lesbian Visibility Day"; else if (month === 3 && day === 8)
else if (month == 5 && day == 17) return {
return "IDAHOBIT"; blurb: `Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day}</a>`,
else if (month == 5 && day == 19) class: "symbol-venus",
return "Agender Pride Day"; };
else if (month == 5 && day == 25) else if (month === 3 && day === 31)
return "Pansexual and Panromantic Awareness & Visibility Day"; return {
else if (month == 6) blurb: `Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>`,
return "Pride Month"; class: "flag-trans",
else if (month == 7 && day == 14) };
return "Non-Binary People's Day"; else if (month === 4 && day === 6)
else if (month == 7 && day == 28) return {
return "Leilukin's Birthday"; blurb: `Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>`,
else if (month == 9 && day == 11) class: "flag-ace",
return "Leilukin's Hub Anniversary"; };
else if (month == 9 && day == 23) else if (month === 4 && day === 26)
return "Bi Visibility Day"; return {
else if (month == 10 && day == 8) blurb: `Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>`,
return "International Lesbian Day"; class: "flag-lesbian",
else if (month == 10 && day == 11) };
return "National Coming Out Day"; else if (month === 5 && day === 17)
else if (month == 10 && day == 17) return {
return "Genderfluid Visibility Week"; blurb: `Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a>`,
else if (month == 10 && day == 24) class: "flag-progress",
return "Ace Week"; };
else if (month == 10 && day == 26) else if (month === 5 && day === 19)
return "Intersex Awareness Day"; return {
blurb: `Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a>`,
class: "flag-agender",
};
else if (month === 5 && day === 25)
return {
blurb: `Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Awareness and Visibility Day</a>`,
class: "flag-pan",
};
else if (month === 6)
return {
blurb: `Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!`,
class: "flag-progress-intersex",
};
else if (month === 7 && day === 14)
return {
blurb: `Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>`,
class: "flag-nonbinary",
};
else if (month === 7 && day === 28)
return {
blurb: `Today is Leilukin's Birthday`
};
else if (month === 9 && day === 11)
return {
blurb: `Today is the ${leilukinsHubAnniversary}-year anniversary of the launch of Leilukin's Hub`
};
else if (month === 9 && day === 23)
return {
blurb: `Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>`,
class: "flag-bi",
};
else if (month === 10 && day === 8)
return {
blurb: `Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>`,
class: "flag-lesbian",
};
else if (month === 10 && day === 11)
return {
blurb: `Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>`,
class: "flag-rainbow",
};
else if (month === 10 && day === 17)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>`,
class: "flag-genderfluid",
};
else if (month === 10 && day === 24)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>`,
class: "flag-ace",
};
else if (month === 10 && day === 26)
return {
blurb: `Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>`,
class: "flag-intersex",
};
else else
return "No event"; return null;
}
function getBanner(day) {
switch (day) {
case "Zero Discrimination Day":
return "flag-progress-intersex";
break;
case "International Women's Day":
return "symbol-venus";
break;
case "Trans Day of Visibility":
return "flag-trans";
break;
case "International Asexuality Day":
return "flag-ace";
break;
case "Lesbian Visibility Day":
return "flag-lesbian";
break;
case "IDAHOBIT":
return "flag-progress";
break;
case "Agender Pride Day":
return "flag-agender";
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return "flag-pan";
break;
case "Pride Month":
return "flag-progress-intersex";
break;
case "Non-Binary People's Day":
return "flag-non-binary";
break;
case "Bi Visibility Day":
return "flag-bi";
break;
case "International Lesbian Day":
return "flag-lesbian";
break;
case "National Coming Out Day":
return "flag-rainbow";
break;
case "Genderfluid Visibility Week":
return "flag-genderfluid";
break;
case "Ace Week":
return "flag-ace";
break;
case "Intersex Awareness Day":
return "flag-intersex";
break;
default:
return "";
}
}
function getBlurbHtml(day) {
switch (day) {
case "Zero Discrimination Day":
return `
Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>
`;
break;
case "International Women's Day":
return `
Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day</a>
`;
break;
case "Trans Day of Visibility":
return `
Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>
`;
break;
case "International Asexuality Day":
return `
Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>
`;
break;
case "Lesbian Visibility Day":
return `
Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>
`;
break;
case "IDAHOBIT":
return `
Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a></span>
`;
break;
case "Agender Pride Day":
return `
Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a></span>
`;
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return `
Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Visibility Day</a>
`;
break;
case "Pride Month":
return `
Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!
`;
break;
case "Non-Binary People's Day":
return `
Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>
`;
break;
case "Leilukin's Birthday":
return `
Today is Leilukin's birthday
`;
break;
case "Leilukin's Hub Anniversary":
return `
Today is the anniversary of the launch of Leilukin's Hub
`;
break;
case "Bi Visibility Day":
return `
Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>
`;
break;
case "International Lesbian Day":
return `
Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>
`;
break;
case "National Coming Out Day":
return `
Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>
`;
break;
case "Genderfluid Visibility Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>
`;
break;
case "Ace Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>
`;
break;
case "Intersex Awareness Day":
return `
Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>
`;
break;
default:
return ``;
}
} }
</script> </script>

View File

@ -98,14 +98,12 @@
const todayEvent = getTodayEvent(); const todayEvent = getTodayEvent();
if (todayEvent != "No event") { if (todayEvent) {
heroTopBarEl.classList.remove('hidden'); heroTopBarEl.classList.remove('hidden');
heroTopBarEl.innerHTML = todayEvent.blurb;
if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { if (todayEvent.class) {
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); headerImgEl.classList.add(todayEvent.class);
} else {
headerImgEl.classList.add(getBanner(todayEvent));
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent);
} }
} }
@ -114,196 +112,100 @@
const month = date.getMonth() + 1; const month = date.getMonth() + 1;
const day = date.getDate(); const day = date.getDate();
if (month == 3 && day == 1) const currentYear = date.getFullYear();
return "Zero Discrimination Day"; const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear();
else if (month == 3 && day == 8) const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate;
return "International Women's Day";
else if (month == 3 && day == 31) if (month === 3 && day === 1)
return "Trans Day of Visibility"; return {
else if (month == 4 && day == 6) blurb: `Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>`,
return "International Asexuality Day"; class: "flag-progress-intersex",
else if (month == 4 && day == 26) };
return "Lesbian Visibility Day"; else if (month === 3 && day === 8)
else if (month == 5 && day == 17) return {
return "IDAHOBIT"; blurb: `Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day}</a>`,
else if (month == 5 && day == 19) class: "symbol-venus",
return "Agender Pride Day"; };
else if (month == 5 && day == 25) else if (month === 3 && day === 31)
return "Pansexual and Panromantic Awareness & Visibility Day"; return {
else if (month == 6) blurb: `Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>`,
return "Pride Month"; class: "flag-trans",
else if (month == 7 && day == 14) };
return "Non-Binary People's Day"; else if (month === 4 && day === 6)
else if (month == 7 && day == 28) return {
return "Leilukin's Birthday"; blurb: `Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>`,
else if (month == 9 && day == 11) class: "flag-ace",
return "Leilukin's Hub Anniversary"; };
else if (month == 9 && day == 23) else if (month === 4 && day === 26)
return "Bi Visibility Day"; return {
else if (month == 10 && day == 8) blurb: `Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>`,
return "International Lesbian Day"; class: "flag-lesbian",
else if (month == 10 && day == 11) };
return "National Coming Out Day"; else if (month === 5 && day === 17)
else if (month == 10 && day == 17) return {
return "Genderfluid Visibility Week"; blurb: `Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a>`,
else if (month == 10 && day == 24) class: "flag-progress",
return "Ace Week"; };
else if (month == 10 && day == 26) else if (month === 5 && day === 19)
return "Intersex Awareness Day"; return {
blurb: `Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a>`,
class: "flag-agender",
};
else if (month === 5 && day === 25)
return {
blurb: `Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Awareness and Visibility Day</a>`,
class: "flag-pan",
};
else if (month === 6)
return {
blurb: `Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!`,
class: "flag-progress-intersex",
};
else if (month === 7 && day === 14)
return {
blurb: `Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>`,
class: "flag-nonbinary",
};
else if (month === 7 && day === 28)
return {
blurb: `Today is Leilukin's Birthday`
};
else if (month === 9 && day === 11)
return {
blurb: `Today is the ${leilukinsHubAnniversary}-year anniversary of the launch of Leilukin's Hub`
};
else if (month === 9 && day === 23)
return {
blurb: `Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>`,
class: "flag-bi",
};
else if (month === 10 && day === 8)
return {
blurb: `Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>`,
class: "flag-lesbian",
};
else if (month === 10 && day === 11)
return {
blurb: `Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>`,
class: "flag-rainbow",
};
else if (month === 10 && day === 17)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>`,
class: "flag-genderfluid",
};
else if (month === 10 && day === 24)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>`,
class: "flag-ace",
};
else if (month === 10 && day === 26)
return {
blurb: `Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>`,
class: "flag-intersex",
};
else else
return "No event"; return null;
}
function getBanner(day) {
switch (day) {
case "Zero Discrimination Day":
return "flag-progress-intersex";
break;
case "International Women's Day":
return "symbol-venus";
break;
case "Trans Day of Visibility":
return "flag-trans";
break;
case "International Asexuality Day":
return "flag-ace";
break;
case "Lesbian Visibility Day":
return "flag-lesbian";
break;
case "IDAHOBIT":
return "flag-progress";
break;
case "Agender Pride Day":
return "flag-agender";
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return "flag-pan";
break;
case "Pride Month":
return "flag-progress-intersex";
break;
case "Non-Binary People's Day":
return "flag-non-binary";
break;
case "Bi Visibility Day":
return "flag-bi";
break;
case "International Lesbian Day":
return "flag-lesbian";
break;
case "National Coming Out Day":
return "flag-rainbow";
break;
case "Genderfluid Visibility Week":
return "flag-genderfluid";
break;
case "Ace Week":
return "flag-ace";
break;
case "Intersex Awareness Day":
return "flag-intersex";
break;
default:
return "";
}
}
function getBlurbHtml(day) {
switch (day) {
case "Zero Discrimination Day":
return `
Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>
`;
break;
case "International Women's Day":
return `
Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day</a>
`;
break;
case "Trans Day of Visibility":
return `
Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>
`;
break;
case "International Asexuality Day":
return `
Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>
`;
break;
case "Lesbian Visibility Day":
return `
Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>
`;
break;
case "IDAHOBIT":
return `
Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a></span>
`;
break;
case "Agender Pride Day":
return `
Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a></span>
`;
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return `
Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Visibility Day</a>
`;
break;
case "Pride Month":
return `
Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!
`;
break;
case "Non-Binary People's Day":
return `
Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>
`;
break;
case "Leilukin's Birthday":
return `
Today is Leilukin's birthday
`;
break;
case "Leilukin's Hub Anniversary":
return `
Today is the anniversary of the launch of Leilukin's Hub
`;
break;
case "Bi Visibility Day":
return `
Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>
`;
break;
case "International Lesbian Day":
return `
Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>
`;
break;
case "National Coming Out Day":
return `
Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>
`;
break;
case "Genderfluid Visibility Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>
`;
break;
case "Ace Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>
`;
break;
case "Intersex Awareness Day":
return `
Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>
`;
break;
default:
return ``;
}
} }
</script> </script>

View File

@ -98,14 +98,12 @@
const todayEvent = getTodayEvent(); const todayEvent = getTodayEvent();
if (todayEvent != "No event") { if (todayEvent) {
heroTopBarEl.classList.remove('hidden'); heroTopBarEl.classList.remove('hidden');
heroTopBarEl.innerHTML = todayEvent.blurb;
if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { if (todayEvent.class) {
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); headerImgEl.classList.add(todayEvent.class);
} else {
headerImgEl.classList.add(getBanner(todayEvent));
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent);
} }
} }
@ -114,196 +112,100 @@
const month = date.getMonth() + 1; const month = date.getMonth() + 1;
const day = date.getDate(); const day = date.getDate();
if (month == 3 && day == 1) const currentYear = date.getFullYear();
return "Zero Discrimination Day"; const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear();
else if (month == 3 && day == 8) const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate;
return "International Women's Day";
else if (month == 3 && day == 31) if (month === 3 && day === 1)
return "Trans Day of Visibility"; return {
else if (month == 4 && day == 6) blurb: `Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>`,
return "International Asexuality Day"; class: "flag-progress-intersex",
else if (month == 4 && day == 26) };
return "Lesbian Visibility Day"; else if (month === 3 && day === 8)
else if (month == 5 && day == 17) return {
return "IDAHOBIT"; blurb: `Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day}</a>`,
else if (month == 5 && day == 19) class: "symbol-venus",
return "Agender Pride Day"; };
else if (month == 5 && day == 25) else if (month === 3 && day === 31)
return "Pansexual and Panromantic Awareness & Visibility Day"; return {
else if (month == 6) blurb: `Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>`,
return "Pride Month"; class: "flag-trans",
else if (month == 7 && day == 14) };
return "Non-Binary People's Day"; else if (month === 4 && day === 6)
else if (month == 7 && day == 28) return {
return "Leilukin's Birthday"; blurb: `Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>`,
else if (month == 9 && day == 11) class: "flag-ace",
return "Leilukin's Hub Anniversary"; };
else if (month == 9 && day == 23) else if (month === 4 && day === 26)
return "Bi Visibility Day"; return {
else if (month == 10 && day == 8) blurb: `Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>`,
return "International Lesbian Day"; class: "flag-lesbian",
else if (month == 10 && day == 11) };
return "National Coming Out Day"; else if (month === 5 && day === 17)
else if (month == 10 && day == 17) return {
return "Genderfluid Visibility Week"; blurb: `Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a>`,
else if (month == 10 && day == 24) class: "flag-progress",
return "Ace Week"; };
else if (month == 10 && day == 26) else if (month === 5 && day === 19)
return "Intersex Awareness Day"; return {
blurb: `Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a>`,
class: "flag-agender",
};
else if (month === 5 && day === 25)
return {
blurb: `Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Awareness and Visibility Day</a>`,
class: "flag-pan",
};
else if (month === 6)
return {
blurb: `Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!`,
class: "flag-progress-intersex",
};
else if (month === 7 && day === 14)
return {
blurb: `Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>`,
class: "flag-nonbinary",
};
else if (month === 7 && day === 28)
return {
blurb: `Today is Leilukin's Birthday`
};
else if (month === 9 && day === 11)
return {
blurb: `Today is the ${leilukinsHubAnniversary}-year anniversary of the launch of Leilukin's Hub`
};
else if (month === 9 && day === 23)
return {
blurb: `Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>`,
class: "flag-bi",
};
else if (month === 10 && day === 8)
return {
blurb: `Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>`,
class: "flag-lesbian",
};
else if (month === 10 && day === 11)
return {
blurb: `Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>`,
class: "flag-rainbow",
};
else if (month === 10 && day === 17)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>`,
class: "flag-genderfluid",
};
else if (month === 10 && day === 24)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>`,
class: "flag-ace",
};
else if (month === 10 && day === 26)
return {
blurb: `Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>`,
class: "flag-intersex",
};
else else
return "No event"; return null;
}
function getBanner(day) {
switch (day) {
case "Zero Discrimination Day":
return "flag-progress-intersex";
break;
case "International Women's Day":
return "symbol-venus";
break;
case "Trans Day of Visibility":
return "flag-trans";
break;
case "International Asexuality Day":
return "flag-ace";
break;
case "Lesbian Visibility Day":
return "flag-lesbian";
break;
case "IDAHOBIT":
return "flag-progress";
break;
case "Agender Pride Day":
return "flag-agender";
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return "flag-pan";
break;
case "Pride Month":
return "flag-progress-intersex";
break;
case "Non-Binary People's Day":
return "flag-non-binary";
break;
case "Bi Visibility Day":
return "flag-bi";
break;
case "International Lesbian Day":
return "flag-lesbian";
break;
case "National Coming Out Day":
return "flag-rainbow";
break;
case "Genderfluid Visibility Week":
return "flag-genderfluid";
break;
case "Ace Week":
return "flag-ace";
break;
case "Intersex Awareness Day":
return "flag-intersex";
break;
default:
return "";
}
}
function getBlurbHtml(day) {
switch (day) {
case "Zero Discrimination Day":
return `
Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>
`;
break;
case "International Women's Day":
return `
Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day</a>
`;
break;
case "Trans Day of Visibility":
return `
Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>
`;
break;
case "International Asexuality Day":
return `
Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>
`;
break;
case "Lesbian Visibility Day":
return `
Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>
`;
break;
case "IDAHOBIT":
return `
Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a></span>
`;
break;
case "Agender Pride Day":
return `
Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a></span>
`;
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return `
Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Visibility Day</a>
`;
break;
case "Pride Month":
return `
Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!
`;
break;
case "Non-Binary People's Day":
return `
Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>
`;
break;
case "Leilukin's Birthday":
return `
Today is Leilukin's birthday
`;
break;
case "Leilukin's Hub Anniversary":
return `
Today is the anniversary of the launch of Leilukin's Hub
`;
break;
case "Bi Visibility Day":
return `
Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>
`;
break;
case "International Lesbian Day":
return `
Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>
`;
break;
case "National Coming Out Day":
return `
Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>
`;
break;
case "Genderfluid Visibility Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>
`;
break;
case "Ace Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>
`;
break;
case "Intersex Awareness Day":
return `
Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>
`;
break;
default:
return ``;
}
} }
</script> </script>

View File

@ -98,14 +98,12 @@
const todayEvent = getTodayEvent(); const todayEvent = getTodayEvent();
if (todayEvent != "No event") { if (todayEvent) {
heroTopBarEl.classList.remove('hidden'); heroTopBarEl.classList.remove('hidden');
heroTopBarEl.innerHTML = todayEvent.blurb;
if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { if (todayEvent.class) {
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); headerImgEl.classList.add(todayEvent.class);
} else {
headerImgEl.classList.add(getBanner(todayEvent));
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent);
} }
} }
@ -114,196 +112,100 @@
const month = date.getMonth() + 1; const month = date.getMonth() + 1;
const day = date.getDate(); const day = date.getDate();
if (month == 3 && day == 1) const currentYear = date.getFullYear();
return "Zero Discrimination Day"; const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear();
else if (month == 3 && day == 8) const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate;
return "International Women's Day";
else if (month == 3 && day == 31) if (month === 3 && day === 1)
return "Trans Day of Visibility"; return {
else if (month == 4 && day == 6) blurb: `Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>`,
return "International Asexuality Day"; class: "flag-progress-intersex",
else if (month == 4 && day == 26) };
return "Lesbian Visibility Day"; else if (month === 3 && day === 8)
else if (month == 5 && day == 17) return {
return "IDAHOBIT"; blurb: `Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day}</a>`,
else if (month == 5 && day == 19) class: "symbol-venus",
return "Agender Pride Day"; };
else if (month == 5 && day == 25) else if (month === 3 && day === 31)
return "Pansexual and Panromantic Awareness & Visibility Day"; return {
else if (month == 6) blurb: `Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>`,
return "Pride Month"; class: "flag-trans",
else if (month == 7 && day == 14) };
return "Non-Binary People's Day"; else if (month === 4 && day === 6)
else if (month == 7 && day == 28) return {
return "Leilukin's Birthday"; blurb: `Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>`,
else if (month == 9 && day == 11) class: "flag-ace",
return "Leilukin's Hub Anniversary"; };
else if (month == 9 && day == 23) else if (month === 4 && day === 26)
return "Bi Visibility Day"; return {
else if (month == 10 && day == 8) blurb: `Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>`,
return "International Lesbian Day"; class: "flag-lesbian",
else if (month == 10 && day == 11) };
return "National Coming Out Day"; else if (month === 5 && day === 17)
else if (month == 10 && day == 17) return {
return "Genderfluid Visibility Week"; blurb: `Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a>`,
else if (month == 10 && day == 24) class: "flag-progress",
return "Ace Week"; };
else if (month == 10 && day == 26) else if (month === 5 && day === 19)
return "Intersex Awareness Day"; return {
blurb: `Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a>`,
class: "flag-agender",
};
else if (month === 5 && day === 25)
return {
blurb: `Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Awareness and Visibility Day</a>`,
class: "flag-pan",
};
else if (month === 6)
return {
blurb: `Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!`,
class: "flag-progress-intersex",
};
else if (month === 7 && day === 14)
return {
blurb: `Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>`,
class: "flag-nonbinary",
};
else if (month === 7 && day === 28)
return {
blurb: `Today is Leilukin's Birthday`
};
else if (month === 9 && day === 11)
return {
blurb: `Today is the ${leilukinsHubAnniversary}-year anniversary of the launch of Leilukin's Hub`
};
else if (month === 9 && day === 23)
return {
blurb: `Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>`,
class: "flag-bi",
};
else if (month === 10 && day === 8)
return {
blurb: `Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>`,
class: "flag-lesbian",
};
else if (month === 10 && day === 11)
return {
blurb: `Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>`,
class: "flag-rainbow",
};
else if (month === 10 && day === 17)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>`,
class: "flag-genderfluid",
};
else if (month === 10 && day === 24)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>`,
class: "flag-ace",
};
else if (month === 10 && day === 26)
return {
blurb: `Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>`,
class: "flag-intersex",
};
else else
return "No event"; return null;
}
function getBanner(day) {
switch (day) {
case "Zero Discrimination Day":
return "flag-progress-intersex";
break;
case "International Women's Day":
return "symbol-venus";
break;
case "Trans Day of Visibility":
return "flag-trans";
break;
case "International Asexuality Day":
return "flag-ace";
break;
case "Lesbian Visibility Day":
return "flag-lesbian";
break;
case "IDAHOBIT":
return "flag-progress";
break;
case "Agender Pride Day":
return "flag-agender";
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return "flag-pan";
break;
case "Pride Month":
return "flag-progress-intersex";
break;
case "Non-Binary People's Day":
return "flag-non-binary";
break;
case "Bi Visibility Day":
return "flag-bi";
break;
case "International Lesbian Day":
return "flag-lesbian";
break;
case "National Coming Out Day":
return "flag-rainbow";
break;
case "Genderfluid Visibility Week":
return "flag-genderfluid";
break;
case "Ace Week":
return "flag-ace";
break;
case "Intersex Awareness Day":
return "flag-intersex";
break;
default:
return "";
}
}
function getBlurbHtml(day) {
switch (day) {
case "Zero Discrimination Day":
return `
Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>
`;
break;
case "International Women's Day":
return `
Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day</a>
`;
break;
case "Trans Day of Visibility":
return `
Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>
`;
break;
case "International Asexuality Day":
return `
Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>
`;
break;
case "Lesbian Visibility Day":
return `
Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>
`;
break;
case "IDAHOBIT":
return `
Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a></span>
`;
break;
case "Agender Pride Day":
return `
Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a></span>
`;
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return `
Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Visibility Day</a>
`;
break;
case "Pride Month":
return `
Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!
`;
break;
case "Non-Binary People's Day":
return `
Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>
`;
break;
case "Leilukin's Birthday":
return `
Today is Leilukin's birthday
`;
break;
case "Leilukin's Hub Anniversary":
return `
Today is the anniversary of the launch of Leilukin's Hub
`;
break;
case "Bi Visibility Day":
return `
Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>
`;
break;
case "International Lesbian Day":
return `
Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>
`;
break;
case "National Coming Out Day":
return `
Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>
`;
break;
case "Genderfluid Visibility Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>
`;
break;
case "Ace Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>
`;
break;
case "Intersex Awareness Day":
return `
Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>
`;
break;
default:
return ``;
}
} }
</script> </script>

View File

@ -98,14 +98,12 @@
const todayEvent = getTodayEvent(); const todayEvent = getTodayEvent();
if (todayEvent != "No event") { if (todayEvent) {
heroTopBarEl.classList.remove('hidden'); heroTopBarEl.classList.remove('hidden');
heroTopBarEl.innerHTML = todayEvent.blurb;
if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { if (todayEvent.class) {
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); headerImgEl.classList.add(todayEvent.class);
} else {
headerImgEl.classList.add(getBanner(todayEvent));
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent);
} }
} }
@ -114,196 +112,100 @@
const month = date.getMonth() + 1; const month = date.getMonth() + 1;
const day = date.getDate(); const day = date.getDate();
if (month == 3 && day == 1) const currentYear = date.getFullYear();
return "Zero Discrimination Day"; const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear();
else if (month == 3 && day == 8) const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate;
return "International Women's Day";
else if (month == 3 && day == 31) if (month === 3 && day === 1)
return "Trans Day of Visibility"; return {
else if (month == 4 && day == 6) blurb: `Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>`,
return "International Asexuality Day"; class: "flag-progress-intersex",
else if (month == 4 && day == 26) };
return "Lesbian Visibility Day"; else if (month === 3 && day === 8)
else if (month == 5 && day == 17) return {
return "IDAHOBIT"; blurb: `Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day}</a>`,
else if (month == 5 && day == 19) class: "symbol-venus",
return "Agender Pride Day"; };
else if (month == 5 && day == 25) else if (month === 3 && day === 31)
return "Pansexual and Panromantic Awareness & Visibility Day"; return {
else if (month == 6) blurb: `Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>`,
return "Pride Month"; class: "flag-trans",
else if (month == 7 && day == 14) };
return "Non-Binary People's Day"; else if (month === 4 && day === 6)
else if (month == 7 && day == 28) return {
return "Leilukin's Birthday"; blurb: `Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>`,
else if (month == 9 && day == 11) class: "flag-ace",
return "Leilukin's Hub Anniversary"; };
else if (month == 9 && day == 23) else if (month === 4 && day === 26)
return "Bi Visibility Day"; return {
else if (month == 10 && day == 8) blurb: `Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>`,
return "International Lesbian Day"; class: "flag-lesbian",
else if (month == 10 && day == 11) };
return "National Coming Out Day"; else if (month === 5 && day === 17)
else if (month == 10 && day == 17) return {
return "Genderfluid Visibility Week"; blurb: `Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a>`,
else if (month == 10 && day == 24) class: "flag-progress",
return "Ace Week"; };
else if (month == 10 && day == 26) else if (month === 5 && day === 19)
return "Intersex Awareness Day"; return {
blurb: `Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a>`,
class: "flag-agender",
};
else if (month === 5 && day === 25)
return {
blurb: `Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Awareness and Visibility Day</a>`,
class: "flag-pan",
};
else if (month === 6)
return {
blurb: `Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!`,
class: "flag-progress-intersex",
};
else if (month === 7 && day === 14)
return {
blurb: `Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>`,
class: "flag-nonbinary",
};
else if (month === 7 && day === 28)
return {
blurb: `Today is Leilukin's Birthday`
};
else if (month === 9 && day === 11)
return {
blurb: `Today is the ${leilukinsHubAnniversary}-year anniversary of the launch of Leilukin's Hub`
};
else if (month === 9 && day === 23)
return {
blurb: `Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>`,
class: "flag-bi",
};
else if (month === 10 && day === 8)
return {
blurb: `Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>`,
class: "flag-lesbian",
};
else if (month === 10 && day === 11)
return {
blurb: `Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>`,
class: "flag-rainbow",
};
else if (month === 10 && day === 17)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>`,
class: "flag-genderfluid",
};
else if (month === 10 && day === 24)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>`,
class: "flag-ace",
};
else if (month === 10 && day === 26)
return {
blurb: `Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>`,
class: "flag-intersex",
};
else else
return "No event"; return null;
}
function getBanner(day) {
switch (day) {
case "Zero Discrimination Day":
return "flag-progress-intersex";
break;
case "International Women's Day":
return "symbol-venus";
break;
case "Trans Day of Visibility":
return "flag-trans";
break;
case "International Asexuality Day":
return "flag-ace";
break;
case "Lesbian Visibility Day":
return "flag-lesbian";
break;
case "IDAHOBIT":
return "flag-progress";
break;
case "Agender Pride Day":
return "flag-agender";
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return "flag-pan";
break;
case "Pride Month":
return "flag-progress-intersex";
break;
case "Non-Binary People's Day":
return "flag-non-binary";
break;
case "Bi Visibility Day":
return "flag-bi";
break;
case "International Lesbian Day":
return "flag-lesbian";
break;
case "National Coming Out Day":
return "flag-rainbow";
break;
case "Genderfluid Visibility Week":
return "flag-genderfluid";
break;
case "Ace Week":
return "flag-ace";
break;
case "Intersex Awareness Day":
return "flag-intersex";
break;
default:
return "";
}
}
function getBlurbHtml(day) {
switch (day) {
case "Zero Discrimination Day":
return `
Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>
`;
break;
case "International Women's Day":
return `
Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day</a>
`;
break;
case "Trans Day of Visibility":
return `
Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>
`;
break;
case "International Asexuality Day":
return `
Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>
`;
break;
case "Lesbian Visibility Day":
return `
Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>
`;
break;
case "IDAHOBIT":
return `
Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a></span>
`;
break;
case "Agender Pride Day":
return `
Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a></span>
`;
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return `
Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Visibility Day</a>
`;
break;
case "Pride Month":
return `
Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!
`;
break;
case "Non-Binary People's Day":
return `
Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>
`;
break;
case "Leilukin's Birthday":
return `
Today is Leilukin's birthday
`;
break;
case "Leilukin's Hub Anniversary":
return `
Today is the anniversary of the launch of Leilukin's Hub
`;
break;
case "Bi Visibility Day":
return `
Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>
`;
break;
case "International Lesbian Day":
return `
Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>
`;
break;
case "National Coming Out Day":
return `
Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>
`;
break;
case "Genderfluid Visibility Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>
`;
break;
case "Ace Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>
`;
break;
case "Intersex Awareness Day":
return `
Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>
`;
break;
default:
return ``;
}
} }
</script> </script>

View File

@ -98,14 +98,12 @@
const todayEvent = getTodayEvent(); const todayEvent = getTodayEvent();
if (todayEvent != "No event") { if (todayEvent) {
heroTopBarEl.classList.remove('hidden'); heroTopBarEl.classList.remove('hidden');
heroTopBarEl.innerHTML = todayEvent.blurb;
if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { if (todayEvent.class) {
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); headerImgEl.classList.add(todayEvent.class);
} else {
headerImgEl.classList.add(getBanner(todayEvent));
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent);
} }
} }
@ -114,196 +112,100 @@
const month = date.getMonth() + 1; const month = date.getMonth() + 1;
const day = date.getDate(); const day = date.getDate();
if (month == 3 && day == 1) const currentYear = date.getFullYear();
return "Zero Discrimination Day"; const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear();
else if (month == 3 && day == 8) const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate;
return "International Women's Day";
else if (month == 3 && day == 31) if (month === 3 && day === 1)
return "Trans Day of Visibility"; return {
else if (month == 4 && day == 6) blurb: `Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>`,
return "International Asexuality Day"; class: "flag-progress-intersex",
else if (month == 4 && day == 26) };
return "Lesbian Visibility Day"; else if (month === 3 && day === 8)
else if (month == 5 && day == 17) return {
return "IDAHOBIT"; blurb: `Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day}</a>`,
else if (month == 5 && day == 19) class: "symbol-venus",
return "Agender Pride Day"; };
else if (month == 5 && day == 25) else if (month === 3 && day === 31)
return "Pansexual and Panromantic Awareness & Visibility Day"; return {
else if (month == 6) blurb: `Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>`,
return "Pride Month"; class: "flag-trans",
else if (month == 7 && day == 14) };
return "Non-Binary People's Day"; else if (month === 4 && day === 6)
else if (month == 7 && day == 28) return {
return "Leilukin's Birthday"; blurb: `Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>`,
else if (month == 9 && day == 11) class: "flag-ace",
return "Leilukin's Hub Anniversary"; };
else if (month == 9 && day == 23) else if (month === 4 && day === 26)
return "Bi Visibility Day"; return {
else if (month == 10 && day == 8) blurb: `Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>`,
return "International Lesbian Day"; class: "flag-lesbian",
else if (month == 10 && day == 11) };
return "National Coming Out Day"; else if (month === 5 && day === 17)
else if (month == 10 && day == 17) return {
return "Genderfluid Visibility Week"; blurb: `Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a>`,
else if (month == 10 && day == 24) class: "flag-progress",
return "Ace Week"; };
else if (month == 10 && day == 26) else if (month === 5 && day === 19)
return "Intersex Awareness Day"; return {
blurb: `Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a>`,
class: "flag-agender",
};
else if (month === 5 && day === 25)
return {
blurb: `Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Awareness and Visibility Day</a>`,
class: "flag-pan",
};
else if (month === 6)
return {
blurb: `Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!`,
class: "flag-progress-intersex",
};
else if (month === 7 && day === 14)
return {
blurb: `Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>`,
class: "flag-nonbinary",
};
else if (month === 7 && day === 28)
return {
blurb: `Today is Leilukin's Birthday`
};
else if (month === 9 && day === 11)
return {
blurb: `Today is the ${leilukinsHubAnniversary}-year anniversary of the launch of Leilukin's Hub`
};
else if (month === 9 && day === 23)
return {
blurb: `Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>`,
class: "flag-bi",
};
else if (month === 10 && day === 8)
return {
blurb: `Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>`,
class: "flag-lesbian",
};
else if (month === 10 && day === 11)
return {
blurb: `Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>`,
class: "flag-rainbow",
};
else if (month === 10 && day === 17)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>`,
class: "flag-genderfluid",
};
else if (month === 10 && day === 24)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>`,
class: "flag-ace",
};
else if (month === 10 && day === 26)
return {
blurb: `Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>`,
class: "flag-intersex",
};
else else
return "No event"; return null;
}
function getBanner(day) {
switch (day) {
case "Zero Discrimination Day":
return "flag-progress-intersex";
break;
case "International Women's Day":
return "symbol-venus";
break;
case "Trans Day of Visibility":
return "flag-trans";
break;
case "International Asexuality Day":
return "flag-ace";
break;
case "Lesbian Visibility Day":
return "flag-lesbian";
break;
case "IDAHOBIT":
return "flag-progress";
break;
case "Agender Pride Day":
return "flag-agender";
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return "flag-pan";
break;
case "Pride Month":
return "flag-progress-intersex";
break;
case "Non-Binary People's Day":
return "flag-non-binary";
break;
case "Bi Visibility Day":
return "flag-bi";
break;
case "International Lesbian Day":
return "flag-lesbian";
break;
case "National Coming Out Day":
return "flag-rainbow";
break;
case "Genderfluid Visibility Week":
return "flag-genderfluid";
break;
case "Ace Week":
return "flag-ace";
break;
case "Intersex Awareness Day":
return "flag-intersex";
break;
default:
return "";
}
}
function getBlurbHtml(day) {
switch (day) {
case "Zero Discrimination Day":
return `
Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>
`;
break;
case "International Women's Day":
return `
Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day</a>
`;
break;
case "Trans Day of Visibility":
return `
Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>
`;
break;
case "International Asexuality Day":
return `
Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>
`;
break;
case "Lesbian Visibility Day":
return `
Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>
`;
break;
case "IDAHOBIT":
return `
Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a></span>
`;
break;
case "Agender Pride Day":
return `
Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a></span>
`;
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return `
Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Visibility Day</a>
`;
break;
case "Pride Month":
return `
Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!
`;
break;
case "Non-Binary People's Day":
return `
Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>
`;
break;
case "Leilukin's Birthday":
return `
Today is Leilukin's birthday
`;
break;
case "Leilukin's Hub Anniversary":
return `
Today is the anniversary of the launch of Leilukin's Hub
`;
break;
case "Bi Visibility Day":
return `
Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>
`;
break;
case "International Lesbian Day":
return `
Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>
`;
break;
case "National Coming Out Day":
return `
Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>
`;
break;
case "Genderfluid Visibility Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>
`;
break;
case "Ace Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>
`;
break;
case "Intersex Awareness Day":
return `
Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>
`;
break;
default:
return ``;
}
} }
</script> </script>

View File

@ -98,14 +98,12 @@
const todayEvent = getTodayEvent(); const todayEvent = getTodayEvent();
if (todayEvent != "No event") { if (todayEvent) {
heroTopBarEl.classList.remove('hidden'); heroTopBarEl.classList.remove('hidden');
heroTopBarEl.innerHTML = todayEvent.blurb;
if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { if (todayEvent.class) {
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); headerImgEl.classList.add(todayEvent.class);
} else {
headerImgEl.classList.add(getBanner(todayEvent));
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent);
} }
} }
@ -114,196 +112,100 @@
const month = date.getMonth() + 1; const month = date.getMonth() + 1;
const day = date.getDate(); const day = date.getDate();
if (month == 3 && day == 1) const currentYear = date.getFullYear();
return "Zero Discrimination Day"; const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear();
else if (month == 3 && day == 8) const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate;
return "International Women's Day";
else if (month == 3 && day == 31) if (month === 3 && day === 1)
return "Trans Day of Visibility"; return {
else if (month == 4 && day == 6) blurb: `Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>`,
return "International Asexuality Day"; class: "flag-progress-intersex",
else if (month == 4 && day == 26) };
return "Lesbian Visibility Day"; else if (month === 3 && day === 8)
else if (month == 5 && day == 17) return {
return "IDAHOBIT"; blurb: `Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day}</a>`,
else if (month == 5 && day == 19) class: "symbol-venus",
return "Agender Pride Day"; };
else if (month == 5 && day == 25) else if (month === 3 && day === 31)
return "Pansexual and Panromantic Awareness & Visibility Day"; return {
else if (month == 6) blurb: `Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>`,
return "Pride Month"; class: "flag-trans",
else if (month == 7 && day == 14) };
return "Non-Binary People's Day"; else if (month === 4 && day === 6)
else if (month == 7 && day == 28) return {
return "Leilukin's Birthday"; blurb: `Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>`,
else if (month == 9 && day == 11) class: "flag-ace",
return "Leilukin's Hub Anniversary"; };
else if (month == 9 && day == 23) else if (month === 4 && day === 26)
return "Bi Visibility Day"; return {
else if (month == 10 && day == 8) blurb: `Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>`,
return "International Lesbian Day"; class: "flag-lesbian",
else if (month == 10 && day == 11) };
return "National Coming Out Day"; else if (month === 5 && day === 17)
else if (month == 10 && day == 17) return {
return "Genderfluid Visibility Week"; blurb: `Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a>`,
else if (month == 10 && day == 24) class: "flag-progress",
return "Ace Week"; };
else if (month == 10 && day == 26) else if (month === 5 && day === 19)
return "Intersex Awareness Day"; return {
blurb: `Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a>`,
class: "flag-agender",
};
else if (month === 5 && day === 25)
return {
blurb: `Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Awareness and Visibility Day</a>`,
class: "flag-pan",
};
else if (month === 6)
return {
blurb: `Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!`,
class: "flag-progress-intersex",
};
else if (month === 7 && day === 14)
return {
blurb: `Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>`,
class: "flag-nonbinary",
};
else if (month === 7 && day === 28)
return {
blurb: `Today is Leilukin's Birthday`
};
else if (month === 9 && day === 11)
return {
blurb: `Today is the ${leilukinsHubAnniversary}-year anniversary of the launch of Leilukin's Hub`
};
else if (month === 9 && day === 23)
return {
blurb: `Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>`,
class: "flag-bi",
};
else if (month === 10 && day === 8)
return {
blurb: `Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>`,
class: "flag-lesbian",
};
else if (month === 10 && day === 11)
return {
blurb: `Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>`,
class: "flag-rainbow",
};
else if (month === 10 && day === 17)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>`,
class: "flag-genderfluid",
};
else if (month === 10 && day === 24)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>`,
class: "flag-ace",
};
else if (month === 10 && day === 26)
return {
blurb: `Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>`,
class: "flag-intersex",
};
else else
return "No event"; return null;
}
function getBanner(day) {
switch (day) {
case "Zero Discrimination Day":
return "flag-progress-intersex";
break;
case "International Women's Day":
return "symbol-venus";
break;
case "Trans Day of Visibility":
return "flag-trans";
break;
case "International Asexuality Day":
return "flag-ace";
break;
case "Lesbian Visibility Day":
return "flag-lesbian";
break;
case "IDAHOBIT":
return "flag-progress";
break;
case "Agender Pride Day":
return "flag-agender";
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return "flag-pan";
break;
case "Pride Month":
return "flag-progress-intersex";
break;
case "Non-Binary People's Day":
return "flag-non-binary";
break;
case "Bi Visibility Day":
return "flag-bi";
break;
case "International Lesbian Day":
return "flag-lesbian";
break;
case "National Coming Out Day":
return "flag-rainbow";
break;
case "Genderfluid Visibility Week":
return "flag-genderfluid";
break;
case "Ace Week":
return "flag-ace";
break;
case "Intersex Awareness Day":
return "flag-intersex";
break;
default:
return "";
}
}
function getBlurbHtml(day) {
switch (day) {
case "Zero Discrimination Day":
return `
Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>
`;
break;
case "International Women's Day":
return `
Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day</a>
`;
break;
case "Trans Day of Visibility":
return `
Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>
`;
break;
case "International Asexuality Day":
return `
Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>
`;
break;
case "Lesbian Visibility Day":
return `
Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>
`;
break;
case "IDAHOBIT":
return `
Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a></span>
`;
break;
case "Agender Pride Day":
return `
Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a></span>
`;
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return `
Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Visibility Day</a>
`;
break;
case "Pride Month":
return `
Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!
`;
break;
case "Non-Binary People's Day":
return `
Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>
`;
break;
case "Leilukin's Birthday":
return `
Today is Leilukin's birthday
`;
break;
case "Leilukin's Hub Anniversary":
return `
Today is the anniversary of the launch of Leilukin's Hub
`;
break;
case "Bi Visibility Day":
return `
Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>
`;
break;
case "International Lesbian Day":
return `
Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>
`;
break;
case "National Coming Out Day":
return `
Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>
`;
break;
case "Genderfluid Visibility Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>
`;
break;
case "Ace Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>
`;
break;
case "Intersex Awareness Day":
return `
Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>
`;
break;
default:
return ``;
}
} }
</script> </script>

View File

@ -98,14 +98,12 @@
const todayEvent = getTodayEvent(); const todayEvent = getTodayEvent();
if (todayEvent != "No event") { if (todayEvent) {
heroTopBarEl.classList.remove('hidden'); heroTopBarEl.classList.remove('hidden');
heroTopBarEl.innerHTML = todayEvent.blurb;
if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { if (todayEvent.class) {
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); headerImgEl.classList.add(todayEvent.class);
} else {
headerImgEl.classList.add(getBanner(todayEvent));
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent);
} }
} }
@ -114,196 +112,100 @@
const month = date.getMonth() + 1; const month = date.getMonth() + 1;
const day = date.getDate(); const day = date.getDate();
if (month == 3 && day == 1) const currentYear = date.getFullYear();
return "Zero Discrimination Day"; const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear();
else if (month == 3 && day == 8) const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate;
return "International Women's Day";
else if (month == 3 && day == 31) if (month === 3 && day === 1)
return "Trans Day of Visibility"; return {
else if (month == 4 && day == 6) blurb: `Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>`,
return "International Asexuality Day"; class: "flag-progress-intersex",
else if (month == 4 && day == 26) };
return "Lesbian Visibility Day"; else if (month === 3 && day === 8)
else if (month == 5 && day == 17) return {
return "IDAHOBIT"; blurb: `Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day}</a>`,
else if (month == 5 && day == 19) class: "symbol-venus",
return "Agender Pride Day"; };
else if (month == 5 && day == 25) else if (month === 3 && day === 31)
return "Pansexual and Panromantic Awareness & Visibility Day"; return {
else if (month == 6) blurb: `Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>`,
return "Pride Month"; class: "flag-trans",
else if (month == 7 && day == 14) };
return "Non-Binary People's Day"; else if (month === 4 && day === 6)
else if (month == 7 && day == 28) return {
return "Leilukin's Birthday"; blurb: `Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>`,
else if (month == 9 && day == 11) class: "flag-ace",
return "Leilukin's Hub Anniversary"; };
else if (month == 9 && day == 23) else if (month === 4 && day === 26)
return "Bi Visibility Day"; return {
else if (month == 10 && day == 8) blurb: `Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>`,
return "International Lesbian Day"; class: "flag-lesbian",
else if (month == 10 && day == 11) };
return "National Coming Out Day"; else if (month === 5 && day === 17)
else if (month == 10 && day == 17) return {
return "Genderfluid Visibility Week"; blurb: `Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a>`,
else if (month == 10 && day == 24) class: "flag-progress",
return "Ace Week"; };
else if (month == 10 && day == 26) else if (month === 5 && day === 19)
return "Intersex Awareness Day"; return {
blurb: `Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a>`,
class: "flag-agender",
};
else if (month === 5 && day === 25)
return {
blurb: `Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Awareness and Visibility Day</a>`,
class: "flag-pan",
};
else if (month === 6)
return {
blurb: `Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!`,
class: "flag-progress-intersex",
};
else if (month === 7 && day === 14)
return {
blurb: `Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>`,
class: "flag-nonbinary",
};
else if (month === 7 && day === 28)
return {
blurb: `Today is Leilukin's Birthday`
};
else if (month === 9 && day === 11)
return {
blurb: `Today is the ${leilukinsHubAnniversary}-year anniversary of the launch of Leilukin's Hub`
};
else if (month === 9 && day === 23)
return {
blurb: `Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>`,
class: "flag-bi",
};
else if (month === 10 && day === 8)
return {
blurb: `Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>`,
class: "flag-lesbian",
};
else if (month === 10 && day === 11)
return {
blurb: `Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>`,
class: "flag-rainbow",
};
else if (month === 10 && day === 17)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>`,
class: "flag-genderfluid",
};
else if (month === 10 && day === 24)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>`,
class: "flag-ace",
};
else if (month === 10 && day === 26)
return {
blurb: `Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>`,
class: "flag-intersex",
};
else else
return "No event"; return null;
}
function getBanner(day) {
switch (day) {
case "Zero Discrimination Day":
return "flag-progress-intersex";
break;
case "International Women's Day":
return "symbol-venus";
break;
case "Trans Day of Visibility":
return "flag-trans";
break;
case "International Asexuality Day":
return "flag-ace";
break;
case "Lesbian Visibility Day":
return "flag-lesbian";
break;
case "IDAHOBIT":
return "flag-progress";
break;
case "Agender Pride Day":
return "flag-agender";
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return "flag-pan";
break;
case "Pride Month":
return "flag-progress-intersex";
break;
case "Non-Binary People's Day":
return "flag-non-binary";
break;
case "Bi Visibility Day":
return "flag-bi";
break;
case "International Lesbian Day":
return "flag-lesbian";
break;
case "National Coming Out Day":
return "flag-rainbow";
break;
case "Genderfluid Visibility Week":
return "flag-genderfluid";
break;
case "Ace Week":
return "flag-ace";
break;
case "Intersex Awareness Day":
return "flag-intersex";
break;
default:
return "";
}
}
function getBlurbHtml(day) {
switch (day) {
case "Zero Discrimination Day":
return `
Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>
`;
break;
case "International Women's Day":
return `
Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day</a>
`;
break;
case "Trans Day of Visibility":
return `
Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>
`;
break;
case "International Asexuality Day":
return `
Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>
`;
break;
case "Lesbian Visibility Day":
return `
Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>
`;
break;
case "IDAHOBIT":
return `
Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a></span>
`;
break;
case "Agender Pride Day":
return `
Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a></span>
`;
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return `
Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Visibility Day</a>
`;
break;
case "Pride Month":
return `
Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!
`;
break;
case "Non-Binary People's Day":
return `
Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>
`;
break;
case "Leilukin's Birthday":
return `
Today is Leilukin's birthday
`;
break;
case "Leilukin's Hub Anniversary":
return `
Today is the anniversary of the launch of Leilukin's Hub
`;
break;
case "Bi Visibility Day":
return `
Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>
`;
break;
case "International Lesbian Day":
return `
Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>
`;
break;
case "National Coming Out Day":
return `
Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>
`;
break;
case "Genderfluid Visibility Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>
`;
break;
case "Ace Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>
`;
break;
case "Intersex Awareness Day":
return `
Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>
`;
break;
default:
return ``;
}
} }
</script> </script>

View File

@ -98,14 +98,12 @@
const todayEvent = getTodayEvent(); const todayEvent = getTodayEvent();
if (todayEvent != "No event") { if (todayEvent) {
heroTopBarEl.classList.remove('hidden'); heroTopBarEl.classList.remove('hidden');
heroTopBarEl.innerHTML = todayEvent.blurb;
if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { if (todayEvent.class) {
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); headerImgEl.classList.add(todayEvent.class);
} else {
headerImgEl.classList.add(getBanner(todayEvent));
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent);
} }
} }
@ -114,196 +112,100 @@
const month = date.getMonth() + 1; const month = date.getMonth() + 1;
const day = date.getDate(); const day = date.getDate();
if (month == 3 && day == 1) const currentYear = date.getFullYear();
return "Zero Discrimination Day"; const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear();
else if (month == 3 && day == 8) const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate;
return "International Women's Day";
else if (month == 3 && day == 31) if (month === 3 && day === 1)
return "Trans Day of Visibility"; return {
else if (month == 4 && day == 6) blurb: `Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>`,
return "International Asexuality Day"; class: "flag-progress-intersex",
else if (month == 4 && day == 26) };
return "Lesbian Visibility Day"; else if (month === 3 && day === 8)
else if (month == 5 && day == 17) return {
return "IDAHOBIT"; blurb: `Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day}</a>`,
else if (month == 5 && day == 19) class: "symbol-venus",
return "Agender Pride Day"; };
else if (month == 5 && day == 25) else if (month === 3 && day === 31)
return "Pansexual and Panromantic Awareness & Visibility Day"; return {
else if (month == 6) blurb: `Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>`,
return "Pride Month"; class: "flag-trans",
else if (month == 7 && day == 14) };
return "Non-Binary People's Day"; else if (month === 4 && day === 6)
else if (month == 7 && day == 28) return {
return "Leilukin's Birthday"; blurb: `Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>`,
else if (month == 9 && day == 11) class: "flag-ace",
return "Leilukin's Hub Anniversary"; };
else if (month == 9 && day == 23) else if (month === 4 && day === 26)
return "Bi Visibility Day"; return {
else if (month == 10 && day == 8) blurb: `Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>`,
return "International Lesbian Day"; class: "flag-lesbian",
else if (month == 10 && day == 11) };
return "National Coming Out Day"; else if (month === 5 && day === 17)
else if (month == 10 && day == 17) return {
return "Genderfluid Visibility Week"; blurb: `Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a>`,
else if (month == 10 && day == 24) class: "flag-progress",
return "Ace Week"; };
else if (month == 10 && day == 26) else if (month === 5 && day === 19)
return "Intersex Awareness Day"; return {
blurb: `Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a>`,
class: "flag-agender",
};
else if (month === 5 && day === 25)
return {
blurb: `Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Awareness and Visibility Day</a>`,
class: "flag-pan",
};
else if (month === 6)
return {
blurb: `Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!`,
class: "flag-progress-intersex",
};
else if (month === 7 && day === 14)
return {
blurb: `Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>`,
class: "flag-nonbinary",
};
else if (month === 7 && day === 28)
return {
blurb: `Today is Leilukin's Birthday`
};
else if (month === 9 && day === 11)
return {
blurb: `Today is the ${leilukinsHubAnniversary}-year anniversary of the launch of Leilukin's Hub`
};
else if (month === 9 && day === 23)
return {
blurb: `Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>`,
class: "flag-bi",
};
else if (month === 10 && day === 8)
return {
blurb: `Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>`,
class: "flag-lesbian",
};
else if (month === 10 && day === 11)
return {
blurb: `Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>`,
class: "flag-rainbow",
};
else if (month === 10 && day === 17)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>`,
class: "flag-genderfluid",
};
else if (month === 10 && day === 24)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>`,
class: "flag-ace",
};
else if (month === 10 && day === 26)
return {
blurb: `Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>`,
class: "flag-intersex",
};
else else
return "No event"; return null;
}
function getBanner(day) {
switch (day) {
case "Zero Discrimination Day":
return "flag-progress-intersex";
break;
case "International Women's Day":
return "symbol-venus";
break;
case "Trans Day of Visibility":
return "flag-trans";
break;
case "International Asexuality Day":
return "flag-ace";
break;
case "Lesbian Visibility Day":
return "flag-lesbian";
break;
case "IDAHOBIT":
return "flag-progress";
break;
case "Agender Pride Day":
return "flag-agender";
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return "flag-pan";
break;
case "Pride Month":
return "flag-progress-intersex";
break;
case "Non-Binary People's Day":
return "flag-non-binary";
break;
case "Bi Visibility Day":
return "flag-bi";
break;
case "International Lesbian Day":
return "flag-lesbian";
break;
case "National Coming Out Day":
return "flag-rainbow";
break;
case "Genderfluid Visibility Week":
return "flag-genderfluid";
break;
case "Ace Week":
return "flag-ace";
break;
case "Intersex Awareness Day":
return "flag-intersex";
break;
default:
return "";
}
}
function getBlurbHtml(day) {
switch (day) {
case "Zero Discrimination Day":
return `
Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>
`;
break;
case "International Women's Day":
return `
Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day</a>
`;
break;
case "Trans Day of Visibility":
return `
Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>
`;
break;
case "International Asexuality Day":
return `
Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>
`;
break;
case "Lesbian Visibility Day":
return `
Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>
`;
break;
case "IDAHOBIT":
return `
Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a></span>
`;
break;
case "Agender Pride Day":
return `
Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a></span>
`;
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return `
Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Visibility Day</a>
`;
break;
case "Pride Month":
return `
Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!
`;
break;
case "Non-Binary People's Day":
return `
Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>
`;
break;
case "Leilukin's Birthday":
return `
Today is Leilukin's birthday
`;
break;
case "Leilukin's Hub Anniversary":
return `
Today is the anniversary of the launch of Leilukin's Hub
`;
break;
case "Bi Visibility Day":
return `
Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>
`;
break;
case "International Lesbian Day":
return `
Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>
`;
break;
case "National Coming Out Day":
return `
Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>
`;
break;
case "Genderfluid Visibility Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>
`;
break;
case "Ace Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>
`;
break;
case "Intersex Awareness Day":
return `
Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>
`;
break;
default:
return ``;
}
} }
</script> </script>

View File

@ -98,14 +98,12 @@
const todayEvent = getTodayEvent(); const todayEvent = getTodayEvent();
if (todayEvent != "No event") { if (todayEvent) {
heroTopBarEl.classList.remove('hidden'); heroTopBarEl.classList.remove('hidden');
heroTopBarEl.innerHTML = todayEvent.blurb;
if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { if (todayEvent.class) {
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); headerImgEl.classList.add(todayEvent.class);
} else {
headerImgEl.classList.add(getBanner(todayEvent));
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent);
} }
} }
@ -114,196 +112,100 @@
const month = date.getMonth() + 1; const month = date.getMonth() + 1;
const day = date.getDate(); const day = date.getDate();
if (month == 3 && day == 1) const currentYear = date.getFullYear();
return "Zero Discrimination Day"; const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear();
else if (month == 3 && day == 8) const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate;
return "International Women's Day";
else if (month == 3 && day == 31) if (month === 3 && day === 1)
return "Trans Day of Visibility"; return {
else if (month == 4 && day == 6) blurb: `Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>`,
return "International Asexuality Day"; class: "flag-progress-intersex",
else if (month == 4 && day == 26) };
return "Lesbian Visibility Day"; else if (month === 3 && day === 8)
else if (month == 5 && day == 17) return {
return "IDAHOBIT"; blurb: `Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day}</a>`,
else if (month == 5 && day == 19) class: "symbol-venus",
return "Agender Pride Day"; };
else if (month == 5 && day == 25) else if (month === 3 && day === 31)
return "Pansexual and Panromantic Awareness & Visibility Day"; return {
else if (month == 6) blurb: `Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>`,
return "Pride Month"; class: "flag-trans",
else if (month == 7 && day == 14) };
return "Non-Binary People's Day"; else if (month === 4 && day === 6)
else if (month == 7 && day == 28) return {
return "Leilukin's Birthday"; blurb: `Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>`,
else if (month == 9 && day == 11) class: "flag-ace",
return "Leilukin's Hub Anniversary"; };
else if (month == 9 && day == 23) else if (month === 4 && day === 26)
return "Bi Visibility Day"; return {
else if (month == 10 && day == 8) blurb: `Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>`,
return "International Lesbian Day"; class: "flag-lesbian",
else if (month == 10 && day == 11) };
return "National Coming Out Day"; else if (month === 5 && day === 17)
else if (month == 10 && day == 17) return {
return "Genderfluid Visibility Week"; blurb: `Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a>`,
else if (month == 10 && day == 24) class: "flag-progress",
return "Ace Week"; };
else if (month == 10 && day == 26) else if (month === 5 && day === 19)
return "Intersex Awareness Day"; return {
blurb: `Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a>`,
class: "flag-agender",
};
else if (month === 5 && day === 25)
return {
blurb: `Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Awareness and Visibility Day</a>`,
class: "flag-pan",
};
else if (month === 6)
return {
blurb: `Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!`,
class: "flag-progress-intersex",
};
else if (month === 7 && day === 14)
return {
blurb: `Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>`,
class: "flag-nonbinary",
};
else if (month === 7 && day === 28)
return {
blurb: `Today is Leilukin's Birthday`
};
else if (month === 9 && day === 11)
return {
blurb: `Today is the ${leilukinsHubAnniversary}-year anniversary of the launch of Leilukin's Hub`
};
else if (month === 9 && day === 23)
return {
blurb: `Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>`,
class: "flag-bi",
};
else if (month === 10 && day === 8)
return {
blurb: `Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>`,
class: "flag-lesbian",
};
else if (month === 10 && day === 11)
return {
blurb: `Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>`,
class: "flag-rainbow",
};
else if (month === 10 && day === 17)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>`,
class: "flag-genderfluid",
};
else if (month === 10 && day === 24)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>`,
class: "flag-ace",
};
else if (month === 10 && day === 26)
return {
blurb: `Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>`,
class: "flag-intersex",
};
else else
return "No event"; return null;
}
function getBanner(day) {
switch (day) {
case "Zero Discrimination Day":
return "flag-progress-intersex";
break;
case "International Women's Day":
return "symbol-venus";
break;
case "Trans Day of Visibility":
return "flag-trans";
break;
case "International Asexuality Day":
return "flag-ace";
break;
case "Lesbian Visibility Day":
return "flag-lesbian";
break;
case "IDAHOBIT":
return "flag-progress";
break;
case "Agender Pride Day":
return "flag-agender";
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return "flag-pan";
break;
case "Pride Month":
return "flag-progress-intersex";
break;
case "Non-Binary People's Day":
return "flag-non-binary";
break;
case "Bi Visibility Day":
return "flag-bi";
break;
case "International Lesbian Day":
return "flag-lesbian";
break;
case "National Coming Out Day":
return "flag-rainbow";
break;
case "Genderfluid Visibility Week":
return "flag-genderfluid";
break;
case "Ace Week":
return "flag-ace";
break;
case "Intersex Awareness Day":
return "flag-intersex";
break;
default:
return "";
}
}
function getBlurbHtml(day) {
switch (day) {
case "Zero Discrimination Day":
return `
Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>
`;
break;
case "International Women's Day":
return `
Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day</a>
`;
break;
case "Trans Day of Visibility":
return `
Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>
`;
break;
case "International Asexuality Day":
return `
Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>
`;
break;
case "Lesbian Visibility Day":
return `
Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>
`;
break;
case "IDAHOBIT":
return `
Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a></span>
`;
break;
case "Agender Pride Day":
return `
Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a></span>
`;
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return `
Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Visibility Day</a>
`;
break;
case "Pride Month":
return `
Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!
`;
break;
case "Non-Binary People's Day":
return `
Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>
`;
break;
case "Leilukin's Birthday":
return `
Today is Leilukin's birthday
`;
break;
case "Leilukin's Hub Anniversary":
return `
Today is the anniversary of the launch of Leilukin's Hub
`;
break;
case "Bi Visibility Day":
return `
Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>
`;
break;
case "International Lesbian Day":
return `
Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>
`;
break;
case "National Coming Out Day":
return `
Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>
`;
break;
case "Genderfluid Visibility Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>
`;
break;
case "Ace Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>
`;
break;
case "Intersex Awareness Day":
return `
Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>
`;
break;
default:
return ``;
}
} }
</script> </script>

View File

@ -98,14 +98,12 @@
const todayEvent = getTodayEvent(); const todayEvent = getTodayEvent();
if (todayEvent != "No event") { if (todayEvent) {
heroTopBarEl.classList.remove('hidden'); heroTopBarEl.classList.remove('hidden');
heroTopBarEl.innerHTML = todayEvent.blurb;
if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { if (todayEvent.class) {
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); headerImgEl.classList.add(todayEvent.class);
} else {
headerImgEl.classList.add(getBanner(todayEvent));
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent);
} }
} }
@ -114,196 +112,100 @@
const month = date.getMonth() + 1; const month = date.getMonth() + 1;
const day = date.getDate(); const day = date.getDate();
if (month == 3 && day == 1) const currentYear = date.getFullYear();
return "Zero Discrimination Day"; const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear();
else if (month == 3 && day == 8) const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate;
return "International Women's Day";
else if (month == 3 && day == 31) if (month === 3 && day === 1)
return "Trans Day of Visibility"; return {
else if (month == 4 && day == 6) blurb: `Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>`,
return "International Asexuality Day"; class: "flag-progress-intersex",
else if (month == 4 && day == 26) };
return "Lesbian Visibility Day"; else if (month === 3 && day === 8)
else if (month == 5 && day == 17) return {
return "IDAHOBIT"; blurb: `Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day}</a>`,
else if (month == 5 && day == 19) class: "symbol-venus",
return "Agender Pride Day"; };
else if (month == 5 && day == 25) else if (month === 3 && day === 31)
return "Pansexual and Panromantic Awareness & Visibility Day"; return {
else if (month == 6) blurb: `Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>`,
return "Pride Month"; class: "flag-trans",
else if (month == 7 && day == 14) };
return "Non-Binary People's Day"; else if (month === 4 && day === 6)
else if (month == 7 && day == 28) return {
return "Leilukin's Birthday"; blurb: `Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>`,
else if (month == 9 && day == 11) class: "flag-ace",
return "Leilukin's Hub Anniversary"; };
else if (month == 9 && day == 23) else if (month === 4 && day === 26)
return "Bi Visibility Day"; return {
else if (month == 10 && day == 8) blurb: `Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>`,
return "International Lesbian Day"; class: "flag-lesbian",
else if (month == 10 && day == 11) };
return "National Coming Out Day"; else if (month === 5 && day === 17)
else if (month == 10 && day == 17) return {
return "Genderfluid Visibility Week"; blurb: `Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a>`,
else if (month == 10 && day == 24) class: "flag-progress",
return "Ace Week"; };
else if (month == 10 && day == 26) else if (month === 5 && day === 19)
return "Intersex Awareness Day"; return {
blurb: `Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a>`,
class: "flag-agender",
};
else if (month === 5 && day === 25)
return {
blurb: `Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Awareness and Visibility Day</a>`,
class: "flag-pan",
};
else if (month === 6)
return {
blurb: `Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!`,
class: "flag-progress-intersex",
};
else if (month === 7 && day === 14)
return {
blurb: `Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>`,
class: "flag-nonbinary",
};
else if (month === 7 && day === 28)
return {
blurb: `Today is Leilukin's Birthday`
};
else if (month === 9 && day === 11)
return {
blurb: `Today is the ${leilukinsHubAnniversary}-year anniversary of the launch of Leilukin's Hub`
};
else if (month === 9 && day === 23)
return {
blurb: `Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>`,
class: "flag-bi",
};
else if (month === 10 && day === 8)
return {
blurb: `Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>`,
class: "flag-lesbian",
};
else if (month === 10 && day === 11)
return {
blurb: `Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>`,
class: "flag-rainbow",
};
else if (month === 10 && day === 17)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>`,
class: "flag-genderfluid",
};
else if (month === 10 && day === 24)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>`,
class: "flag-ace",
};
else if (month === 10 && day === 26)
return {
blurb: `Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>`,
class: "flag-intersex",
};
else else
return "No event"; return null;
}
function getBanner(day) {
switch (day) {
case "Zero Discrimination Day":
return "flag-progress-intersex";
break;
case "International Women's Day":
return "symbol-venus";
break;
case "Trans Day of Visibility":
return "flag-trans";
break;
case "International Asexuality Day":
return "flag-ace";
break;
case "Lesbian Visibility Day":
return "flag-lesbian";
break;
case "IDAHOBIT":
return "flag-progress";
break;
case "Agender Pride Day":
return "flag-agender";
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return "flag-pan";
break;
case "Pride Month":
return "flag-progress-intersex";
break;
case "Non-Binary People's Day":
return "flag-non-binary";
break;
case "Bi Visibility Day":
return "flag-bi";
break;
case "International Lesbian Day":
return "flag-lesbian";
break;
case "National Coming Out Day":
return "flag-rainbow";
break;
case "Genderfluid Visibility Week":
return "flag-genderfluid";
break;
case "Ace Week":
return "flag-ace";
break;
case "Intersex Awareness Day":
return "flag-intersex";
break;
default:
return "";
}
}
function getBlurbHtml(day) {
switch (day) {
case "Zero Discrimination Day":
return `
Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>
`;
break;
case "International Women's Day":
return `
Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day</a>
`;
break;
case "Trans Day of Visibility":
return `
Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>
`;
break;
case "International Asexuality Day":
return `
Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>
`;
break;
case "Lesbian Visibility Day":
return `
Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>
`;
break;
case "IDAHOBIT":
return `
Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a></span>
`;
break;
case "Agender Pride Day":
return `
Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a></span>
`;
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return `
Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Visibility Day</a>
`;
break;
case "Pride Month":
return `
Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!
`;
break;
case "Non-Binary People's Day":
return `
Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>
`;
break;
case "Leilukin's Birthday":
return `
Today is Leilukin's birthday
`;
break;
case "Leilukin's Hub Anniversary":
return `
Today is the anniversary of the launch of Leilukin's Hub
`;
break;
case "Bi Visibility Day":
return `
Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>
`;
break;
case "International Lesbian Day":
return `
Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>
`;
break;
case "National Coming Out Day":
return `
Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>
`;
break;
case "Genderfluid Visibility Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>
`;
break;
case "Ace Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>
`;
break;
case "Intersex Awareness Day":
return `
Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>
`;
break;
default:
return ``;
}
} }
</script> </script>

View File

@ -98,14 +98,12 @@
const todayEvent = getTodayEvent(); const todayEvent = getTodayEvent();
if (todayEvent != "No event") { if (todayEvent) {
heroTopBarEl.classList.remove('hidden'); heroTopBarEl.classList.remove('hidden');
heroTopBarEl.innerHTML = todayEvent.blurb;
if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { if (todayEvent.class) {
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); headerImgEl.classList.add(todayEvent.class);
} else {
headerImgEl.classList.add(getBanner(todayEvent));
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent);
} }
} }
@ -114,196 +112,100 @@
const month = date.getMonth() + 1; const month = date.getMonth() + 1;
const day = date.getDate(); const day = date.getDate();
if (month == 3 && day == 1) const currentYear = date.getFullYear();
return "Zero Discrimination Day"; const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear();
else if (month == 3 && day == 8) const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate;
return "International Women's Day";
else if (month == 3 && day == 31) if (month === 3 && day === 1)
return "Trans Day of Visibility"; return {
else if (month == 4 && day == 6) blurb: `Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>`,
return "International Asexuality Day"; class: "flag-progress-intersex",
else if (month == 4 && day == 26) };
return "Lesbian Visibility Day"; else if (month === 3 && day === 8)
else if (month == 5 && day == 17) return {
return "IDAHOBIT"; blurb: `Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day}</a>`,
else if (month == 5 && day == 19) class: "symbol-venus",
return "Agender Pride Day"; };
else if (month == 5 && day == 25) else if (month === 3 && day === 31)
return "Pansexual and Panromantic Awareness & Visibility Day"; return {
else if (month == 6) blurb: `Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>`,
return "Pride Month"; class: "flag-trans",
else if (month == 7 && day == 14) };
return "Non-Binary People's Day"; else if (month === 4 && day === 6)
else if (month == 7 && day == 28) return {
return "Leilukin's Birthday"; blurb: `Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>`,
else if (month == 9 && day == 11) class: "flag-ace",
return "Leilukin's Hub Anniversary"; };
else if (month == 9 && day == 23) else if (month === 4 && day === 26)
return "Bi Visibility Day"; return {
else if (month == 10 && day == 8) blurb: `Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>`,
return "International Lesbian Day"; class: "flag-lesbian",
else if (month == 10 && day == 11) };
return "National Coming Out Day"; else if (month === 5 && day === 17)
else if (month == 10 && day == 17) return {
return "Genderfluid Visibility Week"; blurb: `Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a>`,
else if (month == 10 && day == 24) class: "flag-progress",
return "Ace Week"; };
else if (month == 10 && day == 26) else if (month === 5 && day === 19)
return "Intersex Awareness Day"; return {
blurb: `Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a>`,
class: "flag-agender",
};
else if (month === 5 && day === 25)
return {
blurb: `Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Awareness and Visibility Day</a>`,
class: "flag-pan",
};
else if (month === 6)
return {
blurb: `Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!`,
class: "flag-progress-intersex",
};
else if (month === 7 && day === 14)
return {
blurb: `Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>`,
class: "flag-nonbinary",
};
else if (month === 7 && day === 28)
return {
blurb: `Today is Leilukin's Birthday`
};
else if (month === 9 && day === 11)
return {
blurb: `Today is the ${leilukinsHubAnniversary}-year anniversary of the launch of Leilukin's Hub`
};
else if (month === 9 && day === 23)
return {
blurb: `Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>`,
class: "flag-bi",
};
else if (month === 10 && day === 8)
return {
blurb: `Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>`,
class: "flag-lesbian",
};
else if (month === 10 && day === 11)
return {
blurb: `Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>`,
class: "flag-rainbow",
};
else if (month === 10 && day === 17)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>`,
class: "flag-genderfluid",
};
else if (month === 10 && day === 24)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>`,
class: "flag-ace",
};
else if (month === 10 && day === 26)
return {
blurb: `Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>`,
class: "flag-intersex",
};
else else
return "No event"; return null;
}
function getBanner(day) {
switch (day) {
case "Zero Discrimination Day":
return "flag-progress-intersex";
break;
case "International Women's Day":
return "symbol-venus";
break;
case "Trans Day of Visibility":
return "flag-trans";
break;
case "International Asexuality Day":
return "flag-ace";
break;
case "Lesbian Visibility Day":
return "flag-lesbian";
break;
case "IDAHOBIT":
return "flag-progress";
break;
case "Agender Pride Day":
return "flag-agender";
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return "flag-pan";
break;
case "Pride Month":
return "flag-progress-intersex";
break;
case "Non-Binary People's Day":
return "flag-non-binary";
break;
case "Bi Visibility Day":
return "flag-bi";
break;
case "International Lesbian Day":
return "flag-lesbian";
break;
case "National Coming Out Day":
return "flag-rainbow";
break;
case "Genderfluid Visibility Week":
return "flag-genderfluid";
break;
case "Ace Week":
return "flag-ace";
break;
case "Intersex Awareness Day":
return "flag-intersex";
break;
default:
return "";
}
}
function getBlurbHtml(day) {
switch (day) {
case "Zero Discrimination Day":
return `
Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>
`;
break;
case "International Women's Day":
return `
Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day</a>
`;
break;
case "Trans Day of Visibility":
return `
Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>
`;
break;
case "International Asexuality Day":
return `
Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>
`;
break;
case "Lesbian Visibility Day":
return `
Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>
`;
break;
case "IDAHOBIT":
return `
Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a></span>
`;
break;
case "Agender Pride Day":
return `
Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a></span>
`;
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return `
Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Visibility Day</a>
`;
break;
case "Pride Month":
return `
Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!
`;
break;
case "Non-Binary People's Day":
return `
Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>
`;
break;
case "Leilukin's Birthday":
return `
Today is Leilukin's birthday
`;
break;
case "Leilukin's Hub Anniversary":
return `
Today is the anniversary of the launch of Leilukin's Hub
`;
break;
case "Bi Visibility Day":
return `
Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>
`;
break;
case "International Lesbian Day":
return `
Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>
`;
break;
case "National Coming Out Day":
return `
Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>
`;
break;
case "Genderfluid Visibility Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>
`;
break;
case "Ace Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>
`;
break;
case "Intersex Awareness Day":
return `
Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>
`;
break;
default:
return ``;
}
} }
</script> </script>

View File

@ -98,14 +98,12 @@
const todayEvent = getTodayEvent(); const todayEvent = getTodayEvent();
if (todayEvent != "No event") { if (todayEvent) {
heroTopBarEl.classList.remove('hidden'); heroTopBarEl.classList.remove('hidden');
heroTopBarEl.innerHTML = todayEvent.blurb;
if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { if (todayEvent.class) {
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); headerImgEl.classList.add(todayEvent.class);
} else {
headerImgEl.classList.add(getBanner(todayEvent));
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent);
} }
} }
@ -114,196 +112,100 @@
const month = date.getMonth() + 1; const month = date.getMonth() + 1;
const day = date.getDate(); const day = date.getDate();
if (month == 3 && day == 1) const currentYear = date.getFullYear();
return "Zero Discrimination Day"; const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear();
else if (month == 3 && day == 8) const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate;
return "International Women's Day";
else if (month == 3 && day == 31) if (month === 3 && day === 1)
return "Trans Day of Visibility"; return {
else if (month == 4 && day == 6) blurb: `Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>`,
return "International Asexuality Day"; class: "flag-progress-intersex",
else if (month == 4 && day == 26) };
return "Lesbian Visibility Day"; else if (month === 3 && day === 8)
else if (month == 5 && day == 17) return {
return "IDAHOBIT"; blurb: `Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day}</a>`,
else if (month == 5 && day == 19) class: "symbol-venus",
return "Agender Pride Day"; };
else if (month == 5 && day == 25) else if (month === 3 && day === 31)
return "Pansexual and Panromantic Awareness & Visibility Day"; return {
else if (month == 6) blurb: `Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>`,
return "Pride Month"; class: "flag-trans",
else if (month == 7 && day == 14) };
return "Non-Binary People's Day"; else if (month === 4 && day === 6)
else if (month == 7 && day == 28) return {
return "Leilukin's Birthday"; blurb: `Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>`,
else if (month == 9 && day == 11) class: "flag-ace",
return "Leilukin's Hub Anniversary"; };
else if (month == 9 && day == 23) else if (month === 4 && day === 26)
return "Bi Visibility Day"; return {
else if (month == 10 && day == 8) blurb: `Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>`,
return "International Lesbian Day"; class: "flag-lesbian",
else if (month == 10 && day == 11) };
return "National Coming Out Day"; else if (month === 5 && day === 17)
else if (month == 10 && day == 17) return {
return "Genderfluid Visibility Week"; blurb: `Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a>`,
else if (month == 10 && day == 24) class: "flag-progress",
return "Ace Week"; };
else if (month == 10 && day == 26) else if (month === 5 && day === 19)
return "Intersex Awareness Day"; return {
blurb: `Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a>`,
class: "flag-agender",
};
else if (month === 5 && day === 25)
return {
blurb: `Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Awareness and Visibility Day</a>`,
class: "flag-pan",
};
else if (month === 6)
return {
blurb: `Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!`,
class: "flag-progress-intersex",
};
else if (month === 7 && day === 14)
return {
blurb: `Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>`,
class: "flag-nonbinary",
};
else if (month === 7 && day === 28)
return {
blurb: `Today is Leilukin's Birthday`
};
else if (month === 9 && day === 11)
return {
blurb: `Today is the ${leilukinsHubAnniversary}-year anniversary of the launch of Leilukin's Hub`
};
else if (month === 9 && day === 23)
return {
blurb: `Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>`,
class: "flag-bi",
};
else if (month === 10 && day === 8)
return {
blurb: `Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>`,
class: "flag-lesbian",
};
else if (month === 10 && day === 11)
return {
blurb: `Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>`,
class: "flag-rainbow",
};
else if (month === 10 && day === 17)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>`,
class: "flag-genderfluid",
};
else if (month === 10 && day === 24)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>`,
class: "flag-ace",
};
else if (month === 10 && day === 26)
return {
blurb: `Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>`,
class: "flag-intersex",
};
else else
return "No event"; return null;
}
function getBanner(day) {
switch (day) {
case "Zero Discrimination Day":
return "flag-progress-intersex";
break;
case "International Women's Day":
return "symbol-venus";
break;
case "Trans Day of Visibility":
return "flag-trans";
break;
case "International Asexuality Day":
return "flag-ace";
break;
case "Lesbian Visibility Day":
return "flag-lesbian";
break;
case "IDAHOBIT":
return "flag-progress";
break;
case "Agender Pride Day":
return "flag-agender";
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return "flag-pan";
break;
case "Pride Month":
return "flag-progress-intersex";
break;
case "Non-Binary People's Day":
return "flag-non-binary";
break;
case "Bi Visibility Day":
return "flag-bi";
break;
case "International Lesbian Day":
return "flag-lesbian";
break;
case "National Coming Out Day":
return "flag-rainbow";
break;
case "Genderfluid Visibility Week":
return "flag-genderfluid";
break;
case "Ace Week":
return "flag-ace";
break;
case "Intersex Awareness Day":
return "flag-intersex";
break;
default:
return "";
}
}
function getBlurbHtml(day) {
switch (day) {
case "Zero Discrimination Day":
return `
Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>
`;
break;
case "International Women's Day":
return `
Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day</a>
`;
break;
case "Trans Day of Visibility":
return `
Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>
`;
break;
case "International Asexuality Day":
return `
Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>
`;
break;
case "Lesbian Visibility Day":
return `
Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>
`;
break;
case "IDAHOBIT":
return `
Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a></span>
`;
break;
case "Agender Pride Day":
return `
Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a></span>
`;
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return `
Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Visibility Day</a>
`;
break;
case "Pride Month":
return `
Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!
`;
break;
case "Non-Binary People's Day":
return `
Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>
`;
break;
case "Leilukin's Birthday":
return `
Today is Leilukin's birthday
`;
break;
case "Leilukin's Hub Anniversary":
return `
Today is the anniversary of the launch of Leilukin's Hub
`;
break;
case "Bi Visibility Day":
return `
Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>
`;
break;
case "International Lesbian Day":
return `
Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>
`;
break;
case "National Coming Out Day":
return `
Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>
`;
break;
case "Genderfluid Visibility Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>
`;
break;
case "Ace Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>
`;
break;
case "Intersex Awareness Day":
return `
Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>
`;
break;
default:
return ``;
}
} }
</script> </script>

View File

@ -98,14 +98,12 @@
const todayEvent = getTodayEvent(); const todayEvent = getTodayEvent();
if (todayEvent != "No event") { if (todayEvent) {
heroTopBarEl.classList.remove('hidden'); heroTopBarEl.classList.remove('hidden');
heroTopBarEl.innerHTML = todayEvent.blurb;
if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { if (todayEvent.class) {
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); headerImgEl.classList.add(todayEvent.class);
} else {
headerImgEl.classList.add(getBanner(todayEvent));
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent);
} }
} }
@ -114,196 +112,100 @@
const month = date.getMonth() + 1; const month = date.getMonth() + 1;
const day = date.getDate(); const day = date.getDate();
if (month == 3 && day == 1) const currentYear = date.getFullYear();
return "Zero Discrimination Day"; const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear();
else if (month == 3 && day == 8) const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate;
return "International Women's Day";
else if (month == 3 && day == 31) if (month === 3 && day === 1)
return "Trans Day of Visibility"; return {
else if (month == 4 && day == 6) blurb: `Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>`,
return "International Asexuality Day"; class: "flag-progress-intersex",
else if (month == 4 && day == 26) };
return "Lesbian Visibility Day"; else if (month === 3 && day === 8)
else if (month == 5 && day == 17) return {
return "IDAHOBIT"; blurb: `Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day}</a>`,
else if (month == 5 && day == 19) class: "symbol-venus",
return "Agender Pride Day"; };
else if (month == 5 && day == 25) else if (month === 3 && day === 31)
return "Pansexual and Panromantic Awareness & Visibility Day"; return {
else if (month == 6) blurb: `Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>`,
return "Pride Month"; class: "flag-trans",
else if (month == 7 && day == 14) };
return "Non-Binary People's Day"; else if (month === 4 && day === 6)
else if (month == 7 && day == 28) return {
return "Leilukin's Birthday"; blurb: `Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>`,
else if (month == 9 && day == 11) class: "flag-ace",
return "Leilukin's Hub Anniversary"; };
else if (month == 9 && day == 23) else if (month === 4 && day === 26)
return "Bi Visibility Day"; return {
else if (month == 10 && day == 8) blurb: `Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>`,
return "International Lesbian Day"; class: "flag-lesbian",
else if (month == 10 && day == 11) };
return "National Coming Out Day"; else if (month === 5 && day === 17)
else if (month == 10 && day == 17) return {
return "Genderfluid Visibility Week"; blurb: `Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a>`,
else if (month == 10 && day == 24) class: "flag-progress",
return "Ace Week"; };
else if (month == 10 && day == 26) else if (month === 5 && day === 19)
return "Intersex Awareness Day"; return {
blurb: `Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a>`,
class: "flag-agender",
};
else if (month === 5 && day === 25)
return {
blurb: `Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Awareness and Visibility Day</a>`,
class: "flag-pan",
};
else if (month === 6)
return {
blurb: `Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!`,
class: "flag-progress-intersex",
};
else if (month === 7 && day === 14)
return {
blurb: `Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>`,
class: "flag-nonbinary",
};
else if (month === 7 && day === 28)
return {
blurb: `Today is Leilukin's Birthday`
};
else if (month === 9 && day === 11)
return {
blurb: `Today is the ${leilukinsHubAnniversary}-year anniversary of the launch of Leilukin's Hub`
};
else if (month === 9 && day === 23)
return {
blurb: `Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>`,
class: "flag-bi",
};
else if (month === 10 && day === 8)
return {
blurb: `Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>`,
class: "flag-lesbian",
};
else if (month === 10 && day === 11)
return {
blurb: `Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>`,
class: "flag-rainbow",
};
else if (month === 10 && day === 17)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>`,
class: "flag-genderfluid",
};
else if (month === 10 && day === 24)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>`,
class: "flag-ace",
};
else if (month === 10 && day === 26)
return {
blurb: `Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>`,
class: "flag-intersex",
};
else else
return "No event"; return null;
}
function getBanner(day) {
switch (day) {
case "Zero Discrimination Day":
return "flag-progress-intersex";
break;
case "International Women's Day":
return "symbol-venus";
break;
case "Trans Day of Visibility":
return "flag-trans";
break;
case "International Asexuality Day":
return "flag-ace";
break;
case "Lesbian Visibility Day":
return "flag-lesbian";
break;
case "IDAHOBIT":
return "flag-progress";
break;
case "Agender Pride Day":
return "flag-agender";
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return "flag-pan";
break;
case "Pride Month":
return "flag-progress-intersex";
break;
case "Non-Binary People's Day":
return "flag-non-binary";
break;
case "Bi Visibility Day":
return "flag-bi";
break;
case "International Lesbian Day":
return "flag-lesbian";
break;
case "National Coming Out Day":
return "flag-rainbow";
break;
case "Genderfluid Visibility Week":
return "flag-genderfluid";
break;
case "Ace Week":
return "flag-ace";
break;
case "Intersex Awareness Day":
return "flag-intersex";
break;
default:
return "";
}
}
function getBlurbHtml(day) {
switch (day) {
case "Zero Discrimination Day":
return `
Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>
`;
break;
case "International Women's Day":
return `
Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day</a>
`;
break;
case "Trans Day of Visibility":
return `
Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>
`;
break;
case "International Asexuality Day":
return `
Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>
`;
break;
case "Lesbian Visibility Day":
return `
Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>
`;
break;
case "IDAHOBIT":
return `
Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a></span>
`;
break;
case "Agender Pride Day":
return `
Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a></span>
`;
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return `
Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Visibility Day</a>
`;
break;
case "Pride Month":
return `
Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!
`;
break;
case "Non-Binary People's Day":
return `
Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>
`;
break;
case "Leilukin's Birthday":
return `
Today is Leilukin's birthday
`;
break;
case "Leilukin's Hub Anniversary":
return `
Today is the anniversary of the launch of Leilukin's Hub
`;
break;
case "Bi Visibility Day":
return `
Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>
`;
break;
case "International Lesbian Day":
return `
Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>
`;
break;
case "National Coming Out Day":
return `
Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>
`;
break;
case "Genderfluid Visibility Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>
`;
break;
case "Ace Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>
`;
break;
case "Intersex Awareness Day":
return `
Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>
`;
break;
default:
return ``;
}
} }
</script> </script>

View File

@ -98,14 +98,12 @@
const todayEvent = getTodayEvent(); const todayEvent = getTodayEvent();
if (todayEvent != "No event") { if (todayEvent) {
heroTopBarEl.classList.remove('hidden'); heroTopBarEl.classList.remove('hidden');
heroTopBarEl.innerHTML = todayEvent.blurb;
if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { if (todayEvent.class) {
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); headerImgEl.classList.add(todayEvent.class);
} else {
headerImgEl.classList.add(getBanner(todayEvent));
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent);
} }
} }
@ -114,196 +112,100 @@
const month = date.getMonth() + 1; const month = date.getMonth() + 1;
const day = date.getDate(); const day = date.getDate();
if (month == 3 && day == 1) const currentYear = date.getFullYear();
return "Zero Discrimination Day"; const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear();
else if (month == 3 && day == 8) const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate;
return "International Women's Day";
else if (month == 3 && day == 31) if (month === 3 && day === 1)
return "Trans Day of Visibility"; return {
else if (month == 4 && day == 6) blurb: `Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>`,
return "International Asexuality Day"; class: "flag-progress-intersex",
else if (month == 4 && day == 26) };
return "Lesbian Visibility Day"; else if (month === 3 && day === 8)
else if (month == 5 && day == 17) return {
return "IDAHOBIT"; blurb: `Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day}</a>`,
else if (month == 5 && day == 19) class: "symbol-venus",
return "Agender Pride Day"; };
else if (month == 5 && day == 25) else if (month === 3 && day === 31)
return "Pansexual and Panromantic Awareness & Visibility Day"; return {
else if (month == 6) blurb: `Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>`,
return "Pride Month"; class: "flag-trans",
else if (month == 7 && day == 14) };
return "Non-Binary People's Day"; else if (month === 4 && day === 6)
else if (month == 7 && day == 28) return {
return "Leilukin's Birthday"; blurb: `Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>`,
else if (month == 9 && day == 11) class: "flag-ace",
return "Leilukin's Hub Anniversary"; };
else if (month == 9 && day == 23) else if (month === 4 && day === 26)
return "Bi Visibility Day"; return {
else if (month == 10 && day == 8) blurb: `Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>`,
return "International Lesbian Day"; class: "flag-lesbian",
else if (month == 10 && day == 11) };
return "National Coming Out Day"; else if (month === 5 && day === 17)
else if (month == 10 && day == 17) return {
return "Genderfluid Visibility Week"; blurb: `Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a>`,
else if (month == 10 && day == 24) class: "flag-progress",
return "Ace Week"; };
else if (month == 10 && day == 26) else if (month === 5 && day === 19)
return "Intersex Awareness Day"; return {
blurb: `Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a>`,
class: "flag-agender",
};
else if (month === 5 && day === 25)
return {
blurb: `Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Awareness and Visibility Day</a>`,
class: "flag-pan",
};
else if (month === 6)
return {
blurb: `Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!`,
class: "flag-progress-intersex",
};
else if (month === 7 && day === 14)
return {
blurb: `Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>`,
class: "flag-nonbinary",
};
else if (month === 7 && day === 28)
return {
blurb: `Today is Leilukin's Birthday`
};
else if (month === 9 && day === 11)
return {
blurb: `Today is the ${leilukinsHubAnniversary}-year anniversary of the launch of Leilukin's Hub`
};
else if (month === 9 && day === 23)
return {
blurb: `Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>`,
class: "flag-bi",
};
else if (month === 10 && day === 8)
return {
blurb: `Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>`,
class: "flag-lesbian",
};
else if (month === 10 && day === 11)
return {
blurb: `Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>`,
class: "flag-rainbow",
};
else if (month === 10 && day === 17)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>`,
class: "flag-genderfluid",
};
else if (month === 10 && day === 24)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>`,
class: "flag-ace",
};
else if (month === 10 && day === 26)
return {
blurb: `Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>`,
class: "flag-intersex",
};
else else
return "No event"; return null;
}
function getBanner(day) {
switch (day) {
case "Zero Discrimination Day":
return "flag-progress-intersex";
break;
case "International Women's Day":
return "symbol-venus";
break;
case "Trans Day of Visibility":
return "flag-trans";
break;
case "International Asexuality Day":
return "flag-ace";
break;
case "Lesbian Visibility Day":
return "flag-lesbian";
break;
case "IDAHOBIT":
return "flag-progress";
break;
case "Agender Pride Day":
return "flag-agender";
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return "flag-pan";
break;
case "Pride Month":
return "flag-progress-intersex";
break;
case "Non-Binary People's Day":
return "flag-non-binary";
break;
case "Bi Visibility Day":
return "flag-bi";
break;
case "International Lesbian Day":
return "flag-lesbian";
break;
case "National Coming Out Day":
return "flag-rainbow";
break;
case "Genderfluid Visibility Week":
return "flag-genderfluid";
break;
case "Ace Week":
return "flag-ace";
break;
case "Intersex Awareness Day":
return "flag-intersex";
break;
default:
return "";
}
}
function getBlurbHtml(day) {
switch (day) {
case "Zero Discrimination Day":
return `
Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>
`;
break;
case "International Women's Day":
return `
Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day</a>
`;
break;
case "Trans Day of Visibility":
return `
Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>
`;
break;
case "International Asexuality Day":
return `
Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>
`;
break;
case "Lesbian Visibility Day":
return `
Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>
`;
break;
case "IDAHOBIT":
return `
Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a></span>
`;
break;
case "Agender Pride Day":
return `
Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a></span>
`;
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return `
Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Visibility Day</a>
`;
break;
case "Pride Month":
return `
Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!
`;
break;
case "Non-Binary People's Day":
return `
Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>
`;
break;
case "Leilukin's Birthday":
return `
Today is Leilukin's birthday
`;
break;
case "Leilukin's Hub Anniversary":
return `
Today is the anniversary of the launch of Leilukin's Hub
`;
break;
case "Bi Visibility Day":
return `
Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>
`;
break;
case "International Lesbian Day":
return `
Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>
`;
break;
case "National Coming Out Day":
return `
Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>
`;
break;
case "Genderfluid Visibility Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>
`;
break;
case "Ace Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>
`;
break;
case "Intersex Awareness Day":
return `
Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>
`;
break;
default:
return ``;
}
} }
</script> </script>

View File

@ -98,14 +98,12 @@
const todayEvent = getTodayEvent(); const todayEvent = getTodayEvent();
if (todayEvent != "No event") { if (todayEvent) {
heroTopBarEl.classList.remove('hidden'); heroTopBarEl.classList.remove('hidden');
heroTopBarEl.innerHTML = todayEvent.blurb;
if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { if (todayEvent.class) {
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); headerImgEl.classList.add(todayEvent.class);
} else {
headerImgEl.classList.add(getBanner(todayEvent));
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent);
} }
} }
@ -114,196 +112,100 @@
const month = date.getMonth() + 1; const month = date.getMonth() + 1;
const day = date.getDate(); const day = date.getDate();
if (month == 3 && day == 1) const currentYear = date.getFullYear();
return "Zero Discrimination Day"; const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear();
else if (month == 3 && day == 8) const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate;
return "International Women's Day";
else if (month == 3 && day == 31) if (month === 3 && day === 1)
return "Trans Day of Visibility"; return {
else if (month == 4 && day == 6) blurb: `Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>`,
return "International Asexuality Day"; class: "flag-progress-intersex",
else if (month == 4 && day == 26) };
return "Lesbian Visibility Day"; else if (month === 3 && day === 8)
else if (month == 5 && day == 17) return {
return "IDAHOBIT"; blurb: `Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day}</a>`,
else if (month == 5 && day == 19) class: "symbol-venus",
return "Agender Pride Day"; };
else if (month == 5 && day == 25) else if (month === 3 && day === 31)
return "Pansexual and Panromantic Awareness & Visibility Day"; return {
else if (month == 6) blurb: `Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>`,
return "Pride Month"; class: "flag-trans",
else if (month == 7 && day == 14) };
return "Non-Binary People's Day"; else if (month === 4 && day === 6)
else if (month == 7 && day == 28) return {
return "Leilukin's Birthday"; blurb: `Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>`,
else if (month == 9 && day == 11) class: "flag-ace",
return "Leilukin's Hub Anniversary"; };
else if (month == 9 && day == 23) else if (month === 4 && day === 26)
return "Bi Visibility Day"; return {
else if (month == 10 && day == 8) blurb: `Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>`,
return "International Lesbian Day"; class: "flag-lesbian",
else if (month == 10 && day == 11) };
return "National Coming Out Day"; else if (month === 5 && day === 17)
else if (month == 10 && day == 17) return {
return "Genderfluid Visibility Week"; blurb: `Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a>`,
else if (month == 10 && day == 24) class: "flag-progress",
return "Ace Week"; };
else if (month == 10 && day == 26) else if (month === 5 && day === 19)
return "Intersex Awareness Day"; return {
blurb: `Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a>`,
class: "flag-agender",
};
else if (month === 5 && day === 25)
return {
blurb: `Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Awareness and Visibility Day</a>`,
class: "flag-pan",
};
else if (month === 6)
return {
blurb: `Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!`,
class: "flag-progress-intersex",
};
else if (month === 7 && day === 14)
return {
blurb: `Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>`,
class: "flag-nonbinary",
};
else if (month === 7 && day === 28)
return {
blurb: `Today is Leilukin's Birthday`
};
else if (month === 9 && day === 11)
return {
blurb: `Today is the ${leilukinsHubAnniversary}-year anniversary of the launch of Leilukin's Hub`
};
else if (month === 9 && day === 23)
return {
blurb: `Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>`,
class: "flag-bi",
};
else if (month === 10 && day === 8)
return {
blurb: `Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>`,
class: "flag-lesbian",
};
else if (month === 10 && day === 11)
return {
blurb: `Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>`,
class: "flag-rainbow",
};
else if (month === 10 && day === 17)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>`,
class: "flag-genderfluid",
};
else if (month === 10 && day === 24)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>`,
class: "flag-ace",
};
else if (month === 10 && day === 26)
return {
blurb: `Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>`,
class: "flag-intersex",
};
else else
return "No event"; return null;
}
function getBanner(day) {
switch (day) {
case "Zero Discrimination Day":
return "flag-progress-intersex";
break;
case "International Women's Day":
return "symbol-venus";
break;
case "Trans Day of Visibility":
return "flag-trans";
break;
case "International Asexuality Day":
return "flag-ace";
break;
case "Lesbian Visibility Day":
return "flag-lesbian";
break;
case "IDAHOBIT":
return "flag-progress";
break;
case "Agender Pride Day":
return "flag-agender";
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return "flag-pan";
break;
case "Pride Month":
return "flag-progress-intersex";
break;
case "Non-Binary People's Day":
return "flag-non-binary";
break;
case "Bi Visibility Day":
return "flag-bi";
break;
case "International Lesbian Day":
return "flag-lesbian";
break;
case "National Coming Out Day":
return "flag-rainbow";
break;
case "Genderfluid Visibility Week":
return "flag-genderfluid";
break;
case "Ace Week":
return "flag-ace";
break;
case "Intersex Awareness Day":
return "flag-intersex";
break;
default:
return "";
}
}
function getBlurbHtml(day) {
switch (day) {
case "Zero Discrimination Day":
return `
Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>
`;
break;
case "International Women's Day":
return `
Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day</a>
`;
break;
case "Trans Day of Visibility":
return `
Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>
`;
break;
case "International Asexuality Day":
return `
Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>
`;
break;
case "Lesbian Visibility Day":
return `
Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>
`;
break;
case "IDAHOBIT":
return `
Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a></span>
`;
break;
case "Agender Pride Day":
return `
Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a></span>
`;
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return `
Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Visibility Day</a>
`;
break;
case "Pride Month":
return `
Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!
`;
break;
case "Non-Binary People's Day":
return `
Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>
`;
break;
case "Leilukin's Birthday":
return `
Today is Leilukin's birthday
`;
break;
case "Leilukin's Hub Anniversary":
return `
Today is the anniversary of the launch of Leilukin's Hub
`;
break;
case "Bi Visibility Day":
return `
Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>
`;
break;
case "International Lesbian Day":
return `
Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>
`;
break;
case "National Coming Out Day":
return `
Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>
`;
break;
case "Genderfluid Visibility Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>
`;
break;
case "Ace Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>
`;
break;
case "Intersex Awareness Day":
return `
Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>
`;
break;
default:
return ``;
}
} }
</script> </script>

View File

@ -98,14 +98,12 @@
const todayEvent = getTodayEvent(); const todayEvent = getTodayEvent();
if (todayEvent != "No event") { if (todayEvent) {
heroTopBarEl.classList.remove('hidden'); heroTopBarEl.classList.remove('hidden');
heroTopBarEl.innerHTML = todayEvent.blurb;
if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { if (todayEvent.class) {
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); headerImgEl.classList.add(todayEvent.class);
} else {
headerImgEl.classList.add(getBanner(todayEvent));
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent);
} }
} }
@ -114,196 +112,100 @@
const month = date.getMonth() + 1; const month = date.getMonth() + 1;
const day = date.getDate(); const day = date.getDate();
if (month == 3 && day == 1) const currentYear = date.getFullYear();
return "Zero Discrimination Day"; const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear();
else if (month == 3 && day == 8) const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate;
return "International Women's Day";
else if (month == 3 && day == 31) if (month === 3 && day === 1)
return "Trans Day of Visibility"; return {
else if (month == 4 && day == 6) blurb: `Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>`,
return "International Asexuality Day"; class: "flag-progress-intersex",
else if (month == 4 && day == 26) };
return "Lesbian Visibility Day"; else if (month === 3 && day === 8)
else if (month == 5 && day == 17) return {
return "IDAHOBIT"; blurb: `Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day}</a>`,
else if (month == 5 && day == 19) class: "symbol-venus",
return "Agender Pride Day"; };
else if (month == 5 && day == 25) else if (month === 3 && day === 31)
return "Pansexual and Panromantic Awareness & Visibility Day"; return {
else if (month == 6) blurb: `Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>`,
return "Pride Month"; class: "flag-trans",
else if (month == 7 && day == 14) };
return "Non-Binary People's Day"; else if (month === 4 && day === 6)
else if (month == 7 && day == 28) return {
return "Leilukin's Birthday"; blurb: `Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>`,
else if (month == 9 && day == 11) class: "flag-ace",
return "Leilukin's Hub Anniversary"; };
else if (month == 9 && day == 23) else if (month === 4 && day === 26)
return "Bi Visibility Day"; return {
else if (month == 10 && day == 8) blurb: `Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>`,
return "International Lesbian Day"; class: "flag-lesbian",
else if (month == 10 && day == 11) };
return "National Coming Out Day"; else if (month === 5 && day === 17)
else if (month == 10 && day == 17) return {
return "Genderfluid Visibility Week"; blurb: `Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a>`,
else if (month == 10 && day == 24) class: "flag-progress",
return "Ace Week"; };
else if (month == 10 && day == 26) else if (month === 5 && day === 19)
return "Intersex Awareness Day"; return {
blurb: `Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a>`,
class: "flag-agender",
};
else if (month === 5 && day === 25)
return {
blurb: `Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Awareness and Visibility Day</a>`,
class: "flag-pan",
};
else if (month === 6)
return {
blurb: `Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!`,
class: "flag-progress-intersex",
};
else if (month === 7 && day === 14)
return {
blurb: `Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>`,
class: "flag-nonbinary",
};
else if (month === 7 && day === 28)
return {
blurb: `Today is Leilukin's Birthday`
};
else if (month === 9 && day === 11)
return {
blurb: `Today is the ${leilukinsHubAnniversary}-year anniversary of the launch of Leilukin's Hub`
};
else if (month === 9 && day === 23)
return {
blurb: `Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>`,
class: "flag-bi",
};
else if (month === 10 && day === 8)
return {
blurb: `Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>`,
class: "flag-lesbian",
};
else if (month === 10 && day === 11)
return {
blurb: `Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>`,
class: "flag-rainbow",
};
else if (month === 10 && day === 17)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>`,
class: "flag-genderfluid",
};
else if (month === 10 && day === 24)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>`,
class: "flag-ace",
};
else if (month === 10 && day === 26)
return {
blurb: `Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>`,
class: "flag-intersex",
};
else else
return "No event"; return null;
}
function getBanner(day) {
switch (day) {
case "Zero Discrimination Day":
return "flag-progress-intersex";
break;
case "International Women's Day":
return "symbol-venus";
break;
case "Trans Day of Visibility":
return "flag-trans";
break;
case "International Asexuality Day":
return "flag-ace";
break;
case "Lesbian Visibility Day":
return "flag-lesbian";
break;
case "IDAHOBIT":
return "flag-progress";
break;
case "Agender Pride Day":
return "flag-agender";
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return "flag-pan";
break;
case "Pride Month":
return "flag-progress-intersex";
break;
case "Non-Binary People's Day":
return "flag-non-binary";
break;
case "Bi Visibility Day":
return "flag-bi";
break;
case "International Lesbian Day":
return "flag-lesbian";
break;
case "National Coming Out Day":
return "flag-rainbow";
break;
case "Genderfluid Visibility Week":
return "flag-genderfluid";
break;
case "Ace Week":
return "flag-ace";
break;
case "Intersex Awareness Day":
return "flag-intersex";
break;
default:
return "";
}
}
function getBlurbHtml(day) {
switch (day) {
case "Zero Discrimination Day":
return `
Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>
`;
break;
case "International Women's Day":
return `
Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day</a>
`;
break;
case "Trans Day of Visibility":
return `
Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>
`;
break;
case "International Asexuality Day":
return `
Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>
`;
break;
case "Lesbian Visibility Day":
return `
Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>
`;
break;
case "IDAHOBIT":
return `
Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a></span>
`;
break;
case "Agender Pride Day":
return `
Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a></span>
`;
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return `
Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Visibility Day</a>
`;
break;
case "Pride Month":
return `
Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!
`;
break;
case "Non-Binary People's Day":
return `
Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>
`;
break;
case "Leilukin's Birthday":
return `
Today is Leilukin's birthday
`;
break;
case "Leilukin's Hub Anniversary":
return `
Today is the anniversary of the launch of Leilukin's Hub
`;
break;
case "Bi Visibility Day":
return `
Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>
`;
break;
case "International Lesbian Day":
return `
Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>
`;
break;
case "National Coming Out Day":
return `
Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>
`;
break;
case "Genderfluid Visibility Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>
`;
break;
case "Ace Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>
`;
break;
case "Intersex Awareness Day":
return `
Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>
`;
break;
default:
return ``;
}
} }
</script> </script>

View File

@ -98,14 +98,12 @@
const todayEvent = getTodayEvent(); const todayEvent = getTodayEvent();
if (todayEvent != "No event") { if (todayEvent) {
heroTopBarEl.classList.remove('hidden'); heroTopBarEl.classList.remove('hidden');
heroTopBarEl.innerHTML = todayEvent.blurb;
if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { if (todayEvent.class) {
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); headerImgEl.classList.add(todayEvent.class);
} else {
headerImgEl.classList.add(getBanner(todayEvent));
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent);
} }
} }
@ -114,196 +112,100 @@
const month = date.getMonth() + 1; const month = date.getMonth() + 1;
const day = date.getDate(); const day = date.getDate();
if (month == 3 && day == 1) const currentYear = date.getFullYear();
return "Zero Discrimination Day"; const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear();
else if (month == 3 && day == 8) const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate;
return "International Women's Day";
else if (month == 3 && day == 31) if (month === 3 && day === 1)
return "Trans Day of Visibility"; return {
else if (month == 4 && day == 6) blurb: `Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>`,
return "International Asexuality Day"; class: "flag-progress-intersex",
else if (month == 4 && day == 26) };
return "Lesbian Visibility Day"; else if (month === 3 && day === 8)
else if (month == 5 && day == 17) return {
return "IDAHOBIT"; blurb: `Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day}</a>`,
else if (month == 5 && day == 19) class: "symbol-venus",
return "Agender Pride Day"; };
else if (month == 5 && day == 25) else if (month === 3 && day === 31)
return "Pansexual and Panromantic Awareness & Visibility Day"; return {
else if (month == 6) blurb: `Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>`,
return "Pride Month"; class: "flag-trans",
else if (month == 7 && day == 14) };
return "Non-Binary People's Day"; else if (month === 4 && day === 6)
else if (month == 7 && day == 28) return {
return "Leilukin's Birthday"; blurb: `Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>`,
else if (month == 9 && day == 11) class: "flag-ace",
return "Leilukin's Hub Anniversary"; };
else if (month == 9 && day == 23) else if (month === 4 && day === 26)
return "Bi Visibility Day"; return {
else if (month == 10 && day == 8) blurb: `Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>`,
return "International Lesbian Day"; class: "flag-lesbian",
else if (month == 10 && day == 11) };
return "National Coming Out Day"; else if (month === 5 && day === 17)
else if (month == 10 && day == 17) return {
return "Genderfluid Visibility Week"; blurb: `Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a>`,
else if (month == 10 && day == 24) class: "flag-progress",
return "Ace Week"; };
else if (month == 10 && day == 26) else if (month === 5 && day === 19)
return "Intersex Awareness Day"; return {
blurb: `Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a>`,
class: "flag-agender",
};
else if (month === 5 && day === 25)
return {
blurb: `Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Awareness and Visibility Day</a>`,
class: "flag-pan",
};
else if (month === 6)
return {
blurb: `Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!`,
class: "flag-progress-intersex",
};
else if (month === 7 && day === 14)
return {
blurb: `Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>`,
class: "flag-nonbinary",
};
else if (month === 7 && day === 28)
return {
blurb: `Today is Leilukin's Birthday`
};
else if (month === 9 && day === 11)
return {
blurb: `Today is the ${leilukinsHubAnniversary}-year anniversary of the launch of Leilukin's Hub`
};
else if (month === 9 && day === 23)
return {
blurb: `Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>`,
class: "flag-bi",
};
else if (month === 10 && day === 8)
return {
blurb: `Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>`,
class: "flag-lesbian",
};
else if (month === 10 && day === 11)
return {
blurb: `Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>`,
class: "flag-rainbow",
};
else if (month === 10 && day === 17)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>`,
class: "flag-genderfluid",
};
else if (month === 10 && day === 24)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>`,
class: "flag-ace",
};
else if (month === 10 && day === 26)
return {
blurb: `Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>`,
class: "flag-intersex",
};
else else
return "No event"; return null;
}
function getBanner(day) {
switch (day) {
case "Zero Discrimination Day":
return "flag-progress-intersex";
break;
case "International Women's Day":
return "symbol-venus";
break;
case "Trans Day of Visibility":
return "flag-trans";
break;
case "International Asexuality Day":
return "flag-ace";
break;
case "Lesbian Visibility Day":
return "flag-lesbian";
break;
case "IDAHOBIT":
return "flag-progress";
break;
case "Agender Pride Day":
return "flag-agender";
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return "flag-pan";
break;
case "Pride Month":
return "flag-progress-intersex";
break;
case "Non-Binary People's Day":
return "flag-non-binary";
break;
case "Bi Visibility Day":
return "flag-bi";
break;
case "International Lesbian Day":
return "flag-lesbian";
break;
case "National Coming Out Day":
return "flag-rainbow";
break;
case "Genderfluid Visibility Week":
return "flag-genderfluid";
break;
case "Ace Week":
return "flag-ace";
break;
case "Intersex Awareness Day":
return "flag-intersex";
break;
default:
return "";
}
}
function getBlurbHtml(day) {
switch (day) {
case "Zero Discrimination Day":
return `
Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>
`;
break;
case "International Women's Day":
return `
Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day</a>
`;
break;
case "Trans Day of Visibility":
return `
Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>
`;
break;
case "International Asexuality Day":
return `
Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>
`;
break;
case "Lesbian Visibility Day":
return `
Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>
`;
break;
case "IDAHOBIT":
return `
Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a></span>
`;
break;
case "Agender Pride Day":
return `
Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a></span>
`;
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return `
Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Visibility Day</a>
`;
break;
case "Pride Month":
return `
Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!
`;
break;
case "Non-Binary People's Day":
return `
Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>
`;
break;
case "Leilukin's Birthday":
return `
Today is Leilukin's birthday
`;
break;
case "Leilukin's Hub Anniversary":
return `
Today is the anniversary of the launch of Leilukin's Hub
`;
break;
case "Bi Visibility Day":
return `
Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>
`;
break;
case "International Lesbian Day":
return `
Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>
`;
break;
case "National Coming Out Day":
return `
Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>
`;
break;
case "Genderfluid Visibility Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>
`;
break;
case "Ace Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>
`;
break;
case "Intersex Awareness Day":
return `
Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>
`;
break;
default:
return ``;
}
} }
</script> </script>

View File

@ -98,14 +98,12 @@
const todayEvent = getTodayEvent(); const todayEvent = getTodayEvent();
if (todayEvent != "No event") { if (todayEvent) {
heroTopBarEl.classList.remove('hidden'); heroTopBarEl.classList.remove('hidden');
heroTopBarEl.innerHTML = todayEvent.blurb;
if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { if (todayEvent.class) {
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); headerImgEl.classList.add(todayEvent.class);
} else {
headerImgEl.classList.add(getBanner(todayEvent));
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent);
} }
} }
@ -114,196 +112,100 @@
const month = date.getMonth() + 1; const month = date.getMonth() + 1;
const day = date.getDate(); const day = date.getDate();
if (month == 3 && day == 1) const currentYear = date.getFullYear();
return "Zero Discrimination Day"; const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear();
else if (month == 3 && day == 8) const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate;
return "International Women's Day";
else if (month == 3 && day == 31) if (month === 3 && day === 1)
return "Trans Day of Visibility"; return {
else if (month == 4 && day == 6) blurb: `Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>`,
return "International Asexuality Day"; class: "flag-progress-intersex",
else if (month == 4 && day == 26) };
return "Lesbian Visibility Day"; else if (month === 3 && day === 8)
else if (month == 5 && day == 17) return {
return "IDAHOBIT"; blurb: `Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day}</a>`,
else if (month == 5 && day == 19) class: "symbol-venus",
return "Agender Pride Day"; };
else if (month == 5 && day == 25) else if (month === 3 && day === 31)
return "Pansexual and Panromantic Awareness & Visibility Day"; return {
else if (month == 6) blurb: `Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>`,
return "Pride Month"; class: "flag-trans",
else if (month == 7 && day == 14) };
return "Non-Binary People's Day"; else if (month === 4 && day === 6)
else if (month == 7 && day == 28) return {
return "Leilukin's Birthday"; blurb: `Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>`,
else if (month == 9 && day == 11) class: "flag-ace",
return "Leilukin's Hub Anniversary"; };
else if (month == 9 && day == 23) else if (month === 4 && day === 26)
return "Bi Visibility Day"; return {
else if (month == 10 && day == 8) blurb: `Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>`,
return "International Lesbian Day"; class: "flag-lesbian",
else if (month == 10 && day == 11) };
return "National Coming Out Day"; else if (month === 5 && day === 17)
else if (month == 10 && day == 17) return {
return "Genderfluid Visibility Week"; blurb: `Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a>`,
else if (month == 10 && day == 24) class: "flag-progress",
return "Ace Week"; };
else if (month == 10 && day == 26) else if (month === 5 && day === 19)
return "Intersex Awareness Day"; return {
blurb: `Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a>`,
class: "flag-agender",
};
else if (month === 5 && day === 25)
return {
blurb: `Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Awareness and Visibility Day</a>`,
class: "flag-pan",
};
else if (month === 6)
return {
blurb: `Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!`,
class: "flag-progress-intersex",
};
else if (month === 7 && day === 14)
return {
blurb: `Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>`,
class: "flag-nonbinary",
};
else if (month === 7 && day === 28)
return {
blurb: `Today is Leilukin's Birthday`
};
else if (month === 9 && day === 11)
return {
blurb: `Today is the ${leilukinsHubAnniversary}-year anniversary of the launch of Leilukin's Hub`
};
else if (month === 9 && day === 23)
return {
blurb: `Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>`,
class: "flag-bi",
};
else if (month === 10 && day === 8)
return {
blurb: `Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>`,
class: "flag-lesbian",
};
else if (month === 10 && day === 11)
return {
blurb: `Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>`,
class: "flag-rainbow",
};
else if (month === 10 && day === 17)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>`,
class: "flag-genderfluid",
};
else if (month === 10 && day === 24)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>`,
class: "flag-ace",
};
else if (month === 10 && day === 26)
return {
blurb: `Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>`,
class: "flag-intersex",
};
else else
return "No event"; return null;
}
function getBanner(day) {
switch (day) {
case "Zero Discrimination Day":
return "flag-progress-intersex";
break;
case "International Women's Day":
return "symbol-venus";
break;
case "Trans Day of Visibility":
return "flag-trans";
break;
case "International Asexuality Day":
return "flag-ace";
break;
case "Lesbian Visibility Day":
return "flag-lesbian";
break;
case "IDAHOBIT":
return "flag-progress";
break;
case "Agender Pride Day":
return "flag-agender";
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return "flag-pan";
break;
case "Pride Month":
return "flag-progress-intersex";
break;
case "Non-Binary People's Day":
return "flag-non-binary";
break;
case "Bi Visibility Day":
return "flag-bi";
break;
case "International Lesbian Day":
return "flag-lesbian";
break;
case "National Coming Out Day":
return "flag-rainbow";
break;
case "Genderfluid Visibility Week":
return "flag-genderfluid";
break;
case "Ace Week":
return "flag-ace";
break;
case "Intersex Awareness Day":
return "flag-intersex";
break;
default:
return "";
}
}
function getBlurbHtml(day) {
switch (day) {
case "Zero Discrimination Day":
return `
Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>
`;
break;
case "International Women's Day":
return `
Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day</a>
`;
break;
case "Trans Day of Visibility":
return `
Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>
`;
break;
case "International Asexuality Day":
return `
Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>
`;
break;
case "Lesbian Visibility Day":
return `
Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>
`;
break;
case "IDAHOBIT":
return `
Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a></span>
`;
break;
case "Agender Pride Day":
return `
Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a></span>
`;
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return `
Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Visibility Day</a>
`;
break;
case "Pride Month":
return `
Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!
`;
break;
case "Non-Binary People's Day":
return `
Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>
`;
break;
case "Leilukin's Birthday":
return `
Today is Leilukin's birthday
`;
break;
case "Leilukin's Hub Anniversary":
return `
Today is the anniversary of the launch of Leilukin's Hub
`;
break;
case "Bi Visibility Day":
return `
Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>
`;
break;
case "International Lesbian Day":
return `
Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>
`;
break;
case "National Coming Out Day":
return `
Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>
`;
break;
case "Genderfluid Visibility Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>
`;
break;
case "Ace Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>
`;
break;
case "Intersex Awareness Day":
return `
Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>
`;
break;
default:
return ``;
}
} }
</script> </script>

View File

@ -98,14 +98,12 @@
const todayEvent = getTodayEvent(); const todayEvent = getTodayEvent();
if (todayEvent != "No event") { if (todayEvent) {
heroTopBarEl.classList.remove('hidden'); heroTopBarEl.classList.remove('hidden');
heroTopBarEl.innerHTML = todayEvent.blurb;
if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { if (todayEvent.class) {
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); headerImgEl.classList.add(todayEvent.class);
} else {
headerImgEl.classList.add(getBanner(todayEvent));
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent);
} }
} }
@ -114,196 +112,100 @@
const month = date.getMonth() + 1; const month = date.getMonth() + 1;
const day = date.getDate(); const day = date.getDate();
if (month == 3 && day == 1) const currentYear = date.getFullYear();
return "Zero Discrimination Day"; const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear();
else if (month == 3 && day == 8) const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate;
return "International Women's Day";
else if (month == 3 && day == 31) if (month === 3 && day === 1)
return "Trans Day of Visibility"; return {
else if (month == 4 && day == 6) blurb: `Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>`,
return "International Asexuality Day"; class: "flag-progress-intersex",
else if (month == 4 && day == 26) };
return "Lesbian Visibility Day"; else if (month === 3 && day === 8)
else if (month == 5 && day == 17) return {
return "IDAHOBIT"; blurb: `Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day}</a>`,
else if (month == 5 && day == 19) class: "symbol-venus",
return "Agender Pride Day"; };
else if (month == 5 && day == 25) else if (month === 3 && day === 31)
return "Pansexual and Panromantic Awareness & Visibility Day"; return {
else if (month == 6) blurb: `Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>`,
return "Pride Month"; class: "flag-trans",
else if (month == 7 && day == 14) };
return "Non-Binary People's Day"; else if (month === 4 && day === 6)
else if (month == 7 && day == 28) return {
return "Leilukin's Birthday"; blurb: `Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>`,
else if (month == 9 && day == 11) class: "flag-ace",
return "Leilukin's Hub Anniversary"; };
else if (month == 9 && day == 23) else if (month === 4 && day === 26)
return "Bi Visibility Day"; return {
else if (month == 10 && day == 8) blurb: `Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>`,
return "International Lesbian Day"; class: "flag-lesbian",
else if (month == 10 && day == 11) };
return "National Coming Out Day"; else if (month === 5 && day === 17)
else if (month == 10 && day == 17) return {
return "Genderfluid Visibility Week"; blurb: `Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a>`,
else if (month == 10 && day == 24) class: "flag-progress",
return "Ace Week"; };
else if (month == 10 && day == 26) else if (month === 5 && day === 19)
return "Intersex Awareness Day"; return {
blurb: `Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a>`,
class: "flag-agender",
};
else if (month === 5 && day === 25)
return {
blurb: `Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Awareness and Visibility Day</a>`,
class: "flag-pan",
};
else if (month === 6)
return {
blurb: `Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!`,
class: "flag-progress-intersex",
};
else if (month === 7 && day === 14)
return {
blurb: `Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>`,
class: "flag-nonbinary",
};
else if (month === 7 && day === 28)
return {
blurb: `Today is Leilukin's Birthday`
};
else if (month === 9 && day === 11)
return {
blurb: `Today is the ${leilukinsHubAnniversary}-year anniversary of the launch of Leilukin's Hub`
};
else if (month === 9 && day === 23)
return {
blurb: `Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>`,
class: "flag-bi",
};
else if (month === 10 && day === 8)
return {
blurb: `Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>`,
class: "flag-lesbian",
};
else if (month === 10 && day === 11)
return {
blurb: `Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>`,
class: "flag-rainbow",
};
else if (month === 10 && day === 17)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>`,
class: "flag-genderfluid",
};
else if (month === 10 && day === 24)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>`,
class: "flag-ace",
};
else if (month === 10 && day === 26)
return {
blurb: `Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>`,
class: "flag-intersex",
};
else else
return "No event"; return null;
}
function getBanner(day) {
switch (day) {
case "Zero Discrimination Day":
return "flag-progress-intersex";
break;
case "International Women's Day":
return "symbol-venus";
break;
case "Trans Day of Visibility":
return "flag-trans";
break;
case "International Asexuality Day":
return "flag-ace";
break;
case "Lesbian Visibility Day":
return "flag-lesbian";
break;
case "IDAHOBIT":
return "flag-progress";
break;
case "Agender Pride Day":
return "flag-agender";
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return "flag-pan";
break;
case "Pride Month":
return "flag-progress-intersex";
break;
case "Non-Binary People's Day":
return "flag-non-binary";
break;
case "Bi Visibility Day":
return "flag-bi";
break;
case "International Lesbian Day":
return "flag-lesbian";
break;
case "National Coming Out Day":
return "flag-rainbow";
break;
case "Genderfluid Visibility Week":
return "flag-genderfluid";
break;
case "Ace Week":
return "flag-ace";
break;
case "Intersex Awareness Day":
return "flag-intersex";
break;
default:
return "";
}
}
function getBlurbHtml(day) {
switch (day) {
case "Zero Discrimination Day":
return `
Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>
`;
break;
case "International Women's Day":
return `
Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day</a>
`;
break;
case "Trans Day of Visibility":
return `
Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>
`;
break;
case "International Asexuality Day":
return `
Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>
`;
break;
case "Lesbian Visibility Day":
return `
Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>
`;
break;
case "IDAHOBIT":
return `
Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a></span>
`;
break;
case "Agender Pride Day":
return `
Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a></span>
`;
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return `
Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Visibility Day</a>
`;
break;
case "Pride Month":
return `
Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!
`;
break;
case "Non-Binary People's Day":
return `
Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>
`;
break;
case "Leilukin's Birthday":
return `
Today is Leilukin's birthday
`;
break;
case "Leilukin's Hub Anniversary":
return `
Today is the anniversary of the launch of Leilukin's Hub
`;
break;
case "Bi Visibility Day":
return `
Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>
`;
break;
case "International Lesbian Day":
return `
Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>
`;
break;
case "National Coming Out Day":
return `
Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>
`;
break;
case "Genderfluid Visibility Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>
`;
break;
case "Ace Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>
`;
break;
case "Intersex Awareness Day":
return `
Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>
`;
break;
default:
return ``;
}
} }
</script> </script>

View File

@ -98,14 +98,12 @@
const todayEvent = getTodayEvent(); const todayEvent = getTodayEvent();
if (todayEvent != "No event") { if (todayEvent) {
heroTopBarEl.classList.remove('hidden'); heroTopBarEl.classList.remove('hidden');
heroTopBarEl.innerHTML = todayEvent.blurb;
if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { if (todayEvent.class) {
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); headerImgEl.classList.add(todayEvent.class);
} else {
headerImgEl.classList.add(getBanner(todayEvent));
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent);
} }
} }
@ -114,196 +112,100 @@
const month = date.getMonth() + 1; const month = date.getMonth() + 1;
const day = date.getDate(); const day = date.getDate();
if (month == 3 && day == 1) const currentYear = date.getFullYear();
return "Zero Discrimination Day"; const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear();
else if (month == 3 && day == 8) const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate;
return "International Women's Day";
else if (month == 3 && day == 31) if (month === 3 && day === 1)
return "Trans Day of Visibility"; return {
else if (month == 4 && day == 6) blurb: `Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>`,
return "International Asexuality Day"; class: "flag-progress-intersex",
else if (month == 4 && day == 26) };
return "Lesbian Visibility Day"; else if (month === 3 && day === 8)
else if (month == 5 && day == 17) return {
return "IDAHOBIT"; blurb: `Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day}</a>`,
else if (month == 5 && day == 19) class: "symbol-venus",
return "Agender Pride Day"; };
else if (month == 5 && day == 25) else if (month === 3 && day === 31)
return "Pansexual and Panromantic Awareness & Visibility Day"; return {
else if (month == 6) blurb: `Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>`,
return "Pride Month"; class: "flag-trans",
else if (month == 7 && day == 14) };
return "Non-Binary People's Day"; else if (month === 4 && day === 6)
else if (month == 7 && day == 28) return {
return "Leilukin's Birthday"; blurb: `Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>`,
else if (month == 9 && day == 11) class: "flag-ace",
return "Leilukin's Hub Anniversary"; };
else if (month == 9 && day == 23) else if (month === 4 && day === 26)
return "Bi Visibility Day"; return {
else if (month == 10 && day == 8) blurb: `Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>`,
return "International Lesbian Day"; class: "flag-lesbian",
else if (month == 10 && day == 11) };
return "National Coming Out Day"; else if (month === 5 && day === 17)
else if (month == 10 && day == 17) return {
return "Genderfluid Visibility Week"; blurb: `Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a>`,
else if (month == 10 && day == 24) class: "flag-progress",
return "Ace Week"; };
else if (month == 10 && day == 26) else if (month === 5 && day === 19)
return "Intersex Awareness Day"; return {
blurb: `Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a>`,
class: "flag-agender",
};
else if (month === 5 && day === 25)
return {
blurb: `Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Awareness and Visibility Day</a>`,
class: "flag-pan",
};
else if (month === 6)
return {
blurb: `Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!`,
class: "flag-progress-intersex",
};
else if (month === 7 && day === 14)
return {
blurb: `Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>`,
class: "flag-nonbinary",
};
else if (month === 7 && day === 28)
return {
blurb: `Today is Leilukin's Birthday`
};
else if (month === 9 && day === 11)
return {
blurb: `Today is the ${leilukinsHubAnniversary}-year anniversary of the launch of Leilukin's Hub`
};
else if (month === 9 && day === 23)
return {
blurb: `Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>`,
class: "flag-bi",
};
else if (month === 10 && day === 8)
return {
blurb: `Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>`,
class: "flag-lesbian",
};
else if (month === 10 && day === 11)
return {
blurb: `Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>`,
class: "flag-rainbow",
};
else if (month === 10 && day === 17)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>`,
class: "flag-genderfluid",
};
else if (month === 10 && day === 24)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>`,
class: "flag-ace",
};
else if (month === 10 && day === 26)
return {
blurb: `Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>`,
class: "flag-intersex",
};
else else
return "No event"; return null;
}
function getBanner(day) {
switch (day) {
case "Zero Discrimination Day":
return "flag-progress-intersex";
break;
case "International Women's Day":
return "symbol-venus";
break;
case "Trans Day of Visibility":
return "flag-trans";
break;
case "International Asexuality Day":
return "flag-ace";
break;
case "Lesbian Visibility Day":
return "flag-lesbian";
break;
case "IDAHOBIT":
return "flag-progress";
break;
case "Agender Pride Day":
return "flag-agender";
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return "flag-pan";
break;
case "Pride Month":
return "flag-progress-intersex";
break;
case "Non-Binary People's Day":
return "flag-non-binary";
break;
case "Bi Visibility Day":
return "flag-bi";
break;
case "International Lesbian Day":
return "flag-lesbian";
break;
case "National Coming Out Day":
return "flag-rainbow";
break;
case "Genderfluid Visibility Week":
return "flag-genderfluid";
break;
case "Ace Week":
return "flag-ace";
break;
case "Intersex Awareness Day":
return "flag-intersex";
break;
default:
return "";
}
}
function getBlurbHtml(day) {
switch (day) {
case "Zero Discrimination Day":
return `
Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>
`;
break;
case "International Women's Day":
return `
Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day</a>
`;
break;
case "Trans Day of Visibility":
return `
Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>
`;
break;
case "International Asexuality Day":
return `
Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>
`;
break;
case "Lesbian Visibility Day":
return `
Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>
`;
break;
case "IDAHOBIT":
return `
Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a></span>
`;
break;
case "Agender Pride Day":
return `
Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a></span>
`;
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return `
Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Visibility Day</a>
`;
break;
case "Pride Month":
return `
Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!
`;
break;
case "Non-Binary People's Day":
return `
Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>
`;
break;
case "Leilukin's Birthday":
return `
Today is Leilukin's birthday
`;
break;
case "Leilukin's Hub Anniversary":
return `
Today is the anniversary of the launch of Leilukin's Hub
`;
break;
case "Bi Visibility Day":
return `
Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>
`;
break;
case "International Lesbian Day":
return `
Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>
`;
break;
case "National Coming Out Day":
return `
Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>
`;
break;
case "Genderfluid Visibility Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>
`;
break;
case "Ace Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>
`;
break;
case "Intersex Awareness Day":
return `
Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>
`;
break;
default:
return ``;
}
} }
</script> </script>

View File

@ -98,14 +98,12 @@
const todayEvent = getTodayEvent(); const todayEvent = getTodayEvent();
if (todayEvent != "No event") { if (todayEvent) {
heroTopBarEl.classList.remove('hidden'); heroTopBarEl.classList.remove('hidden');
heroTopBarEl.innerHTML = todayEvent.blurb;
if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { if (todayEvent.class) {
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); headerImgEl.classList.add(todayEvent.class);
} else {
headerImgEl.classList.add(getBanner(todayEvent));
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent);
} }
} }
@ -114,196 +112,100 @@
const month = date.getMonth() + 1; const month = date.getMonth() + 1;
const day = date.getDate(); const day = date.getDate();
if (month == 3 && day == 1) const currentYear = date.getFullYear();
return "Zero Discrimination Day"; const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear();
else if (month == 3 && day == 8) const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate;
return "International Women's Day";
else if (month == 3 && day == 31) if (month === 3 && day === 1)
return "Trans Day of Visibility"; return {
else if (month == 4 && day == 6) blurb: `Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>`,
return "International Asexuality Day"; class: "flag-progress-intersex",
else if (month == 4 && day == 26) };
return "Lesbian Visibility Day"; else if (month === 3 && day === 8)
else if (month == 5 && day == 17) return {
return "IDAHOBIT"; blurb: `Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day}</a>`,
else if (month == 5 && day == 19) class: "symbol-venus",
return "Agender Pride Day"; };
else if (month == 5 && day == 25) else if (month === 3 && day === 31)
return "Pansexual and Panromantic Awareness & Visibility Day"; return {
else if (month == 6) blurb: `Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>`,
return "Pride Month"; class: "flag-trans",
else if (month == 7 && day == 14) };
return "Non-Binary People's Day"; else if (month === 4 && day === 6)
else if (month == 7 && day == 28) return {
return "Leilukin's Birthday"; blurb: `Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>`,
else if (month == 9 && day == 11) class: "flag-ace",
return "Leilukin's Hub Anniversary"; };
else if (month == 9 && day == 23) else if (month === 4 && day === 26)
return "Bi Visibility Day"; return {
else if (month == 10 && day == 8) blurb: `Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>`,
return "International Lesbian Day"; class: "flag-lesbian",
else if (month == 10 && day == 11) };
return "National Coming Out Day"; else if (month === 5 && day === 17)
else if (month == 10 && day == 17) return {
return "Genderfluid Visibility Week"; blurb: `Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a>`,
else if (month == 10 && day == 24) class: "flag-progress",
return "Ace Week"; };
else if (month == 10 && day == 26) else if (month === 5 && day === 19)
return "Intersex Awareness Day"; return {
blurb: `Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a>`,
class: "flag-agender",
};
else if (month === 5 && day === 25)
return {
blurb: `Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Awareness and Visibility Day</a>`,
class: "flag-pan",
};
else if (month === 6)
return {
blurb: `Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!`,
class: "flag-progress-intersex",
};
else if (month === 7 && day === 14)
return {
blurb: `Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>`,
class: "flag-nonbinary",
};
else if (month === 7 && day === 28)
return {
blurb: `Today is Leilukin's Birthday`
};
else if (month === 9 && day === 11)
return {
blurb: `Today is the ${leilukinsHubAnniversary}-year anniversary of the launch of Leilukin's Hub`
};
else if (month === 9 && day === 23)
return {
blurb: `Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>`,
class: "flag-bi",
};
else if (month === 10 && day === 8)
return {
blurb: `Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>`,
class: "flag-lesbian",
};
else if (month === 10 && day === 11)
return {
blurb: `Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>`,
class: "flag-rainbow",
};
else if (month === 10 && day === 17)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>`,
class: "flag-genderfluid",
};
else if (month === 10 && day === 24)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>`,
class: "flag-ace",
};
else if (month === 10 && day === 26)
return {
blurb: `Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>`,
class: "flag-intersex",
};
else else
return "No event"; return null;
}
function getBanner(day) {
switch (day) {
case "Zero Discrimination Day":
return "flag-progress-intersex";
break;
case "International Women's Day":
return "symbol-venus";
break;
case "Trans Day of Visibility":
return "flag-trans";
break;
case "International Asexuality Day":
return "flag-ace";
break;
case "Lesbian Visibility Day":
return "flag-lesbian";
break;
case "IDAHOBIT":
return "flag-progress";
break;
case "Agender Pride Day":
return "flag-agender";
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return "flag-pan";
break;
case "Pride Month":
return "flag-progress-intersex";
break;
case "Non-Binary People's Day":
return "flag-non-binary";
break;
case "Bi Visibility Day":
return "flag-bi";
break;
case "International Lesbian Day":
return "flag-lesbian";
break;
case "National Coming Out Day":
return "flag-rainbow";
break;
case "Genderfluid Visibility Week":
return "flag-genderfluid";
break;
case "Ace Week":
return "flag-ace";
break;
case "Intersex Awareness Day":
return "flag-intersex";
break;
default:
return "";
}
}
function getBlurbHtml(day) {
switch (day) {
case "Zero Discrimination Day":
return `
Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>
`;
break;
case "International Women's Day":
return `
Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day</a>
`;
break;
case "Trans Day of Visibility":
return `
Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>
`;
break;
case "International Asexuality Day":
return `
Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>
`;
break;
case "Lesbian Visibility Day":
return `
Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>
`;
break;
case "IDAHOBIT":
return `
Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a></span>
`;
break;
case "Agender Pride Day":
return `
Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a></span>
`;
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return `
Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Visibility Day</a>
`;
break;
case "Pride Month":
return `
Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!
`;
break;
case "Non-Binary People's Day":
return `
Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>
`;
break;
case "Leilukin's Birthday":
return `
Today is Leilukin's birthday
`;
break;
case "Leilukin's Hub Anniversary":
return `
Today is the anniversary of the launch of Leilukin's Hub
`;
break;
case "Bi Visibility Day":
return `
Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>
`;
break;
case "International Lesbian Day":
return `
Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>
`;
break;
case "National Coming Out Day":
return `
Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>
`;
break;
case "Genderfluid Visibility Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>
`;
break;
case "Ace Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>
`;
break;
case "Intersex Awareness Day":
return `
Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>
`;
break;
default:
return ``;
}
} }
</script> </script>

View File

@ -98,14 +98,12 @@
const todayEvent = getTodayEvent(); const todayEvent = getTodayEvent();
if (todayEvent != "No event") { if (todayEvent) {
heroTopBarEl.classList.remove('hidden'); heroTopBarEl.classList.remove('hidden');
heroTopBarEl.innerHTML = todayEvent.blurb;
if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { if (todayEvent.class) {
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); headerImgEl.classList.add(todayEvent.class);
} else {
headerImgEl.classList.add(getBanner(todayEvent));
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent);
} }
} }
@ -114,196 +112,100 @@
const month = date.getMonth() + 1; const month = date.getMonth() + 1;
const day = date.getDate(); const day = date.getDate();
if (month == 3 && day == 1) const currentYear = date.getFullYear();
return "Zero Discrimination Day"; const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear();
else if (month == 3 && day == 8) const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate;
return "International Women's Day";
else if (month == 3 && day == 31) if (month === 3 && day === 1)
return "Trans Day of Visibility"; return {
else if (month == 4 && day == 6) blurb: `Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>`,
return "International Asexuality Day"; class: "flag-progress-intersex",
else if (month == 4 && day == 26) };
return "Lesbian Visibility Day"; else if (month === 3 && day === 8)
else if (month == 5 && day == 17) return {
return "IDAHOBIT"; blurb: `Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day}</a>`,
else if (month == 5 && day == 19) class: "symbol-venus",
return "Agender Pride Day"; };
else if (month == 5 && day == 25) else if (month === 3 && day === 31)
return "Pansexual and Panromantic Awareness & Visibility Day"; return {
else if (month == 6) blurb: `Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>`,
return "Pride Month"; class: "flag-trans",
else if (month == 7 && day == 14) };
return "Non-Binary People's Day"; else if (month === 4 && day === 6)
else if (month == 7 && day == 28) return {
return "Leilukin's Birthday"; blurb: `Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>`,
else if (month == 9 && day == 11) class: "flag-ace",
return "Leilukin's Hub Anniversary"; };
else if (month == 9 && day == 23) else if (month === 4 && day === 26)
return "Bi Visibility Day"; return {
else if (month == 10 && day == 8) blurb: `Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>`,
return "International Lesbian Day"; class: "flag-lesbian",
else if (month == 10 && day == 11) };
return "National Coming Out Day"; else if (month === 5 && day === 17)
else if (month == 10 && day == 17) return {
return "Genderfluid Visibility Week"; blurb: `Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a>`,
else if (month == 10 && day == 24) class: "flag-progress",
return "Ace Week"; };
else if (month == 10 && day == 26) else if (month === 5 && day === 19)
return "Intersex Awareness Day"; return {
blurb: `Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a>`,
class: "flag-agender",
};
else if (month === 5 && day === 25)
return {
blurb: `Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Awareness and Visibility Day</a>`,
class: "flag-pan",
};
else if (month === 6)
return {
blurb: `Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!`,
class: "flag-progress-intersex",
};
else if (month === 7 && day === 14)
return {
blurb: `Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>`,
class: "flag-nonbinary",
};
else if (month === 7 && day === 28)
return {
blurb: `Today is Leilukin's Birthday`
};
else if (month === 9 && day === 11)
return {
blurb: `Today is the ${leilukinsHubAnniversary}-year anniversary of the launch of Leilukin's Hub`
};
else if (month === 9 && day === 23)
return {
blurb: `Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>`,
class: "flag-bi",
};
else if (month === 10 && day === 8)
return {
blurb: `Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>`,
class: "flag-lesbian",
};
else if (month === 10 && day === 11)
return {
blurb: `Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>`,
class: "flag-rainbow",
};
else if (month === 10 && day === 17)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>`,
class: "flag-genderfluid",
};
else if (month === 10 && day === 24)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>`,
class: "flag-ace",
};
else if (month === 10 && day === 26)
return {
blurb: `Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>`,
class: "flag-intersex",
};
else else
return "No event"; return null;
}
function getBanner(day) {
switch (day) {
case "Zero Discrimination Day":
return "flag-progress-intersex";
break;
case "International Women's Day":
return "symbol-venus";
break;
case "Trans Day of Visibility":
return "flag-trans";
break;
case "International Asexuality Day":
return "flag-ace";
break;
case "Lesbian Visibility Day":
return "flag-lesbian";
break;
case "IDAHOBIT":
return "flag-progress";
break;
case "Agender Pride Day":
return "flag-agender";
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return "flag-pan";
break;
case "Pride Month":
return "flag-progress-intersex";
break;
case "Non-Binary People's Day":
return "flag-non-binary";
break;
case "Bi Visibility Day":
return "flag-bi";
break;
case "International Lesbian Day":
return "flag-lesbian";
break;
case "National Coming Out Day":
return "flag-rainbow";
break;
case "Genderfluid Visibility Week":
return "flag-genderfluid";
break;
case "Ace Week":
return "flag-ace";
break;
case "Intersex Awareness Day":
return "flag-intersex";
break;
default:
return "";
}
}
function getBlurbHtml(day) {
switch (day) {
case "Zero Discrimination Day":
return `
Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>
`;
break;
case "International Women's Day":
return `
Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day</a>
`;
break;
case "Trans Day of Visibility":
return `
Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>
`;
break;
case "International Asexuality Day":
return `
Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>
`;
break;
case "Lesbian Visibility Day":
return `
Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>
`;
break;
case "IDAHOBIT":
return `
Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a></span>
`;
break;
case "Agender Pride Day":
return `
Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a></span>
`;
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return `
Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Visibility Day</a>
`;
break;
case "Pride Month":
return `
Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!
`;
break;
case "Non-Binary People's Day":
return `
Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>
`;
break;
case "Leilukin's Birthday":
return `
Today is Leilukin's birthday
`;
break;
case "Leilukin's Hub Anniversary":
return `
Today is the anniversary of the launch of Leilukin's Hub
`;
break;
case "Bi Visibility Day":
return `
Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>
`;
break;
case "International Lesbian Day":
return `
Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>
`;
break;
case "National Coming Out Day":
return `
Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>
`;
break;
case "Genderfluid Visibility Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>
`;
break;
case "Ace Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>
`;
break;
case "Intersex Awareness Day":
return `
Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>
`;
break;
default:
return ``;
}
} }
</script> </script>

View File

@ -98,14 +98,12 @@
const todayEvent = getTodayEvent(); const todayEvent = getTodayEvent();
if (todayEvent != "No event") { if (todayEvent) {
heroTopBarEl.classList.remove('hidden'); heroTopBarEl.classList.remove('hidden');
heroTopBarEl.innerHTML = todayEvent.blurb;
if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { if (todayEvent.class) {
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); headerImgEl.classList.add(todayEvent.class);
} else {
headerImgEl.classList.add(getBanner(todayEvent));
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent);
} }
} }
@ -114,196 +112,100 @@
const month = date.getMonth() + 1; const month = date.getMonth() + 1;
const day = date.getDate(); const day = date.getDate();
if (month == 3 && day == 1) const currentYear = date.getFullYear();
return "Zero Discrimination Day"; const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear();
else if (month == 3 && day == 8) const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate;
return "International Women's Day";
else if (month == 3 && day == 31) if (month === 3 && day === 1)
return "Trans Day of Visibility"; return {
else if (month == 4 && day == 6) blurb: `Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>`,
return "International Asexuality Day"; class: "flag-progress-intersex",
else if (month == 4 && day == 26) };
return "Lesbian Visibility Day"; else if (month === 3 && day === 8)
else if (month == 5 && day == 17) return {
return "IDAHOBIT"; blurb: `Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day}</a>`,
else if (month == 5 && day == 19) class: "symbol-venus",
return "Agender Pride Day"; };
else if (month == 5 && day == 25) else if (month === 3 && day === 31)
return "Pansexual and Panromantic Awareness & Visibility Day"; return {
else if (month == 6) blurb: `Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>`,
return "Pride Month"; class: "flag-trans",
else if (month == 7 && day == 14) };
return "Non-Binary People's Day"; else if (month === 4 && day === 6)
else if (month == 7 && day == 28) return {
return "Leilukin's Birthday"; blurb: `Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>`,
else if (month == 9 && day == 11) class: "flag-ace",
return "Leilukin's Hub Anniversary"; };
else if (month == 9 && day == 23) else if (month === 4 && day === 26)
return "Bi Visibility Day"; return {
else if (month == 10 && day == 8) blurb: `Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>`,
return "International Lesbian Day"; class: "flag-lesbian",
else if (month == 10 && day == 11) };
return "National Coming Out Day"; else if (month === 5 && day === 17)
else if (month == 10 && day == 17) return {
return "Genderfluid Visibility Week"; blurb: `Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a>`,
else if (month == 10 && day == 24) class: "flag-progress",
return "Ace Week"; };
else if (month == 10 && day == 26) else if (month === 5 && day === 19)
return "Intersex Awareness Day"; return {
blurb: `Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a>`,
class: "flag-agender",
};
else if (month === 5 && day === 25)
return {
blurb: `Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Awareness and Visibility Day</a>`,
class: "flag-pan",
};
else if (month === 6)
return {
blurb: `Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!`,
class: "flag-progress-intersex",
};
else if (month === 7 && day === 14)
return {
blurb: `Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>`,
class: "flag-nonbinary",
};
else if (month === 7 && day === 28)
return {
blurb: `Today is Leilukin's Birthday`
};
else if (month === 9 && day === 11)
return {
blurb: `Today is the ${leilukinsHubAnniversary}-year anniversary of the launch of Leilukin's Hub`
};
else if (month === 9 && day === 23)
return {
blurb: `Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>`,
class: "flag-bi",
};
else if (month === 10 && day === 8)
return {
blurb: `Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>`,
class: "flag-lesbian",
};
else if (month === 10 && day === 11)
return {
blurb: `Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>`,
class: "flag-rainbow",
};
else if (month === 10 && day === 17)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>`,
class: "flag-genderfluid",
};
else if (month === 10 && day === 24)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>`,
class: "flag-ace",
};
else if (month === 10 && day === 26)
return {
blurb: `Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>`,
class: "flag-intersex",
};
else else
return "No event"; return null;
}
function getBanner(day) {
switch (day) {
case "Zero Discrimination Day":
return "flag-progress-intersex";
break;
case "International Women's Day":
return "symbol-venus";
break;
case "Trans Day of Visibility":
return "flag-trans";
break;
case "International Asexuality Day":
return "flag-ace";
break;
case "Lesbian Visibility Day":
return "flag-lesbian";
break;
case "IDAHOBIT":
return "flag-progress";
break;
case "Agender Pride Day":
return "flag-agender";
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return "flag-pan";
break;
case "Pride Month":
return "flag-progress-intersex";
break;
case "Non-Binary People's Day":
return "flag-non-binary";
break;
case "Bi Visibility Day":
return "flag-bi";
break;
case "International Lesbian Day":
return "flag-lesbian";
break;
case "National Coming Out Day":
return "flag-rainbow";
break;
case "Genderfluid Visibility Week":
return "flag-genderfluid";
break;
case "Ace Week":
return "flag-ace";
break;
case "Intersex Awareness Day":
return "flag-intersex";
break;
default:
return "";
}
}
function getBlurbHtml(day) {
switch (day) {
case "Zero Discrimination Day":
return `
Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>
`;
break;
case "International Women's Day":
return `
Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day</a>
`;
break;
case "Trans Day of Visibility":
return `
Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>
`;
break;
case "International Asexuality Day":
return `
Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>
`;
break;
case "Lesbian Visibility Day":
return `
Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>
`;
break;
case "IDAHOBIT":
return `
Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a></span>
`;
break;
case "Agender Pride Day":
return `
Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a></span>
`;
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return `
Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Visibility Day</a>
`;
break;
case "Pride Month":
return `
Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!
`;
break;
case "Non-Binary People's Day":
return `
Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>
`;
break;
case "Leilukin's Birthday":
return `
Today is Leilukin's birthday
`;
break;
case "Leilukin's Hub Anniversary":
return `
Today is the anniversary of the launch of Leilukin's Hub
`;
break;
case "Bi Visibility Day":
return `
Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>
`;
break;
case "International Lesbian Day":
return `
Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>
`;
break;
case "National Coming Out Day":
return `
Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>
`;
break;
case "Genderfluid Visibility Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>
`;
break;
case "Ace Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>
`;
break;
case "Intersex Awareness Day":
return `
Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>
`;
break;
default:
return ``;
}
} }
</script> </script>

View File

@ -98,14 +98,12 @@
const todayEvent = getTodayEvent(); const todayEvent = getTodayEvent();
if (todayEvent != "No event") { if (todayEvent) {
heroTopBarEl.classList.remove('hidden'); heroTopBarEl.classList.remove('hidden');
heroTopBarEl.innerHTML = todayEvent.blurb;
if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { if (todayEvent.class) {
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); headerImgEl.classList.add(todayEvent.class);
} else {
headerImgEl.classList.add(getBanner(todayEvent));
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent);
} }
} }
@ -114,196 +112,100 @@
const month = date.getMonth() + 1; const month = date.getMonth() + 1;
const day = date.getDate(); const day = date.getDate();
if (month == 3 && day == 1) const currentYear = date.getFullYear();
return "Zero Discrimination Day"; const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear();
else if (month == 3 && day == 8) const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate;
return "International Women's Day";
else if (month == 3 && day == 31) if (month === 3 && day === 1)
return "Trans Day of Visibility"; return {
else if (month == 4 && day == 6) blurb: `Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>`,
return "International Asexuality Day"; class: "flag-progress-intersex",
else if (month == 4 && day == 26) };
return "Lesbian Visibility Day"; else if (month === 3 && day === 8)
else if (month == 5 && day == 17) return {
return "IDAHOBIT"; blurb: `Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day}</a>`,
else if (month == 5 && day == 19) class: "symbol-venus",
return "Agender Pride Day"; };
else if (month == 5 && day == 25) else if (month === 3 && day === 31)
return "Pansexual and Panromantic Awareness & Visibility Day"; return {
else if (month == 6) blurb: `Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>`,
return "Pride Month"; class: "flag-trans",
else if (month == 7 && day == 14) };
return "Non-Binary People's Day"; else if (month === 4 && day === 6)
else if (month == 7 && day == 28) return {
return "Leilukin's Birthday"; blurb: `Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>`,
else if (month == 9 && day == 11) class: "flag-ace",
return "Leilukin's Hub Anniversary"; };
else if (month == 9 && day == 23) else if (month === 4 && day === 26)
return "Bi Visibility Day"; return {
else if (month == 10 && day == 8) blurb: `Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>`,
return "International Lesbian Day"; class: "flag-lesbian",
else if (month == 10 && day == 11) };
return "National Coming Out Day"; else if (month === 5 && day === 17)
else if (month == 10 && day == 17) return {
return "Genderfluid Visibility Week"; blurb: `Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a>`,
else if (month == 10 && day == 24) class: "flag-progress",
return "Ace Week"; };
else if (month == 10 && day == 26) else if (month === 5 && day === 19)
return "Intersex Awareness Day"; return {
blurb: `Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a>`,
class: "flag-agender",
};
else if (month === 5 && day === 25)
return {
blurb: `Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Awareness and Visibility Day</a>`,
class: "flag-pan",
};
else if (month === 6)
return {
blurb: `Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!`,
class: "flag-progress-intersex",
};
else if (month === 7 && day === 14)
return {
blurb: `Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>`,
class: "flag-nonbinary",
};
else if (month === 7 && day === 28)
return {
blurb: `Today is Leilukin's Birthday`
};
else if (month === 9 && day === 11)
return {
blurb: `Today is the ${leilukinsHubAnniversary}-year anniversary of the launch of Leilukin's Hub`
};
else if (month === 9 && day === 23)
return {
blurb: `Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>`,
class: "flag-bi",
};
else if (month === 10 && day === 8)
return {
blurb: `Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>`,
class: "flag-lesbian",
};
else if (month === 10 && day === 11)
return {
blurb: `Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>`,
class: "flag-rainbow",
};
else if (month === 10 && day === 17)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>`,
class: "flag-genderfluid",
};
else if (month === 10 && day === 24)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>`,
class: "flag-ace",
};
else if (month === 10 && day === 26)
return {
blurb: `Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>`,
class: "flag-intersex",
};
else else
return "No event"; return null;
}
function getBanner(day) {
switch (day) {
case "Zero Discrimination Day":
return "flag-progress-intersex";
break;
case "International Women's Day":
return "symbol-venus";
break;
case "Trans Day of Visibility":
return "flag-trans";
break;
case "International Asexuality Day":
return "flag-ace";
break;
case "Lesbian Visibility Day":
return "flag-lesbian";
break;
case "IDAHOBIT":
return "flag-progress";
break;
case "Agender Pride Day":
return "flag-agender";
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return "flag-pan";
break;
case "Pride Month":
return "flag-progress-intersex";
break;
case "Non-Binary People's Day":
return "flag-non-binary";
break;
case "Bi Visibility Day":
return "flag-bi";
break;
case "International Lesbian Day":
return "flag-lesbian";
break;
case "National Coming Out Day":
return "flag-rainbow";
break;
case "Genderfluid Visibility Week":
return "flag-genderfluid";
break;
case "Ace Week":
return "flag-ace";
break;
case "Intersex Awareness Day":
return "flag-intersex";
break;
default:
return "";
}
}
function getBlurbHtml(day) {
switch (day) {
case "Zero Discrimination Day":
return `
Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>
`;
break;
case "International Women's Day":
return `
Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day</a>
`;
break;
case "Trans Day of Visibility":
return `
Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>
`;
break;
case "International Asexuality Day":
return `
Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>
`;
break;
case "Lesbian Visibility Day":
return `
Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>
`;
break;
case "IDAHOBIT":
return `
Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a></span>
`;
break;
case "Agender Pride Day":
return `
Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a></span>
`;
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return `
Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Visibility Day</a>
`;
break;
case "Pride Month":
return `
Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!
`;
break;
case "Non-Binary People's Day":
return `
Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>
`;
break;
case "Leilukin's Birthday":
return `
Today is Leilukin's birthday
`;
break;
case "Leilukin's Hub Anniversary":
return `
Today is the anniversary of the launch of Leilukin's Hub
`;
break;
case "Bi Visibility Day":
return `
Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>
`;
break;
case "International Lesbian Day":
return `
Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>
`;
break;
case "National Coming Out Day":
return `
Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>
`;
break;
case "Genderfluid Visibility Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>
`;
break;
case "Ace Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>
`;
break;
case "Intersex Awareness Day":
return `
Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>
`;
break;
default:
return ``;
}
} }
</script> </script>

View File

@ -98,14 +98,12 @@
const todayEvent = getTodayEvent(); const todayEvent = getTodayEvent();
if (todayEvent != "No event") { if (todayEvent) {
heroTopBarEl.classList.remove('hidden'); heroTopBarEl.classList.remove('hidden');
heroTopBarEl.innerHTML = todayEvent.blurb;
if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { if (todayEvent.class) {
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); headerImgEl.classList.add(todayEvent.class);
} else {
headerImgEl.classList.add(getBanner(todayEvent));
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent);
} }
} }
@ -114,196 +112,100 @@
const month = date.getMonth() + 1; const month = date.getMonth() + 1;
const day = date.getDate(); const day = date.getDate();
if (month == 3 && day == 1) const currentYear = date.getFullYear();
return "Zero Discrimination Day"; const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear();
else if (month == 3 && day == 8) const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate;
return "International Women's Day";
else if (month == 3 && day == 31) if (month === 3 && day === 1)
return "Trans Day of Visibility"; return {
else if (month == 4 && day == 6) blurb: `Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>`,
return "International Asexuality Day"; class: "flag-progress-intersex",
else if (month == 4 && day == 26) };
return "Lesbian Visibility Day"; else if (month === 3 && day === 8)
else if (month == 5 && day == 17) return {
return "IDAHOBIT"; blurb: `Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day}</a>`,
else if (month == 5 && day == 19) class: "symbol-venus",
return "Agender Pride Day"; };
else if (month == 5 && day == 25) else if (month === 3 && day === 31)
return "Pansexual and Panromantic Awareness & Visibility Day"; return {
else if (month == 6) blurb: `Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>`,
return "Pride Month"; class: "flag-trans",
else if (month == 7 && day == 14) };
return "Non-Binary People's Day"; else if (month === 4 && day === 6)
else if (month == 7 && day == 28) return {
return "Leilukin's Birthday"; blurb: `Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>`,
else if (month == 9 && day == 11) class: "flag-ace",
return "Leilukin's Hub Anniversary"; };
else if (month == 9 && day == 23) else if (month === 4 && day === 26)
return "Bi Visibility Day"; return {
else if (month == 10 && day == 8) blurb: `Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>`,
return "International Lesbian Day"; class: "flag-lesbian",
else if (month == 10 && day == 11) };
return "National Coming Out Day"; else if (month === 5 && day === 17)
else if (month == 10 && day == 17) return {
return "Genderfluid Visibility Week"; blurb: `Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a>`,
else if (month == 10 && day == 24) class: "flag-progress",
return "Ace Week"; };
else if (month == 10 && day == 26) else if (month === 5 && day === 19)
return "Intersex Awareness Day"; return {
blurb: `Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a>`,
class: "flag-agender",
};
else if (month === 5 && day === 25)
return {
blurb: `Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Awareness and Visibility Day</a>`,
class: "flag-pan",
};
else if (month === 6)
return {
blurb: `Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!`,
class: "flag-progress-intersex",
};
else if (month === 7 && day === 14)
return {
blurb: `Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>`,
class: "flag-nonbinary",
};
else if (month === 7 && day === 28)
return {
blurb: `Today is Leilukin's Birthday`
};
else if (month === 9 && day === 11)
return {
blurb: `Today is the ${leilukinsHubAnniversary}-year anniversary of the launch of Leilukin's Hub`
};
else if (month === 9 && day === 23)
return {
blurb: `Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>`,
class: "flag-bi",
};
else if (month === 10 && day === 8)
return {
blurb: `Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>`,
class: "flag-lesbian",
};
else if (month === 10 && day === 11)
return {
blurb: `Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>`,
class: "flag-rainbow",
};
else if (month === 10 && day === 17)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>`,
class: "flag-genderfluid",
};
else if (month === 10 && day === 24)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>`,
class: "flag-ace",
};
else if (month === 10 && day === 26)
return {
blurb: `Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>`,
class: "flag-intersex",
};
else else
return "No event"; return null;
}
function getBanner(day) {
switch (day) {
case "Zero Discrimination Day":
return "flag-progress-intersex";
break;
case "International Women's Day":
return "symbol-venus";
break;
case "Trans Day of Visibility":
return "flag-trans";
break;
case "International Asexuality Day":
return "flag-ace";
break;
case "Lesbian Visibility Day":
return "flag-lesbian";
break;
case "IDAHOBIT":
return "flag-progress";
break;
case "Agender Pride Day":
return "flag-agender";
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return "flag-pan";
break;
case "Pride Month":
return "flag-progress-intersex";
break;
case "Non-Binary People's Day":
return "flag-non-binary";
break;
case "Bi Visibility Day":
return "flag-bi";
break;
case "International Lesbian Day":
return "flag-lesbian";
break;
case "National Coming Out Day":
return "flag-rainbow";
break;
case "Genderfluid Visibility Week":
return "flag-genderfluid";
break;
case "Ace Week":
return "flag-ace";
break;
case "Intersex Awareness Day":
return "flag-intersex";
break;
default:
return "";
}
}
function getBlurbHtml(day) {
switch (day) {
case "Zero Discrimination Day":
return `
Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>
`;
break;
case "International Women's Day":
return `
Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day</a>
`;
break;
case "Trans Day of Visibility":
return `
Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>
`;
break;
case "International Asexuality Day":
return `
Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>
`;
break;
case "Lesbian Visibility Day":
return `
Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>
`;
break;
case "IDAHOBIT":
return `
Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a></span>
`;
break;
case "Agender Pride Day":
return `
Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a></span>
`;
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return `
Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Visibility Day</a>
`;
break;
case "Pride Month":
return `
Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!
`;
break;
case "Non-Binary People's Day":
return `
Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>
`;
break;
case "Leilukin's Birthday":
return `
Today is Leilukin's birthday
`;
break;
case "Leilukin's Hub Anniversary":
return `
Today is the anniversary of the launch of Leilukin's Hub
`;
break;
case "Bi Visibility Day":
return `
Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>
`;
break;
case "International Lesbian Day":
return `
Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>
`;
break;
case "National Coming Out Day":
return `
Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>
`;
break;
case "Genderfluid Visibility Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>
`;
break;
case "Ace Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>
`;
break;
case "Intersex Awareness Day":
return `
Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>
`;
break;
default:
return ``;
}
} }
</script> </script>

View File

@ -98,14 +98,12 @@
const todayEvent = getTodayEvent(); const todayEvent = getTodayEvent();
if (todayEvent != "No event") { if (todayEvent) {
heroTopBarEl.classList.remove('hidden'); heroTopBarEl.classList.remove('hidden');
heroTopBarEl.innerHTML = todayEvent.blurb;
if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { if (todayEvent.class) {
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); headerImgEl.classList.add(todayEvent.class);
} else {
headerImgEl.classList.add(getBanner(todayEvent));
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent);
} }
} }
@ -114,196 +112,100 @@
const month = date.getMonth() + 1; const month = date.getMonth() + 1;
const day = date.getDate(); const day = date.getDate();
if (month == 3 && day == 1) const currentYear = date.getFullYear();
return "Zero Discrimination Day"; const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear();
else if (month == 3 && day == 8) const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate;
return "International Women's Day";
else if (month == 3 && day == 31) if (month === 3 && day === 1)
return "Trans Day of Visibility"; return {
else if (month == 4 && day == 6) blurb: `Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>`,
return "International Asexuality Day"; class: "flag-progress-intersex",
else if (month == 4 && day == 26) };
return "Lesbian Visibility Day"; else if (month === 3 && day === 8)
else if (month == 5 && day == 17) return {
return "IDAHOBIT"; blurb: `Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day}</a>`,
else if (month == 5 && day == 19) class: "symbol-venus",
return "Agender Pride Day"; };
else if (month == 5 && day == 25) else if (month === 3 && day === 31)
return "Pansexual and Panromantic Awareness & Visibility Day"; return {
else if (month == 6) blurb: `Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>`,
return "Pride Month"; class: "flag-trans",
else if (month == 7 && day == 14) };
return "Non-Binary People's Day"; else if (month === 4 && day === 6)
else if (month == 7 && day == 28) return {
return "Leilukin's Birthday"; blurb: `Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>`,
else if (month == 9 && day == 11) class: "flag-ace",
return "Leilukin's Hub Anniversary"; };
else if (month == 9 && day == 23) else if (month === 4 && day === 26)
return "Bi Visibility Day"; return {
else if (month == 10 && day == 8) blurb: `Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>`,
return "International Lesbian Day"; class: "flag-lesbian",
else if (month == 10 && day == 11) };
return "National Coming Out Day"; else if (month === 5 && day === 17)
else if (month == 10 && day == 17) return {
return "Genderfluid Visibility Week"; blurb: `Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a>`,
else if (month == 10 && day == 24) class: "flag-progress",
return "Ace Week"; };
else if (month == 10 && day == 26) else if (month === 5 && day === 19)
return "Intersex Awareness Day"; return {
blurb: `Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a>`,
class: "flag-agender",
};
else if (month === 5 && day === 25)
return {
blurb: `Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Awareness and Visibility Day</a>`,
class: "flag-pan",
};
else if (month === 6)
return {
blurb: `Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!`,
class: "flag-progress-intersex",
};
else if (month === 7 && day === 14)
return {
blurb: `Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>`,
class: "flag-nonbinary",
};
else if (month === 7 && day === 28)
return {
blurb: `Today is Leilukin's Birthday`
};
else if (month === 9 && day === 11)
return {
blurb: `Today is the ${leilukinsHubAnniversary}-year anniversary of the launch of Leilukin's Hub`
};
else if (month === 9 && day === 23)
return {
blurb: `Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>`,
class: "flag-bi",
};
else if (month === 10 && day === 8)
return {
blurb: `Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>`,
class: "flag-lesbian",
};
else if (month === 10 && day === 11)
return {
blurb: `Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>`,
class: "flag-rainbow",
};
else if (month === 10 && day === 17)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>`,
class: "flag-genderfluid",
};
else if (month === 10 && day === 24)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>`,
class: "flag-ace",
};
else if (month === 10 && day === 26)
return {
blurb: `Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>`,
class: "flag-intersex",
};
else else
return "No event"; return null;
}
function getBanner(day) {
switch (day) {
case "Zero Discrimination Day":
return "flag-progress-intersex";
break;
case "International Women's Day":
return "symbol-venus";
break;
case "Trans Day of Visibility":
return "flag-trans";
break;
case "International Asexuality Day":
return "flag-ace";
break;
case "Lesbian Visibility Day":
return "flag-lesbian";
break;
case "IDAHOBIT":
return "flag-progress";
break;
case "Agender Pride Day":
return "flag-agender";
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return "flag-pan";
break;
case "Pride Month":
return "flag-progress-intersex";
break;
case "Non-Binary People's Day":
return "flag-non-binary";
break;
case "Bi Visibility Day":
return "flag-bi";
break;
case "International Lesbian Day":
return "flag-lesbian";
break;
case "National Coming Out Day":
return "flag-rainbow";
break;
case "Genderfluid Visibility Week":
return "flag-genderfluid";
break;
case "Ace Week":
return "flag-ace";
break;
case "Intersex Awareness Day":
return "flag-intersex";
break;
default:
return "";
}
}
function getBlurbHtml(day) {
switch (day) {
case "Zero Discrimination Day":
return `
Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>
`;
break;
case "International Women's Day":
return `
Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day</a>
`;
break;
case "Trans Day of Visibility":
return `
Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>
`;
break;
case "International Asexuality Day":
return `
Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>
`;
break;
case "Lesbian Visibility Day":
return `
Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>
`;
break;
case "IDAHOBIT":
return `
Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a></span>
`;
break;
case "Agender Pride Day":
return `
Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a></span>
`;
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return `
Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Visibility Day</a>
`;
break;
case "Pride Month":
return `
Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!
`;
break;
case "Non-Binary People's Day":
return `
Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>
`;
break;
case "Leilukin's Birthday":
return `
Today is Leilukin's birthday
`;
break;
case "Leilukin's Hub Anniversary":
return `
Today is the anniversary of the launch of Leilukin's Hub
`;
break;
case "Bi Visibility Day":
return `
Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>
`;
break;
case "International Lesbian Day":
return `
Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>
`;
break;
case "National Coming Out Day":
return `
Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>
`;
break;
case "Genderfluid Visibility Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>
`;
break;
case "Ace Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>
`;
break;
case "Intersex Awareness Day":
return `
Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>
`;
break;
default:
return ``;
}
} }
</script> </script>

View File

@ -98,14 +98,12 @@
const todayEvent = getTodayEvent(); const todayEvent = getTodayEvent();
if (todayEvent != "No event") { if (todayEvent) {
heroTopBarEl.classList.remove('hidden'); heroTopBarEl.classList.remove('hidden');
heroTopBarEl.innerHTML = todayEvent.blurb;
if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { if (todayEvent.class) {
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); headerImgEl.classList.add(todayEvent.class);
} else {
headerImgEl.classList.add(getBanner(todayEvent));
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent);
} }
} }
@ -114,196 +112,100 @@
const month = date.getMonth() + 1; const month = date.getMonth() + 1;
const day = date.getDate(); const day = date.getDate();
if (month == 3 && day == 1) const currentYear = date.getFullYear();
return "Zero Discrimination Day"; const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear();
else if (month == 3 && day == 8) const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate;
return "International Women's Day";
else if (month == 3 && day == 31) if (month === 3 && day === 1)
return "Trans Day of Visibility"; return {
else if (month == 4 && day == 6) blurb: `Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>`,
return "International Asexuality Day"; class: "flag-progress-intersex",
else if (month == 4 && day == 26) };
return "Lesbian Visibility Day"; else if (month === 3 && day === 8)
else if (month == 5 && day == 17) return {
return "IDAHOBIT"; blurb: `Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day}</a>`,
else if (month == 5 && day == 19) class: "symbol-venus",
return "Agender Pride Day"; };
else if (month == 5 && day == 25) else if (month === 3 && day === 31)
return "Pansexual and Panromantic Awareness & Visibility Day"; return {
else if (month == 6) blurb: `Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>`,
return "Pride Month"; class: "flag-trans",
else if (month == 7 && day == 14) };
return "Non-Binary People's Day"; else if (month === 4 && day === 6)
else if (month == 7 && day == 28) return {
return "Leilukin's Birthday"; blurb: `Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>`,
else if (month == 9 && day == 11) class: "flag-ace",
return "Leilukin's Hub Anniversary"; };
else if (month == 9 && day == 23) else if (month === 4 && day === 26)
return "Bi Visibility Day"; return {
else if (month == 10 && day == 8) blurb: `Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>`,
return "International Lesbian Day"; class: "flag-lesbian",
else if (month == 10 && day == 11) };
return "National Coming Out Day"; else if (month === 5 && day === 17)
else if (month == 10 && day == 17) return {
return "Genderfluid Visibility Week"; blurb: `Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a>`,
else if (month == 10 && day == 24) class: "flag-progress",
return "Ace Week"; };
else if (month == 10 && day == 26) else if (month === 5 && day === 19)
return "Intersex Awareness Day"; return {
blurb: `Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a>`,
class: "flag-agender",
};
else if (month === 5 && day === 25)
return {
blurb: `Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Awareness and Visibility Day</a>`,
class: "flag-pan",
};
else if (month === 6)
return {
blurb: `Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!`,
class: "flag-progress-intersex",
};
else if (month === 7 && day === 14)
return {
blurb: `Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>`,
class: "flag-nonbinary",
};
else if (month === 7 && day === 28)
return {
blurb: `Today is Leilukin's Birthday`
};
else if (month === 9 && day === 11)
return {
blurb: `Today is the ${leilukinsHubAnniversary}-year anniversary of the launch of Leilukin's Hub`
};
else if (month === 9 && day === 23)
return {
blurb: `Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>`,
class: "flag-bi",
};
else if (month === 10 && day === 8)
return {
blurb: `Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>`,
class: "flag-lesbian",
};
else if (month === 10 && day === 11)
return {
blurb: `Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>`,
class: "flag-rainbow",
};
else if (month === 10 && day === 17)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>`,
class: "flag-genderfluid",
};
else if (month === 10 && day === 24)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>`,
class: "flag-ace",
};
else if (month === 10 && day === 26)
return {
blurb: `Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>`,
class: "flag-intersex",
};
else else
return "No event"; return null;
}
function getBanner(day) {
switch (day) {
case "Zero Discrimination Day":
return "flag-progress-intersex";
break;
case "International Women's Day":
return "symbol-venus";
break;
case "Trans Day of Visibility":
return "flag-trans";
break;
case "International Asexuality Day":
return "flag-ace";
break;
case "Lesbian Visibility Day":
return "flag-lesbian";
break;
case "IDAHOBIT":
return "flag-progress";
break;
case "Agender Pride Day":
return "flag-agender";
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return "flag-pan";
break;
case "Pride Month":
return "flag-progress-intersex";
break;
case "Non-Binary People's Day":
return "flag-non-binary";
break;
case "Bi Visibility Day":
return "flag-bi";
break;
case "International Lesbian Day":
return "flag-lesbian";
break;
case "National Coming Out Day":
return "flag-rainbow";
break;
case "Genderfluid Visibility Week":
return "flag-genderfluid";
break;
case "Ace Week":
return "flag-ace";
break;
case "Intersex Awareness Day":
return "flag-intersex";
break;
default:
return "";
}
}
function getBlurbHtml(day) {
switch (day) {
case "Zero Discrimination Day":
return `
Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>
`;
break;
case "International Women's Day":
return `
Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day</a>
`;
break;
case "Trans Day of Visibility":
return `
Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>
`;
break;
case "International Asexuality Day":
return `
Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>
`;
break;
case "Lesbian Visibility Day":
return `
Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>
`;
break;
case "IDAHOBIT":
return `
Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a></span>
`;
break;
case "Agender Pride Day":
return `
Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a></span>
`;
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return `
Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Visibility Day</a>
`;
break;
case "Pride Month":
return `
Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!
`;
break;
case "Non-Binary People's Day":
return `
Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>
`;
break;
case "Leilukin's Birthday":
return `
Today is Leilukin's birthday
`;
break;
case "Leilukin's Hub Anniversary":
return `
Today is the anniversary of the launch of Leilukin's Hub
`;
break;
case "Bi Visibility Day":
return `
Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>
`;
break;
case "International Lesbian Day":
return `
Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>
`;
break;
case "National Coming Out Day":
return `
Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>
`;
break;
case "Genderfluid Visibility Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>
`;
break;
case "Ace Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>
`;
break;
case "Intersex Awareness Day":
return `
Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>
`;
break;
default:
return ``;
}
} }
</script> </script>

View File

@ -98,14 +98,12 @@
const todayEvent = getTodayEvent(); const todayEvent = getTodayEvent();
if (todayEvent != "No event") { if (todayEvent) {
heroTopBarEl.classList.remove('hidden'); heroTopBarEl.classList.remove('hidden');
heroTopBarEl.innerHTML = todayEvent.blurb;
if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { if (todayEvent.class) {
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); headerImgEl.classList.add(todayEvent.class);
} else {
headerImgEl.classList.add(getBanner(todayEvent));
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent);
} }
} }
@ -114,196 +112,100 @@
const month = date.getMonth() + 1; const month = date.getMonth() + 1;
const day = date.getDate(); const day = date.getDate();
if (month == 3 && day == 1) const currentYear = date.getFullYear();
return "Zero Discrimination Day"; const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear();
else if (month == 3 && day == 8) const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate;
return "International Women's Day";
else if (month == 3 && day == 31) if (month === 3 && day === 1)
return "Trans Day of Visibility"; return {
else if (month == 4 && day == 6) blurb: `Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>`,
return "International Asexuality Day"; class: "flag-progress-intersex",
else if (month == 4 && day == 26) };
return "Lesbian Visibility Day"; else if (month === 3 && day === 8)
else if (month == 5 && day == 17) return {
return "IDAHOBIT"; blurb: `Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day}</a>`,
else if (month == 5 && day == 19) class: "symbol-venus",
return "Agender Pride Day"; };
else if (month == 5 && day == 25) else if (month === 3 && day === 31)
return "Pansexual and Panromantic Awareness & Visibility Day"; return {
else if (month == 6) blurb: `Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>`,
return "Pride Month"; class: "flag-trans",
else if (month == 7 && day == 14) };
return "Non-Binary People's Day"; else if (month === 4 && day === 6)
else if (month == 7 && day == 28) return {
return "Leilukin's Birthday"; blurb: `Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>`,
else if (month == 9 && day == 11) class: "flag-ace",
return "Leilukin's Hub Anniversary"; };
else if (month == 9 && day == 23) else if (month === 4 && day === 26)
return "Bi Visibility Day"; return {
else if (month == 10 && day == 8) blurb: `Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>`,
return "International Lesbian Day"; class: "flag-lesbian",
else if (month == 10 && day == 11) };
return "National Coming Out Day"; else if (month === 5 && day === 17)
else if (month == 10 && day == 17) return {
return "Genderfluid Visibility Week"; blurb: `Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a>`,
else if (month == 10 && day == 24) class: "flag-progress",
return "Ace Week"; };
else if (month == 10 && day == 26) else if (month === 5 && day === 19)
return "Intersex Awareness Day"; return {
blurb: `Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a>`,
class: "flag-agender",
};
else if (month === 5 && day === 25)
return {
blurb: `Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Awareness and Visibility Day</a>`,
class: "flag-pan",
};
else if (month === 6)
return {
blurb: `Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!`,
class: "flag-progress-intersex",
};
else if (month === 7 && day === 14)
return {
blurb: `Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>`,
class: "flag-nonbinary",
};
else if (month === 7 && day === 28)
return {
blurb: `Today is Leilukin's Birthday`
};
else if (month === 9 && day === 11)
return {
blurb: `Today is the ${leilukinsHubAnniversary}-year anniversary of the launch of Leilukin's Hub`
};
else if (month === 9 && day === 23)
return {
blurb: `Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>`,
class: "flag-bi",
};
else if (month === 10 && day === 8)
return {
blurb: `Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>`,
class: "flag-lesbian",
};
else if (month === 10 && day === 11)
return {
blurb: `Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>`,
class: "flag-rainbow",
};
else if (month === 10 && day === 17)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>`,
class: "flag-genderfluid",
};
else if (month === 10 && day === 24)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>`,
class: "flag-ace",
};
else if (month === 10 && day === 26)
return {
blurb: `Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>`,
class: "flag-intersex",
};
else else
return "No event"; return null;
}
function getBanner(day) {
switch (day) {
case "Zero Discrimination Day":
return "flag-progress-intersex";
break;
case "International Women's Day":
return "symbol-venus";
break;
case "Trans Day of Visibility":
return "flag-trans";
break;
case "International Asexuality Day":
return "flag-ace";
break;
case "Lesbian Visibility Day":
return "flag-lesbian";
break;
case "IDAHOBIT":
return "flag-progress";
break;
case "Agender Pride Day":
return "flag-agender";
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return "flag-pan";
break;
case "Pride Month":
return "flag-progress-intersex";
break;
case "Non-Binary People's Day":
return "flag-non-binary";
break;
case "Bi Visibility Day":
return "flag-bi";
break;
case "International Lesbian Day":
return "flag-lesbian";
break;
case "National Coming Out Day":
return "flag-rainbow";
break;
case "Genderfluid Visibility Week":
return "flag-genderfluid";
break;
case "Ace Week":
return "flag-ace";
break;
case "Intersex Awareness Day":
return "flag-intersex";
break;
default:
return "";
}
}
function getBlurbHtml(day) {
switch (day) {
case "Zero Discrimination Day":
return `
Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>
`;
break;
case "International Women's Day":
return `
Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day</a>
`;
break;
case "Trans Day of Visibility":
return `
Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>
`;
break;
case "International Asexuality Day":
return `
Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>
`;
break;
case "Lesbian Visibility Day":
return `
Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>
`;
break;
case "IDAHOBIT":
return `
Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a></span>
`;
break;
case "Agender Pride Day":
return `
Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a></span>
`;
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return `
Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Visibility Day</a>
`;
break;
case "Pride Month":
return `
Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!
`;
break;
case "Non-Binary People's Day":
return `
Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>
`;
break;
case "Leilukin's Birthday":
return `
Today is Leilukin's birthday
`;
break;
case "Leilukin's Hub Anniversary":
return `
Today is the anniversary of the launch of Leilukin's Hub
`;
break;
case "Bi Visibility Day":
return `
Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>
`;
break;
case "International Lesbian Day":
return `
Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>
`;
break;
case "National Coming Out Day":
return `
Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>
`;
break;
case "Genderfluid Visibility Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>
`;
break;
case "Ace Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>
`;
break;
case "Intersex Awareness Day":
return `
Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>
`;
break;
default:
return ``;
}
} }
</script> </script>

View File

@ -98,14 +98,12 @@
const todayEvent = getTodayEvent(); const todayEvent = getTodayEvent();
if (todayEvent != "No event") { if (todayEvent) {
heroTopBarEl.classList.remove('hidden'); heroTopBarEl.classList.remove('hidden');
heroTopBarEl.innerHTML = todayEvent.blurb;
if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { if (todayEvent.class) {
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); headerImgEl.classList.add(todayEvent.class);
} else {
headerImgEl.classList.add(getBanner(todayEvent));
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent);
} }
} }
@ -114,196 +112,100 @@
const month = date.getMonth() + 1; const month = date.getMonth() + 1;
const day = date.getDate(); const day = date.getDate();
if (month == 3 && day == 1) const currentYear = date.getFullYear();
return "Zero Discrimination Day"; const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear();
else if (month == 3 && day == 8) const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate;
return "International Women's Day";
else if (month == 3 && day == 31) if (month === 3 && day === 1)
return "Trans Day of Visibility"; return {
else if (month == 4 && day == 6) blurb: `Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>`,
return "International Asexuality Day"; class: "flag-progress-intersex",
else if (month == 4 && day == 26) };
return "Lesbian Visibility Day"; else if (month === 3 && day === 8)
else if (month == 5 && day == 17) return {
return "IDAHOBIT"; blurb: `Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day}</a>`,
else if (month == 5 && day == 19) class: "symbol-venus",
return "Agender Pride Day"; };
else if (month == 5 && day == 25) else if (month === 3 && day === 31)
return "Pansexual and Panromantic Awareness & Visibility Day"; return {
else if (month == 6) blurb: `Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>`,
return "Pride Month"; class: "flag-trans",
else if (month == 7 && day == 14) };
return "Non-Binary People's Day"; else if (month === 4 && day === 6)
else if (month == 7 && day == 28) return {
return "Leilukin's Birthday"; blurb: `Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>`,
else if (month == 9 && day == 11) class: "flag-ace",
return "Leilukin's Hub Anniversary"; };
else if (month == 9 && day == 23) else if (month === 4 && day === 26)
return "Bi Visibility Day"; return {
else if (month == 10 && day == 8) blurb: `Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>`,
return "International Lesbian Day"; class: "flag-lesbian",
else if (month == 10 && day == 11) };
return "National Coming Out Day"; else if (month === 5 && day === 17)
else if (month == 10 && day == 17) return {
return "Genderfluid Visibility Week"; blurb: `Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a>`,
else if (month == 10 && day == 24) class: "flag-progress",
return "Ace Week"; };
else if (month == 10 && day == 26) else if (month === 5 && day === 19)
return "Intersex Awareness Day"; return {
blurb: `Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a>`,
class: "flag-agender",
};
else if (month === 5 && day === 25)
return {
blurb: `Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Awareness and Visibility Day</a>`,
class: "flag-pan",
};
else if (month === 6)
return {
blurb: `Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!`,
class: "flag-progress-intersex",
};
else if (month === 7 && day === 14)
return {
blurb: `Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>`,
class: "flag-nonbinary",
};
else if (month === 7 && day === 28)
return {
blurb: `Today is Leilukin's Birthday`
};
else if (month === 9 && day === 11)
return {
blurb: `Today is the ${leilukinsHubAnniversary}-year anniversary of the launch of Leilukin's Hub`
};
else if (month === 9 && day === 23)
return {
blurb: `Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>`,
class: "flag-bi",
};
else if (month === 10 && day === 8)
return {
blurb: `Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>`,
class: "flag-lesbian",
};
else if (month === 10 && day === 11)
return {
blurb: `Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>`,
class: "flag-rainbow",
};
else if (month === 10 && day === 17)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>`,
class: "flag-genderfluid",
};
else if (month === 10 && day === 24)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>`,
class: "flag-ace",
};
else if (month === 10 && day === 26)
return {
blurb: `Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>`,
class: "flag-intersex",
};
else else
return "No event"; return null;
}
function getBanner(day) {
switch (day) {
case "Zero Discrimination Day":
return "flag-progress-intersex";
break;
case "International Women's Day":
return "symbol-venus";
break;
case "Trans Day of Visibility":
return "flag-trans";
break;
case "International Asexuality Day":
return "flag-ace";
break;
case "Lesbian Visibility Day":
return "flag-lesbian";
break;
case "IDAHOBIT":
return "flag-progress";
break;
case "Agender Pride Day":
return "flag-agender";
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return "flag-pan";
break;
case "Pride Month":
return "flag-progress-intersex";
break;
case "Non-Binary People's Day":
return "flag-non-binary";
break;
case "Bi Visibility Day":
return "flag-bi";
break;
case "International Lesbian Day":
return "flag-lesbian";
break;
case "National Coming Out Day":
return "flag-rainbow";
break;
case "Genderfluid Visibility Week":
return "flag-genderfluid";
break;
case "Ace Week":
return "flag-ace";
break;
case "Intersex Awareness Day":
return "flag-intersex";
break;
default:
return "";
}
}
function getBlurbHtml(day) {
switch (day) {
case "Zero Discrimination Day":
return `
Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>
`;
break;
case "International Women's Day":
return `
Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day</a>
`;
break;
case "Trans Day of Visibility":
return `
Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>
`;
break;
case "International Asexuality Day":
return `
Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>
`;
break;
case "Lesbian Visibility Day":
return `
Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>
`;
break;
case "IDAHOBIT":
return `
Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a></span>
`;
break;
case "Agender Pride Day":
return `
Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a></span>
`;
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return `
Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Visibility Day</a>
`;
break;
case "Pride Month":
return `
Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!
`;
break;
case "Non-Binary People's Day":
return `
Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>
`;
break;
case "Leilukin's Birthday":
return `
Today is Leilukin's birthday
`;
break;
case "Leilukin's Hub Anniversary":
return `
Today is the anniversary of the launch of Leilukin's Hub
`;
break;
case "Bi Visibility Day":
return `
Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>
`;
break;
case "International Lesbian Day":
return `
Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>
`;
break;
case "National Coming Out Day":
return `
Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>
`;
break;
case "Genderfluid Visibility Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>
`;
break;
case "Ace Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>
`;
break;
case "Intersex Awareness Day":
return `
Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>
`;
break;
default:
return ``;
}
} }
</script> </script>

View File

@ -98,14 +98,12 @@
const todayEvent = getTodayEvent(); const todayEvent = getTodayEvent();
if (todayEvent != "No event") { if (todayEvent) {
heroTopBarEl.classList.remove('hidden'); heroTopBarEl.classList.remove('hidden');
heroTopBarEl.innerHTML = todayEvent.blurb;
if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { if (todayEvent.class) {
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); headerImgEl.classList.add(todayEvent.class);
} else {
headerImgEl.classList.add(getBanner(todayEvent));
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent);
} }
} }
@ -114,196 +112,100 @@
const month = date.getMonth() + 1; const month = date.getMonth() + 1;
const day = date.getDate(); const day = date.getDate();
if (month == 3 && day == 1) const currentYear = date.getFullYear();
return "Zero Discrimination Day"; const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear();
else if (month == 3 && day == 8) const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate;
return "International Women's Day";
else if (month == 3 && day == 31) if (month === 3 && day === 1)
return "Trans Day of Visibility"; return {
else if (month == 4 && day == 6) blurb: `Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>`,
return "International Asexuality Day"; class: "flag-progress-intersex",
else if (month == 4 && day == 26) };
return "Lesbian Visibility Day"; else if (month === 3 && day === 8)
else if (month == 5 && day == 17) return {
return "IDAHOBIT"; blurb: `Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day}</a>`,
else if (month == 5 && day == 19) class: "symbol-venus",
return "Agender Pride Day"; };
else if (month == 5 && day == 25) else if (month === 3 && day === 31)
return "Pansexual and Panromantic Awareness & Visibility Day"; return {
else if (month == 6) blurb: `Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>`,
return "Pride Month"; class: "flag-trans",
else if (month == 7 && day == 14) };
return "Non-Binary People's Day"; else if (month === 4 && day === 6)
else if (month == 7 && day == 28) return {
return "Leilukin's Birthday"; blurb: `Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>`,
else if (month == 9 && day == 11) class: "flag-ace",
return "Leilukin's Hub Anniversary"; };
else if (month == 9 && day == 23) else if (month === 4 && day === 26)
return "Bi Visibility Day"; return {
else if (month == 10 && day == 8) blurb: `Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>`,
return "International Lesbian Day"; class: "flag-lesbian",
else if (month == 10 && day == 11) };
return "National Coming Out Day"; else if (month === 5 && day === 17)
else if (month == 10 && day == 17) return {
return "Genderfluid Visibility Week"; blurb: `Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a>`,
else if (month == 10 && day == 24) class: "flag-progress",
return "Ace Week"; };
else if (month == 10 && day == 26) else if (month === 5 && day === 19)
return "Intersex Awareness Day"; return {
blurb: `Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a>`,
class: "flag-agender",
};
else if (month === 5 && day === 25)
return {
blurb: `Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Awareness and Visibility Day</a>`,
class: "flag-pan",
};
else if (month === 6)
return {
blurb: `Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!`,
class: "flag-progress-intersex",
};
else if (month === 7 && day === 14)
return {
blurb: `Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>`,
class: "flag-nonbinary",
};
else if (month === 7 && day === 28)
return {
blurb: `Today is Leilukin's Birthday`
};
else if (month === 9 && day === 11)
return {
blurb: `Today is the ${leilukinsHubAnniversary}-year anniversary of the launch of Leilukin's Hub`
};
else if (month === 9 && day === 23)
return {
blurb: `Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>`,
class: "flag-bi",
};
else if (month === 10 && day === 8)
return {
blurb: `Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>`,
class: "flag-lesbian",
};
else if (month === 10 && day === 11)
return {
blurb: `Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>`,
class: "flag-rainbow",
};
else if (month === 10 && day === 17)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>`,
class: "flag-genderfluid",
};
else if (month === 10 && day === 24)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>`,
class: "flag-ace",
};
else if (month === 10 && day === 26)
return {
blurb: `Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>`,
class: "flag-intersex",
};
else else
return "No event"; return null;
}
function getBanner(day) {
switch (day) {
case "Zero Discrimination Day":
return "flag-progress-intersex";
break;
case "International Women's Day":
return "symbol-venus";
break;
case "Trans Day of Visibility":
return "flag-trans";
break;
case "International Asexuality Day":
return "flag-ace";
break;
case "Lesbian Visibility Day":
return "flag-lesbian";
break;
case "IDAHOBIT":
return "flag-progress";
break;
case "Agender Pride Day":
return "flag-agender";
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return "flag-pan";
break;
case "Pride Month":
return "flag-progress-intersex";
break;
case "Non-Binary People's Day":
return "flag-non-binary";
break;
case "Bi Visibility Day":
return "flag-bi";
break;
case "International Lesbian Day":
return "flag-lesbian";
break;
case "National Coming Out Day":
return "flag-rainbow";
break;
case "Genderfluid Visibility Week":
return "flag-genderfluid";
break;
case "Ace Week":
return "flag-ace";
break;
case "Intersex Awareness Day":
return "flag-intersex";
break;
default:
return "";
}
}
function getBlurbHtml(day) {
switch (day) {
case "Zero Discrimination Day":
return `
Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>
`;
break;
case "International Women's Day":
return `
Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day</a>
`;
break;
case "Trans Day of Visibility":
return `
Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>
`;
break;
case "International Asexuality Day":
return `
Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>
`;
break;
case "Lesbian Visibility Day":
return `
Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>
`;
break;
case "IDAHOBIT":
return `
Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a></span>
`;
break;
case "Agender Pride Day":
return `
Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a></span>
`;
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return `
Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Visibility Day</a>
`;
break;
case "Pride Month":
return `
Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!
`;
break;
case "Non-Binary People's Day":
return `
Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>
`;
break;
case "Leilukin's Birthday":
return `
Today is Leilukin's birthday
`;
break;
case "Leilukin's Hub Anniversary":
return `
Today is the anniversary of the launch of Leilukin's Hub
`;
break;
case "Bi Visibility Day":
return `
Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>
`;
break;
case "International Lesbian Day":
return `
Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>
`;
break;
case "National Coming Out Day":
return `
Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>
`;
break;
case "Genderfluid Visibility Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>
`;
break;
case "Ace Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>
`;
break;
case "Intersex Awareness Day":
return `
Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>
`;
break;
default:
return ``;
}
} }
</script> </script>

View File

@ -98,14 +98,12 @@
const todayEvent = getTodayEvent(); const todayEvent = getTodayEvent();
if (todayEvent != "No event") { if (todayEvent) {
heroTopBarEl.classList.remove('hidden'); heroTopBarEl.classList.remove('hidden');
heroTopBarEl.innerHTML = todayEvent.blurb;
if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { if (todayEvent.class) {
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); headerImgEl.classList.add(todayEvent.class);
} else {
headerImgEl.classList.add(getBanner(todayEvent));
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent);
} }
} }
@ -114,196 +112,100 @@
const month = date.getMonth() + 1; const month = date.getMonth() + 1;
const day = date.getDate(); const day = date.getDate();
if (month == 3 && day == 1) const currentYear = date.getFullYear();
return "Zero Discrimination Day"; const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear();
else if (month == 3 && day == 8) const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate;
return "International Women's Day";
else if (month == 3 && day == 31) if (month === 3 && day === 1)
return "Trans Day of Visibility"; return {
else if (month == 4 && day == 6) blurb: `Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>`,
return "International Asexuality Day"; class: "flag-progress-intersex",
else if (month == 4 && day == 26) };
return "Lesbian Visibility Day"; else if (month === 3 && day === 8)
else if (month == 5 && day == 17) return {
return "IDAHOBIT"; blurb: `Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day}</a>`,
else if (month == 5 && day == 19) class: "symbol-venus",
return "Agender Pride Day"; };
else if (month == 5 && day == 25) else if (month === 3 && day === 31)
return "Pansexual and Panromantic Awareness & Visibility Day"; return {
else if (month == 6) blurb: `Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>`,
return "Pride Month"; class: "flag-trans",
else if (month == 7 && day == 14) };
return "Non-Binary People's Day"; else if (month === 4 && day === 6)
else if (month == 7 && day == 28) return {
return "Leilukin's Birthday"; blurb: `Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>`,
else if (month == 9 && day == 11) class: "flag-ace",
return "Leilukin's Hub Anniversary"; };
else if (month == 9 && day == 23) else if (month === 4 && day === 26)
return "Bi Visibility Day"; return {
else if (month == 10 && day == 8) blurb: `Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>`,
return "International Lesbian Day"; class: "flag-lesbian",
else if (month == 10 && day == 11) };
return "National Coming Out Day"; else if (month === 5 && day === 17)
else if (month == 10 && day == 17) return {
return "Genderfluid Visibility Week"; blurb: `Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a>`,
else if (month == 10 && day == 24) class: "flag-progress",
return "Ace Week"; };
else if (month == 10 && day == 26) else if (month === 5 && day === 19)
return "Intersex Awareness Day"; return {
blurb: `Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a>`,
class: "flag-agender",
};
else if (month === 5 && day === 25)
return {
blurb: `Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Awareness and Visibility Day</a>`,
class: "flag-pan",
};
else if (month === 6)
return {
blurb: `Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!`,
class: "flag-progress-intersex",
};
else if (month === 7 && day === 14)
return {
blurb: `Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>`,
class: "flag-nonbinary",
};
else if (month === 7 && day === 28)
return {
blurb: `Today is Leilukin's Birthday`
};
else if (month === 9 && day === 11)
return {
blurb: `Today is the ${leilukinsHubAnniversary}-year anniversary of the launch of Leilukin's Hub`
};
else if (month === 9 && day === 23)
return {
blurb: `Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>`,
class: "flag-bi",
};
else if (month === 10 && day === 8)
return {
blurb: `Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>`,
class: "flag-lesbian",
};
else if (month === 10 && day === 11)
return {
blurb: `Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>`,
class: "flag-rainbow",
};
else if (month === 10 && day === 17)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>`,
class: "flag-genderfluid",
};
else if (month === 10 && day === 24)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>`,
class: "flag-ace",
};
else if (month === 10 && day === 26)
return {
blurb: `Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>`,
class: "flag-intersex",
};
else else
return "No event"; return null;
}
function getBanner(day) {
switch (day) {
case "Zero Discrimination Day":
return "flag-progress-intersex";
break;
case "International Women's Day":
return "symbol-venus";
break;
case "Trans Day of Visibility":
return "flag-trans";
break;
case "International Asexuality Day":
return "flag-ace";
break;
case "Lesbian Visibility Day":
return "flag-lesbian";
break;
case "IDAHOBIT":
return "flag-progress";
break;
case "Agender Pride Day":
return "flag-agender";
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return "flag-pan";
break;
case "Pride Month":
return "flag-progress-intersex";
break;
case "Non-Binary People's Day":
return "flag-non-binary";
break;
case "Bi Visibility Day":
return "flag-bi";
break;
case "International Lesbian Day":
return "flag-lesbian";
break;
case "National Coming Out Day":
return "flag-rainbow";
break;
case "Genderfluid Visibility Week":
return "flag-genderfluid";
break;
case "Ace Week":
return "flag-ace";
break;
case "Intersex Awareness Day":
return "flag-intersex";
break;
default:
return "";
}
}
function getBlurbHtml(day) {
switch (day) {
case "Zero Discrimination Day":
return `
Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>
`;
break;
case "International Women's Day":
return `
Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day</a>
`;
break;
case "Trans Day of Visibility":
return `
Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>
`;
break;
case "International Asexuality Day":
return `
Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>
`;
break;
case "Lesbian Visibility Day":
return `
Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>
`;
break;
case "IDAHOBIT":
return `
Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a></span>
`;
break;
case "Agender Pride Day":
return `
Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a></span>
`;
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return `
Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Visibility Day</a>
`;
break;
case "Pride Month":
return `
Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!
`;
break;
case "Non-Binary People's Day":
return `
Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>
`;
break;
case "Leilukin's Birthday":
return `
Today is Leilukin's birthday
`;
break;
case "Leilukin's Hub Anniversary":
return `
Today is the anniversary of the launch of Leilukin's Hub
`;
break;
case "Bi Visibility Day":
return `
Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>
`;
break;
case "International Lesbian Day":
return `
Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>
`;
break;
case "National Coming Out Day":
return `
Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>
`;
break;
case "Genderfluid Visibility Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>
`;
break;
case "Ace Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>
`;
break;
case "Intersex Awareness Day":
return `
Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>
`;
break;
default:
return ``;
}
} }
</script> </script>

View File

@ -98,14 +98,12 @@
const todayEvent = getTodayEvent(); const todayEvent = getTodayEvent();
if (todayEvent != "No event") { if (todayEvent) {
heroTopBarEl.classList.remove('hidden'); heroTopBarEl.classList.remove('hidden');
heroTopBarEl.innerHTML = todayEvent.blurb;
if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { if (todayEvent.class) {
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); headerImgEl.classList.add(todayEvent.class);
} else {
headerImgEl.classList.add(getBanner(todayEvent));
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent);
} }
} }
@ -114,196 +112,100 @@
const month = date.getMonth() + 1; const month = date.getMonth() + 1;
const day = date.getDate(); const day = date.getDate();
if (month == 3 && day == 1) const currentYear = date.getFullYear();
return "Zero Discrimination Day"; const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear();
else if (month == 3 && day == 8) const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate;
return "International Women's Day";
else if (month == 3 && day == 31) if (month === 3 && day === 1)
return "Trans Day of Visibility"; return {
else if (month == 4 && day == 6) blurb: `Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>`,
return "International Asexuality Day"; class: "flag-progress-intersex",
else if (month == 4 && day == 26) };
return "Lesbian Visibility Day"; else if (month === 3 && day === 8)
else if (month == 5 && day == 17) return {
return "IDAHOBIT"; blurb: `Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day}</a>`,
else if (month == 5 && day == 19) class: "symbol-venus",
return "Agender Pride Day"; };
else if (month == 5 && day == 25) else if (month === 3 && day === 31)
return "Pansexual and Panromantic Awareness & Visibility Day"; return {
else if (month == 6) blurb: `Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>`,
return "Pride Month"; class: "flag-trans",
else if (month == 7 && day == 14) };
return "Non-Binary People's Day"; else if (month === 4 && day === 6)
else if (month == 7 && day == 28) return {
return "Leilukin's Birthday"; blurb: `Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>`,
else if (month == 9 && day == 11) class: "flag-ace",
return "Leilukin's Hub Anniversary"; };
else if (month == 9 && day == 23) else if (month === 4 && day === 26)
return "Bi Visibility Day"; return {
else if (month == 10 && day == 8) blurb: `Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>`,
return "International Lesbian Day"; class: "flag-lesbian",
else if (month == 10 && day == 11) };
return "National Coming Out Day"; else if (month === 5 && day === 17)
else if (month == 10 && day == 17) return {
return "Genderfluid Visibility Week"; blurb: `Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a>`,
else if (month == 10 && day == 24) class: "flag-progress",
return "Ace Week"; };
else if (month == 10 && day == 26) else if (month === 5 && day === 19)
return "Intersex Awareness Day"; return {
blurb: `Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a>`,
class: "flag-agender",
};
else if (month === 5 && day === 25)
return {
blurb: `Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Awareness and Visibility Day</a>`,
class: "flag-pan",
};
else if (month === 6)
return {
blurb: `Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!`,
class: "flag-progress-intersex",
};
else if (month === 7 && day === 14)
return {
blurb: `Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>`,
class: "flag-nonbinary",
};
else if (month === 7 && day === 28)
return {
blurb: `Today is Leilukin's Birthday`
};
else if (month === 9 && day === 11)
return {
blurb: `Today is the ${leilukinsHubAnniversary}-year anniversary of the launch of Leilukin's Hub`
};
else if (month === 9 && day === 23)
return {
blurb: `Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>`,
class: "flag-bi",
};
else if (month === 10 && day === 8)
return {
blurb: `Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>`,
class: "flag-lesbian",
};
else if (month === 10 && day === 11)
return {
blurb: `Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>`,
class: "flag-rainbow",
};
else if (month === 10 && day === 17)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>`,
class: "flag-genderfluid",
};
else if (month === 10 && day === 24)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>`,
class: "flag-ace",
};
else if (month === 10 && day === 26)
return {
blurb: `Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>`,
class: "flag-intersex",
};
else else
return "No event"; return null;
}
function getBanner(day) {
switch (day) {
case "Zero Discrimination Day":
return "flag-progress-intersex";
break;
case "International Women's Day":
return "symbol-venus";
break;
case "Trans Day of Visibility":
return "flag-trans";
break;
case "International Asexuality Day":
return "flag-ace";
break;
case "Lesbian Visibility Day":
return "flag-lesbian";
break;
case "IDAHOBIT":
return "flag-progress";
break;
case "Agender Pride Day":
return "flag-agender";
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return "flag-pan";
break;
case "Pride Month":
return "flag-progress-intersex";
break;
case "Non-Binary People's Day":
return "flag-non-binary";
break;
case "Bi Visibility Day":
return "flag-bi";
break;
case "International Lesbian Day":
return "flag-lesbian";
break;
case "National Coming Out Day":
return "flag-rainbow";
break;
case "Genderfluid Visibility Week":
return "flag-genderfluid";
break;
case "Ace Week":
return "flag-ace";
break;
case "Intersex Awareness Day":
return "flag-intersex";
break;
default:
return "";
}
}
function getBlurbHtml(day) {
switch (day) {
case "Zero Discrimination Day":
return `
Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>
`;
break;
case "International Women's Day":
return `
Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day</a>
`;
break;
case "Trans Day of Visibility":
return `
Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>
`;
break;
case "International Asexuality Day":
return `
Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>
`;
break;
case "Lesbian Visibility Day":
return `
Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>
`;
break;
case "IDAHOBIT":
return `
Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a></span>
`;
break;
case "Agender Pride Day":
return `
Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a></span>
`;
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return `
Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Visibility Day</a>
`;
break;
case "Pride Month":
return `
Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!
`;
break;
case "Non-Binary People's Day":
return `
Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>
`;
break;
case "Leilukin's Birthday":
return `
Today is Leilukin's birthday
`;
break;
case "Leilukin's Hub Anniversary":
return `
Today is the anniversary of the launch of Leilukin's Hub
`;
break;
case "Bi Visibility Day":
return `
Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>
`;
break;
case "International Lesbian Day":
return `
Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>
`;
break;
case "National Coming Out Day":
return `
Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>
`;
break;
case "Genderfluid Visibility Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>
`;
break;
case "Ace Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>
`;
break;
case "Intersex Awareness Day":
return `
Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>
`;
break;
default:
return ``;
}
} }
</script> </script>

View File

@ -98,14 +98,12 @@
const todayEvent = getTodayEvent(); const todayEvent = getTodayEvent();
if (todayEvent != "No event") { if (todayEvent) {
heroTopBarEl.classList.remove('hidden'); heroTopBarEl.classList.remove('hidden');
heroTopBarEl.innerHTML = todayEvent.blurb;
if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { if (todayEvent.class) {
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); headerImgEl.classList.add(todayEvent.class);
} else {
headerImgEl.classList.add(getBanner(todayEvent));
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent);
} }
} }
@ -114,196 +112,100 @@
const month = date.getMonth() + 1; const month = date.getMonth() + 1;
const day = date.getDate(); const day = date.getDate();
if (month == 3 && day == 1) const currentYear = date.getFullYear();
return "Zero Discrimination Day"; const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear();
else if (month == 3 && day == 8) const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate;
return "International Women's Day";
else if (month == 3 && day == 31) if (month === 3 && day === 1)
return "Trans Day of Visibility"; return {
else if (month == 4 && day == 6) blurb: `Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>`,
return "International Asexuality Day"; class: "flag-progress-intersex",
else if (month == 4 && day == 26) };
return "Lesbian Visibility Day"; else if (month === 3 && day === 8)
else if (month == 5 && day == 17) return {
return "IDAHOBIT"; blurb: `Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day}</a>`,
else if (month == 5 && day == 19) class: "symbol-venus",
return "Agender Pride Day"; };
else if (month == 5 && day == 25) else if (month === 3 && day === 31)
return "Pansexual and Panromantic Awareness & Visibility Day"; return {
else if (month == 6) blurb: `Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>`,
return "Pride Month"; class: "flag-trans",
else if (month == 7 && day == 14) };
return "Non-Binary People's Day"; else if (month === 4 && day === 6)
else if (month == 7 && day == 28) return {
return "Leilukin's Birthday"; blurb: `Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>`,
else if (month == 9 && day == 11) class: "flag-ace",
return "Leilukin's Hub Anniversary"; };
else if (month == 9 && day == 23) else if (month === 4 && day === 26)
return "Bi Visibility Day"; return {
else if (month == 10 && day == 8) blurb: `Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>`,
return "International Lesbian Day"; class: "flag-lesbian",
else if (month == 10 && day == 11) };
return "National Coming Out Day"; else if (month === 5 && day === 17)
else if (month == 10 && day == 17) return {
return "Genderfluid Visibility Week"; blurb: `Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a>`,
else if (month == 10 && day == 24) class: "flag-progress",
return "Ace Week"; };
else if (month == 10 && day == 26) else if (month === 5 && day === 19)
return "Intersex Awareness Day"; return {
blurb: `Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a>`,
class: "flag-agender",
};
else if (month === 5 && day === 25)
return {
blurb: `Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Awareness and Visibility Day</a>`,
class: "flag-pan",
};
else if (month === 6)
return {
blurb: `Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!`,
class: "flag-progress-intersex",
};
else if (month === 7 && day === 14)
return {
blurb: `Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>`,
class: "flag-nonbinary",
};
else if (month === 7 && day === 28)
return {
blurb: `Today is Leilukin's Birthday`
};
else if (month === 9 && day === 11)
return {
blurb: `Today is the ${leilukinsHubAnniversary}-year anniversary of the launch of Leilukin's Hub`
};
else if (month === 9 && day === 23)
return {
blurb: `Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>`,
class: "flag-bi",
};
else if (month === 10 && day === 8)
return {
blurb: `Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>`,
class: "flag-lesbian",
};
else if (month === 10 && day === 11)
return {
blurb: `Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>`,
class: "flag-rainbow",
};
else if (month === 10 && day === 17)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>`,
class: "flag-genderfluid",
};
else if (month === 10 && day === 24)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>`,
class: "flag-ace",
};
else if (month === 10 && day === 26)
return {
blurb: `Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>`,
class: "flag-intersex",
};
else else
return "No event"; return null;
}
function getBanner(day) {
switch (day) {
case "Zero Discrimination Day":
return "flag-progress-intersex";
break;
case "International Women's Day":
return "symbol-venus";
break;
case "Trans Day of Visibility":
return "flag-trans";
break;
case "International Asexuality Day":
return "flag-ace";
break;
case "Lesbian Visibility Day":
return "flag-lesbian";
break;
case "IDAHOBIT":
return "flag-progress";
break;
case "Agender Pride Day":
return "flag-agender";
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return "flag-pan";
break;
case "Pride Month":
return "flag-progress-intersex";
break;
case "Non-Binary People's Day":
return "flag-non-binary";
break;
case "Bi Visibility Day":
return "flag-bi";
break;
case "International Lesbian Day":
return "flag-lesbian";
break;
case "National Coming Out Day":
return "flag-rainbow";
break;
case "Genderfluid Visibility Week":
return "flag-genderfluid";
break;
case "Ace Week":
return "flag-ace";
break;
case "Intersex Awareness Day":
return "flag-intersex";
break;
default:
return "";
}
}
function getBlurbHtml(day) {
switch (day) {
case "Zero Discrimination Day":
return `
Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>
`;
break;
case "International Women's Day":
return `
Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day</a>
`;
break;
case "Trans Day of Visibility":
return `
Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>
`;
break;
case "International Asexuality Day":
return `
Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>
`;
break;
case "Lesbian Visibility Day":
return `
Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>
`;
break;
case "IDAHOBIT":
return `
Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a></span>
`;
break;
case "Agender Pride Day":
return `
Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a></span>
`;
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return `
Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Visibility Day</a>
`;
break;
case "Pride Month":
return `
Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!
`;
break;
case "Non-Binary People's Day":
return `
Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>
`;
break;
case "Leilukin's Birthday":
return `
Today is Leilukin's birthday
`;
break;
case "Leilukin's Hub Anniversary":
return `
Today is the anniversary of the launch of Leilukin's Hub
`;
break;
case "Bi Visibility Day":
return `
Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>
`;
break;
case "International Lesbian Day":
return `
Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>
`;
break;
case "National Coming Out Day":
return `
Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>
`;
break;
case "Genderfluid Visibility Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>
`;
break;
case "Ace Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>
`;
break;
case "Intersex Awareness Day":
return `
Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>
`;
break;
default:
return ``;
}
} }
</script> </script>

View File

@ -98,14 +98,12 @@
const todayEvent = getTodayEvent(); const todayEvent = getTodayEvent();
if (todayEvent != "No event") { if (todayEvent) {
heroTopBarEl.classList.remove('hidden'); heroTopBarEl.classList.remove('hidden');
heroTopBarEl.innerHTML = todayEvent.blurb;
if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { if (todayEvent.class) {
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); headerImgEl.classList.add(todayEvent.class);
} else {
headerImgEl.classList.add(getBanner(todayEvent));
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent);
} }
} }
@ -114,196 +112,100 @@
const month = date.getMonth() + 1; const month = date.getMonth() + 1;
const day = date.getDate(); const day = date.getDate();
if (month == 3 && day == 1) const currentYear = date.getFullYear();
return "Zero Discrimination Day"; const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear();
else if (month == 3 && day == 8) const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate;
return "International Women's Day";
else if (month == 3 && day == 31) if (month === 3 && day === 1)
return "Trans Day of Visibility"; return {
else if (month == 4 && day == 6) blurb: `Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>`,
return "International Asexuality Day"; class: "flag-progress-intersex",
else if (month == 4 && day == 26) };
return "Lesbian Visibility Day"; else if (month === 3 && day === 8)
else if (month == 5 && day == 17) return {
return "IDAHOBIT"; blurb: `Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day}</a>`,
else if (month == 5 && day == 19) class: "symbol-venus",
return "Agender Pride Day"; };
else if (month == 5 && day == 25) else if (month === 3 && day === 31)
return "Pansexual and Panromantic Awareness & Visibility Day"; return {
else if (month == 6) blurb: `Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>`,
return "Pride Month"; class: "flag-trans",
else if (month == 7 && day == 14) };
return "Non-Binary People's Day"; else if (month === 4 && day === 6)
else if (month == 7 && day == 28) return {
return "Leilukin's Birthday"; blurb: `Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>`,
else if (month == 9 && day == 11) class: "flag-ace",
return "Leilukin's Hub Anniversary"; };
else if (month == 9 && day == 23) else if (month === 4 && day === 26)
return "Bi Visibility Day"; return {
else if (month == 10 && day == 8) blurb: `Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>`,
return "International Lesbian Day"; class: "flag-lesbian",
else if (month == 10 && day == 11) };
return "National Coming Out Day"; else if (month === 5 && day === 17)
else if (month == 10 && day == 17) return {
return "Genderfluid Visibility Week"; blurb: `Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a>`,
else if (month == 10 && day == 24) class: "flag-progress",
return "Ace Week"; };
else if (month == 10 && day == 26) else if (month === 5 && day === 19)
return "Intersex Awareness Day"; return {
blurb: `Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a>`,
class: "flag-agender",
};
else if (month === 5 && day === 25)
return {
blurb: `Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Awareness and Visibility Day</a>`,
class: "flag-pan",
};
else if (month === 6)
return {
blurb: `Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!`,
class: "flag-progress-intersex",
};
else if (month === 7 && day === 14)
return {
blurb: `Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>`,
class: "flag-nonbinary",
};
else if (month === 7 && day === 28)
return {
blurb: `Today is Leilukin's Birthday`
};
else if (month === 9 && day === 11)
return {
blurb: `Today is the ${leilukinsHubAnniversary}-year anniversary of the launch of Leilukin's Hub`
};
else if (month === 9 && day === 23)
return {
blurb: `Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>`,
class: "flag-bi",
};
else if (month === 10 && day === 8)
return {
blurb: `Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>`,
class: "flag-lesbian",
};
else if (month === 10 && day === 11)
return {
blurb: `Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>`,
class: "flag-rainbow",
};
else if (month === 10 && day === 17)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>`,
class: "flag-genderfluid",
};
else if (month === 10 && day === 24)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>`,
class: "flag-ace",
};
else if (month === 10 && day === 26)
return {
blurb: `Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>`,
class: "flag-intersex",
};
else else
return "No event"; return null;
}
function getBanner(day) {
switch (day) {
case "Zero Discrimination Day":
return "flag-progress-intersex";
break;
case "International Women's Day":
return "symbol-venus";
break;
case "Trans Day of Visibility":
return "flag-trans";
break;
case "International Asexuality Day":
return "flag-ace";
break;
case "Lesbian Visibility Day":
return "flag-lesbian";
break;
case "IDAHOBIT":
return "flag-progress";
break;
case "Agender Pride Day":
return "flag-agender";
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return "flag-pan";
break;
case "Pride Month":
return "flag-progress-intersex";
break;
case "Non-Binary People's Day":
return "flag-non-binary";
break;
case "Bi Visibility Day":
return "flag-bi";
break;
case "International Lesbian Day":
return "flag-lesbian";
break;
case "National Coming Out Day":
return "flag-rainbow";
break;
case "Genderfluid Visibility Week":
return "flag-genderfluid";
break;
case "Ace Week":
return "flag-ace";
break;
case "Intersex Awareness Day":
return "flag-intersex";
break;
default:
return "";
}
}
function getBlurbHtml(day) {
switch (day) {
case "Zero Discrimination Day":
return `
Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>
`;
break;
case "International Women's Day":
return `
Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day</a>
`;
break;
case "Trans Day of Visibility":
return `
Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>
`;
break;
case "International Asexuality Day":
return `
Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>
`;
break;
case "Lesbian Visibility Day":
return `
Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>
`;
break;
case "IDAHOBIT":
return `
Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a></span>
`;
break;
case "Agender Pride Day":
return `
Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a></span>
`;
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return `
Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Visibility Day</a>
`;
break;
case "Pride Month":
return `
Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!
`;
break;
case "Non-Binary People's Day":
return `
Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>
`;
break;
case "Leilukin's Birthday":
return `
Today is Leilukin's birthday
`;
break;
case "Leilukin's Hub Anniversary":
return `
Today is the anniversary of the launch of Leilukin's Hub
`;
break;
case "Bi Visibility Day":
return `
Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>
`;
break;
case "International Lesbian Day":
return `
Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>
`;
break;
case "National Coming Out Day":
return `
Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>
`;
break;
case "Genderfluid Visibility Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>
`;
break;
case "Ace Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>
`;
break;
case "Intersex Awareness Day":
return `
Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>
`;
break;
default:
return ``;
}
} }
</script> </script>

View File

@ -98,14 +98,12 @@
const todayEvent = getTodayEvent(); const todayEvent = getTodayEvent();
if (todayEvent != "No event") { if (todayEvent) {
heroTopBarEl.classList.remove('hidden'); heroTopBarEl.classList.remove('hidden');
heroTopBarEl.innerHTML = todayEvent.blurb;
if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { if (todayEvent.class) {
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); headerImgEl.classList.add(todayEvent.class);
} else {
headerImgEl.classList.add(getBanner(todayEvent));
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent);
} }
} }
@ -114,196 +112,100 @@
const month = date.getMonth() + 1; const month = date.getMonth() + 1;
const day = date.getDate(); const day = date.getDate();
if (month == 3 && day == 1) const currentYear = date.getFullYear();
return "Zero Discrimination Day"; const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear();
else if (month == 3 && day == 8) const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate;
return "International Women's Day";
else if (month == 3 && day == 31) if (month === 3 && day === 1)
return "Trans Day of Visibility"; return {
else if (month == 4 && day == 6) blurb: `Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>`,
return "International Asexuality Day"; class: "flag-progress-intersex",
else if (month == 4 && day == 26) };
return "Lesbian Visibility Day"; else if (month === 3 && day === 8)
else if (month == 5 && day == 17) return {
return "IDAHOBIT"; blurb: `Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day}</a>`,
else if (month == 5 && day == 19) class: "symbol-venus",
return "Agender Pride Day"; };
else if (month == 5 && day == 25) else if (month === 3 && day === 31)
return "Pansexual and Panromantic Awareness & Visibility Day"; return {
else if (month == 6) blurb: `Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>`,
return "Pride Month"; class: "flag-trans",
else if (month == 7 && day == 14) };
return "Non-Binary People's Day"; else if (month === 4 && day === 6)
else if (month == 7 && day == 28) return {
return "Leilukin's Birthday"; blurb: `Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>`,
else if (month == 9 && day == 11) class: "flag-ace",
return "Leilukin's Hub Anniversary"; };
else if (month == 9 && day == 23) else if (month === 4 && day === 26)
return "Bi Visibility Day"; return {
else if (month == 10 && day == 8) blurb: `Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>`,
return "International Lesbian Day"; class: "flag-lesbian",
else if (month == 10 && day == 11) };
return "National Coming Out Day"; else if (month === 5 && day === 17)
else if (month == 10 && day == 17) return {
return "Genderfluid Visibility Week"; blurb: `Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a>`,
else if (month == 10 && day == 24) class: "flag-progress",
return "Ace Week"; };
else if (month == 10 && day == 26) else if (month === 5 && day === 19)
return "Intersex Awareness Day"; return {
blurb: `Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a>`,
class: "flag-agender",
};
else if (month === 5 && day === 25)
return {
blurb: `Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Awareness and Visibility Day</a>`,
class: "flag-pan",
};
else if (month === 6)
return {
blurb: `Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!`,
class: "flag-progress-intersex",
};
else if (month === 7 && day === 14)
return {
blurb: `Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>`,
class: "flag-nonbinary",
};
else if (month === 7 && day === 28)
return {
blurb: `Today is Leilukin's Birthday`
};
else if (month === 9 && day === 11)
return {
blurb: `Today is the ${leilukinsHubAnniversary}-year anniversary of the launch of Leilukin's Hub`
};
else if (month === 9 && day === 23)
return {
blurb: `Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>`,
class: "flag-bi",
};
else if (month === 10 && day === 8)
return {
blurb: `Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>`,
class: "flag-lesbian",
};
else if (month === 10 && day === 11)
return {
blurb: `Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>`,
class: "flag-rainbow",
};
else if (month === 10 && day === 17)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>`,
class: "flag-genderfluid",
};
else if (month === 10 && day === 24)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>`,
class: "flag-ace",
};
else if (month === 10 && day === 26)
return {
blurb: `Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>`,
class: "flag-intersex",
};
else else
return "No event"; return null;
}
function getBanner(day) {
switch (day) {
case "Zero Discrimination Day":
return "flag-progress-intersex";
break;
case "International Women's Day":
return "symbol-venus";
break;
case "Trans Day of Visibility":
return "flag-trans";
break;
case "International Asexuality Day":
return "flag-ace";
break;
case "Lesbian Visibility Day":
return "flag-lesbian";
break;
case "IDAHOBIT":
return "flag-progress";
break;
case "Agender Pride Day":
return "flag-agender";
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return "flag-pan";
break;
case "Pride Month":
return "flag-progress-intersex";
break;
case "Non-Binary People's Day":
return "flag-non-binary";
break;
case "Bi Visibility Day":
return "flag-bi";
break;
case "International Lesbian Day":
return "flag-lesbian";
break;
case "National Coming Out Day":
return "flag-rainbow";
break;
case "Genderfluid Visibility Week":
return "flag-genderfluid";
break;
case "Ace Week":
return "flag-ace";
break;
case "Intersex Awareness Day":
return "flag-intersex";
break;
default:
return "";
}
}
function getBlurbHtml(day) {
switch (day) {
case "Zero Discrimination Day":
return `
Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>
`;
break;
case "International Women's Day":
return `
Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day</a>
`;
break;
case "Trans Day of Visibility":
return `
Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>
`;
break;
case "International Asexuality Day":
return `
Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>
`;
break;
case "Lesbian Visibility Day":
return `
Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>
`;
break;
case "IDAHOBIT":
return `
Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a></span>
`;
break;
case "Agender Pride Day":
return `
Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a></span>
`;
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return `
Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Visibility Day</a>
`;
break;
case "Pride Month":
return `
Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!
`;
break;
case "Non-Binary People's Day":
return `
Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>
`;
break;
case "Leilukin's Birthday":
return `
Today is Leilukin's birthday
`;
break;
case "Leilukin's Hub Anniversary":
return `
Today is the anniversary of the launch of Leilukin's Hub
`;
break;
case "Bi Visibility Day":
return `
Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>
`;
break;
case "International Lesbian Day":
return `
Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>
`;
break;
case "National Coming Out Day":
return `
Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>
`;
break;
case "Genderfluid Visibility Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>
`;
break;
case "Ace Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>
`;
break;
case "Intersex Awareness Day":
return `
Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>
`;
break;
default:
return ``;
}
} }
</script> </script>

View File

@ -98,14 +98,12 @@
const todayEvent = getTodayEvent(); const todayEvent = getTodayEvent();
if (todayEvent != "No event") { if (todayEvent) {
heroTopBarEl.classList.remove('hidden'); heroTopBarEl.classList.remove('hidden');
heroTopBarEl.innerHTML = todayEvent.blurb;
if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { if (todayEvent.class) {
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); headerImgEl.classList.add(todayEvent.class);
} else {
headerImgEl.classList.add(getBanner(todayEvent));
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent);
} }
} }
@ -114,196 +112,100 @@
const month = date.getMonth() + 1; const month = date.getMonth() + 1;
const day = date.getDate(); const day = date.getDate();
if (month == 3 && day == 1) const currentYear = date.getFullYear();
return "Zero Discrimination Day"; const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear();
else if (month == 3 && day == 8) const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate;
return "International Women's Day";
else if (month == 3 && day == 31) if (month === 3 && day === 1)
return "Trans Day of Visibility"; return {
else if (month == 4 && day == 6) blurb: `Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>`,
return "International Asexuality Day"; class: "flag-progress-intersex",
else if (month == 4 && day == 26) };
return "Lesbian Visibility Day"; else if (month === 3 && day === 8)
else if (month == 5 && day == 17) return {
return "IDAHOBIT"; blurb: `Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day}</a>`,
else if (month == 5 && day == 19) class: "symbol-venus",
return "Agender Pride Day"; };
else if (month == 5 && day == 25) else if (month === 3 && day === 31)
return "Pansexual and Panromantic Awareness & Visibility Day"; return {
else if (month == 6) blurb: `Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>`,
return "Pride Month"; class: "flag-trans",
else if (month == 7 && day == 14) };
return "Non-Binary People's Day"; else if (month === 4 && day === 6)
else if (month == 7 && day == 28) return {
return "Leilukin's Birthday"; blurb: `Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>`,
else if (month == 9 && day == 11) class: "flag-ace",
return "Leilukin's Hub Anniversary"; };
else if (month == 9 && day == 23) else if (month === 4 && day === 26)
return "Bi Visibility Day"; return {
else if (month == 10 && day == 8) blurb: `Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>`,
return "International Lesbian Day"; class: "flag-lesbian",
else if (month == 10 && day == 11) };
return "National Coming Out Day"; else if (month === 5 && day === 17)
else if (month == 10 && day == 17) return {
return "Genderfluid Visibility Week"; blurb: `Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a>`,
else if (month == 10 && day == 24) class: "flag-progress",
return "Ace Week"; };
else if (month == 10 && day == 26) else if (month === 5 && day === 19)
return "Intersex Awareness Day"; return {
blurb: `Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a>`,
class: "flag-agender",
};
else if (month === 5 && day === 25)
return {
blurb: `Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Awareness and Visibility Day</a>`,
class: "flag-pan",
};
else if (month === 6)
return {
blurb: `Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!`,
class: "flag-progress-intersex",
};
else if (month === 7 && day === 14)
return {
blurb: `Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>`,
class: "flag-nonbinary",
};
else if (month === 7 && day === 28)
return {
blurb: `Today is Leilukin's Birthday`
};
else if (month === 9 && day === 11)
return {
blurb: `Today is the ${leilukinsHubAnniversary}-year anniversary of the launch of Leilukin's Hub`
};
else if (month === 9 && day === 23)
return {
blurb: `Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>`,
class: "flag-bi",
};
else if (month === 10 && day === 8)
return {
blurb: `Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>`,
class: "flag-lesbian",
};
else if (month === 10 && day === 11)
return {
blurb: `Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>`,
class: "flag-rainbow",
};
else if (month === 10 && day === 17)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>`,
class: "flag-genderfluid",
};
else if (month === 10 && day === 24)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>`,
class: "flag-ace",
};
else if (month === 10 && day === 26)
return {
blurb: `Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>`,
class: "flag-intersex",
};
else else
return "No event"; return null;
}
function getBanner(day) {
switch (day) {
case "Zero Discrimination Day":
return "flag-progress-intersex";
break;
case "International Women's Day":
return "symbol-venus";
break;
case "Trans Day of Visibility":
return "flag-trans";
break;
case "International Asexuality Day":
return "flag-ace";
break;
case "Lesbian Visibility Day":
return "flag-lesbian";
break;
case "IDAHOBIT":
return "flag-progress";
break;
case "Agender Pride Day":
return "flag-agender";
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return "flag-pan";
break;
case "Pride Month":
return "flag-progress-intersex";
break;
case "Non-Binary People's Day":
return "flag-non-binary";
break;
case "Bi Visibility Day":
return "flag-bi";
break;
case "International Lesbian Day":
return "flag-lesbian";
break;
case "National Coming Out Day":
return "flag-rainbow";
break;
case "Genderfluid Visibility Week":
return "flag-genderfluid";
break;
case "Ace Week":
return "flag-ace";
break;
case "Intersex Awareness Day":
return "flag-intersex";
break;
default:
return "";
}
}
function getBlurbHtml(day) {
switch (day) {
case "Zero Discrimination Day":
return `
Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>
`;
break;
case "International Women's Day":
return `
Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day</a>
`;
break;
case "Trans Day of Visibility":
return `
Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>
`;
break;
case "International Asexuality Day":
return `
Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>
`;
break;
case "Lesbian Visibility Day":
return `
Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>
`;
break;
case "IDAHOBIT":
return `
Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a></span>
`;
break;
case "Agender Pride Day":
return `
Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a></span>
`;
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return `
Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Visibility Day</a>
`;
break;
case "Pride Month":
return `
Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!
`;
break;
case "Non-Binary People's Day":
return `
Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>
`;
break;
case "Leilukin's Birthday":
return `
Today is Leilukin's birthday
`;
break;
case "Leilukin's Hub Anniversary":
return `
Today is the anniversary of the launch of Leilukin's Hub
`;
break;
case "Bi Visibility Day":
return `
Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>
`;
break;
case "International Lesbian Day":
return `
Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>
`;
break;
case "National Coming Out Day":
return `
Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>
`;
break;
case "Genderfluid Visibility Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>
`;
break;
case "Ace Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>
`;
break;
case "Intersex Awareness Day":
return `
Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>
`;
break;
default:
return ``;
}
} }
</script> </script>

View File

@ -98,14 +98,12 @@
const todayEvent = getTodayEvent(); const todayEvent = getTodayEvent();
if (todayEvent != "No event") { if (todayEvent) {
heroTopBarEl.classList.remove('hidden'); heroTopBarEl.classList.remove('hidden');
heroTopBarEl.innerHTML = todayEvent.blurb;
if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { if (todayEvent.class) {
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); headerImgEl.classList.add(todayEvent.class);
} else {
headerImgEl.classList.add(getBanner(todayEvent));
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent);
} }
} }
@ -114,196 +112,100 @@
const month = date.getMonth() + 1; const month = date.getMonth() + 1;
const day = date.getDate(); const day = date.getDate();
if (month == 3 && day == 1) const currentYear = date.getFullYear();
return "Zero Discrimination Day"; const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear();
else if (month == 3 && day == 8) const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate;
return "International Women's Day";
else if (month == 3 && day == 31) if (month === 3 && day === 1)
return "Trans Day of Visibility"; return {
else if (month == 4 && day == 6) blurb: `Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>`,
return "International Asexuality Day"; class: "flag-progress-intersex",
else if (month == 4 && day == 26) };
return "Lesbian Visibility Day"; else if (month === 3 && day === 8)
else if (month == 5 && day == 17) return {
return "IDAHOBIT"; blurb: `Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day}</a>`,
else if (month == 5 && day == 19) class: "symbol-venus",
return "Agender Pride Day"; };
else if (month == 5 && day == 25) else if (month === 3 && day === 31)
return "Pansexual and Panromantic Awareness & Visibility Day"; return {
else if (month == 6) blurb: `Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>`,
return "Pride Month"; class: "flag-trans",
else if (month == 7 && day == 14) };
return "Non-Binary People's Day"; else if (month === 4 && day === 6)
else if (month == 7 && day == 28) return {
return "Leilukin's Birthday"; blurb: `Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>`,
else if (month == 9 && day == 11) class: "flag-ace",
return "Leilukin's Hub Anniversary"; };
else if (month == 9 && day == 23) else if (month === 4 && day === 26)
return "Bi Visibility Day"; return {
else if (month == 10 && day == 8) blurb: `Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>`,
return "International Lesbian Day"; class: "flag-lesbian",
else if (month == 10 && day == 11) };
return "National Coming Out Day"; else if (month === 5 && day === 17)
else if (month == 10 && day == 17) return {
return "Genderfluid Visibility Week"; blurb: `Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a>`,
else if (month == 10 && day == 24) class: "flag-progress",
return "Ace Week"; };
else if (month == 10 && day == 26) else if (month === 5 && day === 19)
return "Intersex Awareness Day"; return {
blurb: `Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a>`,
class: "flag-agender",
};
else if (month === 5 && day === 25)
return {
blurb: `Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Awareness and Visibility Day</a>`,
class: "flag-pan",
};
else if (month === 6)
return {
blurb: `Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!`,
class: "flag-progress-intersex",
};
else if (month === 7 && day === 14)
return {
blurb: `Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>`,
class: "flag-nonbinary",
};
else if (month === 7 && day === 28)
return {
blurb: `Today is Leilukin's Birthday`
};
else if (month === 9 && day === 11)
return {
blurb: `Today is the ${leilukinsHubAnniversary}-year anniversary of the launch of Leilukin's Hub`
};
else if (month === 9 && day === 23)
return {
blurb: `Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>`,
class: "flag-bi",
};
else if (month === 10 && day === 8)
return {
blurb: `Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>`,
class: "flag-lesbian",
};
else if (month === 10 && day === 11)
return {
blurb: `Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>`,
class: "flag-rainbow",
};
else if (month === 10 && day === 17)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>`,
class: "flag-genderfluid",
};
else if (month === 10 && day === 24)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>`,
class: "flag-ace",
};
else if (month === 10 && day === 26)
return {
blurb: `Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>`,
class: "flag-intersex",
};
else else
return "No event"; return null;
}
function getBanner(day) {
switch (day) {
case "Zero Discrimination Day":
return "flag-progress-intersex";
break;
case "International Women's Day":
return "symbol-venus";
break;
case "Trans Day of Visibility":
return "flag-trans";
break;
case "International Asexuality Day":
return "flag-ace";
break;
case "Lesbian Visibility Day":
return "flag-lesbian";
break;
case "IDAHOBIT":
return "flag-progress";
break;
case "Agender Pride Day":
return "flag-agender";
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return "flag-pan";
break;
case "Pride Month":
return "flag-progress-intersex";
break;
case "Non-Binary People's Day":
return "flag-non-binary";
break;
case "Bi Visibility Day":
return "flag-bi";
break;
case "International Lesbian Day":
return "flag-lesbian";
break;
case "National Coming Out Day":
return "flag-rainbow";
break;
case "Genderfluid Visibility Week":
return "flag-genderfluid";
break;
case "Ace Week":
return "flag-ace";
break;
case "Intersex Awareness Day":
return "flag-intersex";
break;
default:
return "";
}
}
function getBlurbHtml(day) {
switch (day) {
case "Zero Discrimination Day":
return `
Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>
`;
break;
case "International Women's Day":
return `
Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day</a>
`;
break;
case "Trans Day of Visibility":
return `
Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>
`;
break;
case "International Asexuality Day":
return `
Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>
`;
break;
case "Lesbian Visibility Day":
return `
Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>
`;
break;
case "IDAHOBIT":
return `
Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a></span>
`;
break;
case "Agender Pride Day":
return `
Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a></span>
`;
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return `
Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Visibility Day</a>
`;
break;
case "Pride Month":
return `
Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!
`;
break;
case "Non-Binary People's Day":
return `
Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>
`;
break;
case "Leilukin's Birthday":
return `
Today is Leilukin's birthday
`;
break;
case "Leilukin's Hub Anniversary":
return `
Today is the anniversary of the launch of Leilukin's Hub
`;
break;
case "Bi Visibility Day":
return `
Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>
`;
break;
case "International Lesbian Day":
return `
Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>
`;
break;
case "National Coming Out Day":
return `
Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>
`;
break;
case "Genderfluid Visibility Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>
`;
break;
case "Ace Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>
`;
break;
case "Intersex Awareness Day":
return `
Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>
`;
break;
default:
return ``;
}
} }
</script> </script>

View File

@ -98,14 +98,12 @@
const todayEvent = getTodayEvent(); const todayEvent = getTodayEvent();
if (todayEvent != "No event") { if (todayEvent) {
heroTopBarEl.classList.remove('hidden'); heroTopBarEl.classList.remove('hidden');
heroTopBarEl.innerHTML = todayEvent.blurb;
if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { if (todayEvent.class) {
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); headerImgEl.classList.add(todayEvent.class);
} else {
headerImgEl.classList.add(getBanner(todayEvent));
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent);
} }
} }
@ -114,196 +112,100 @@
const month = date.getMonth() + 1; const month = date.getMonth() + 1;
const day = date.getDate(); const day = date.getDate();
if (month == 3 && day == 1) const currentYear = date.getFullYear();
return "Zero Discrimination Day"; const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear();
else if (month == 3 && day == 8) const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate;
return "International Women's Day";
else if (month == 3 && day == 31) if (month === 3 && day === 1)
return "Trans Day of Visibility"; return {
else if (month == 4 && day == 6) blurb: `Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>`,
return "International Asexuality Day"; class: "flag-progress-intersex",
else if (month == 4 && day == 26) };
return "Lesbian Visibility Day"; else if (month === 3 && day === 8)
else if (month == 5 && day == 17) return {
return "IDAHOBIT"; blurb: `Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day}</a>`,
else if (month == 5 && day == 19) class: "symbol-venus",
return "Agender Pride Day"; };
else if (month == 5 && day == 25) else if (month === 3 && day === 31)
return "Pansexual and Panromantic Awareness & Visibility Day"; return {
else if (month == 6) blurb: `Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>`,
return "Pride Month"; class: "flag-trans",
else if (month == 7 && day == 14) };
return "Non-Binary People's Day"; else if (month === 4 && day === 6)
else if (month == 7 && day == 28) return {
return "Leilukin's Birthday"; blurb: `Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>`,
else if (month == 9 && day == 11) class: "flag-ace",
return "Leilukin's Hub Anniversary"; };
else if (month == 9 && day == 23) else if (month === 4 && day === 26)
return "Bi Visibility Day"; return {
else if (month == 10 && day == 8) blurb: `Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>`,
return "International Lesbian Day"; class: "flag-lesbian",
else if (month == 10 && day == 11) };
return "National Coming Out Day"; else if (month === 5 && day === 17)
else if (month == 10 && day == 17) return {
return "Genderfluid Visibility Week"; blurb: `Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a>`,
else if (month == 10 && day == 24) class: "flag-progress",
return "Ace Week"; };
else if (month == 10 && day == 26) else if (month === 5 && day === 19)
return "Intersex Awareness Day"; return {
blurb: `Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a>`,
class: "flag-agender",
};
else if (month === 5 && day === 25)
return {
blurb: `Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Awareness and Visibility Day</a>`,
class: "flag-pan",
};
else if (month === 6)
return {
blurb: `Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!`,
class: "flag-progress-intersex",
};
else if (month === 7 && day === 14)
return {
blurb: `Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>`,
class: "flag-nonbinary",
};
else if (month === 7 && day === 28)
return {
blurb: `Today is Leilukin's Birthday`
};
else if (month === 9 && day === 11)
return {
blurb: `Today is the ${leilukinsHubAnniversary}-year anniversary of the launch of Leilukin's Hub`
};
else if (month === 9 && day === 23)
return {
blurb: `Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>`,
class: "flag-bi",
};
else if (month === 10 && day === 8)
return {
blurb: `Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>`,
class: "flag-lesbian",
};
else if (month === 10 && day === 11)
return {
blurb: `Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>`,
class: "flag-rainbow",
};
else if (month === 10 && day === 17)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>`,
class: "flag-genderfluid",
};
else if (month === 10 && day === 24)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>`,
class: "flag-ace",
};
else if (month === 10 && day === 26)
return {
blurb: `Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>`,
class: "flag-intersex",
};
else else
return "No event"; return null;
}
function getBanner(day) {
switch (day) {
case "Zero Discrimination Day":
return "flag-progress-intersex";
break;
case "International Women's Day":
return "symbol-venus";
break;
case "Trans Day of Visibility":
return "flag-trans";
break;
case "International Asexuality Day":
return "flag-ace";
break;
case "Lesbian Visibility Day":
return "flag-lesbian";
break;
case "IDAHOBIT":
return "flag-progress";
break;
case "Agender Pride Day":
return "flag-agender";
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return "flag-pan";
break;
case "Pride Month":
return "flag-progress-intersex";
break;
case "Non-Binary People's Day":
return "flag-non-binary";
break;
case "Bi Visibility Day":
return "flag-bi";
break;
case "International Lesbian Day":
return "flag-lesbian";
break;
case "National Coming Out Day":
return "flag-rainbow";
break;
case "Genderfluid Visibility Week":
return "flag-genderfluid";
break;
case "Ace Week":
return "flag-ace";
break;
case "Intersex Awareness Day":
return "flag-intersex";
break;
default:
return "";
}
}
function getBlurbHtml(day) {
switch (day) {
case "Zero Discrimination Day":
return `
Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>
`;
break;
case "International Women's Day":
return `
Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day</a>
`;
break;
case "Trans Day of Visibility":
return `
Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>
`;
break;
case "International Asexuality Day":
return `
Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>
`;
break;
case "Lesbian Visibility Day":
return `
Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>
`;
break;
case "IDAHOBIT":
return `
Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a></span>
`;
break;
case "Agender Pride Day":
return `
Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a></span>
`;
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return `
Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Visibility Day</a>
`;
break;
case "Pride Month":
return `
Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!
`;
break;
case "Non-Binary People's Day":
return `
Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>
`;
break;
case "Leilukin's Birthday":
return `
Today is Leilukin's birthday
`;
break;
case "Leilukin's Hub Anniversary":
return `
Today is the anniversary of the launch of Leilukin's Hub
`;
break;
case "Bi Visibility Day":
return `
Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>
`;
break;
case "International Lesbian Day":
return `
Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>
`;
break;
case "National Coming Out Day":
return `
Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>
`;
break;
case "Genderfluid Visibility Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>
`;
break;
case "Ace Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>
`;
break;
case "Intersex Awareness Day":
return `
Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>
`;
break;
default:
return ``;
}
} }
</script> </script>

View File

@ -98,14 +98,12 @@
const todayEvent = getTodayEvent(); const todayEvent = getTodayEvent();
if (todayEvent != "No event") { if (todayEvent) {
heroTopBarEl.classList.remove('hidden'); heroTopBarEl.classList.remove('hidden');
heroTopBarEl.innerHTML = todayEvent.blurb;
if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { if (todayEvent.class) {
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); headerImgEl.classList.add(todayEvent.class);
} else {
headerImgEl.classList.add(getBanner(todayEvent));
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent);
} }
} }
@ -114,196 +112,100 @@
const month = date.getMonth() + 1; const month = date.getMonth() + 1;
const day = date.getDate(); const day = date.getDate();
if (month == 3 && day == 1) const currentYear = date.getFullYear();
return "Zero Discrimination Day"; const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear();
else if (month == 3 && day == 8) const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate;
return "International Women's Day";
else if (month == 3 && day == 31) if (month === 3 && day === 1)
return "Trans Day of Visibility"; return {
else if (month == 4 && day == 6) blurb: `Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>`,
return "International Asexuality Day"; class: "flag-progress-intersex",
else if (month == 4 && day == 26) };
return "Lesbian Visibility Day"; else if (month === 3 && day === 8)
else if (month == 5 && day == 17) return {
return "IDAHOBIT"; blurb: `Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day}</a>`,
else if (month == 5 && day == 19) class: "symbol-venus",
return "Agender Pride Day"; };
else if (month == 5 && day == 25) else if (month === 3 && day === 31)
return "Pansexual and Panromantic Awareness & Visibility Day"; return {
else if (month == 6) blurb: `Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>`,
return "Pride Month"; class: "flag-trans",
else if (month == 7 && day == 14) };
return "Non-Binary People's Day"; else if (month === 4 && day === 6)
else if (month == 7 && day == 28) return {
return "Leilukin's Birthday"; blurb: `Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>`,
else if (month == 9 && day == 11) class: "flag-ace",
return "Leilukin's Hub Anniversary"; };
else if (month == 9 && day == 23) else if (month === 4 && day === 26)
return "Bi Visibility Day"; return {
else if (month == 10 && day == 8) blurb: `Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>`,
return "International Lesbian Day"; class: "flag-lesbian",
else if (month == 10 && day == 11) };
return "National Coming Out Day"; else if (month === 5 && day === 17)
else if (month == 10 && day == 17) return {
return "Genderfluid Visibility Week"; blurb: `Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a>`,
else if (month == 10 && day == 24) class: "flag-progress",
return "Ace Week"; };
else if (month == 10 && day == 26) else if (month === 5 && day === 19)
return "Intersex Awareness Day"; return {
blurb: `Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a>`,
class: "flag-agender",
};
else if (month === 5 && day === 25)
return {
blurb: `Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Awareness and Visibility Day</a>`,
class: "flag-pan",
};
else if (month === 6)
return {
blurb: `Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!`,
class: "flag-progress-intersex",
};
else if (month === 7 && day === 14)
return {
blurb: `Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>`,
class: "flag-nonbinary",
};
else if (month === 7 && day === 28)
return {
blurb: `Today is Leilukin's Birthday`
};
else if (month === 9 && day === 11)
return {
blurb: `Today is the ${leilukinsHubAnniversary}-year anniversary of the launch of Leilukin's Hub`
};
else if (month === 9 && day === 23)
return {
blurb: `Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>`,
class: "flag-bi",
};
else if (month === 10 && day === 8)
return {
blurb: `Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>`,
class: "flag-lesbian",
};
else if (month === 10 && day === 11)
return {
blurb: `Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>`,
class: "flag-rainbow",
};
else if (month === 10 && day === 17)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>`,
class: "flag-genderfluid",
};
else if (month === 10 && day === 24)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>`,
class: "flag-ace",
};
else if (month === 10 && day === 26)
return {
blurb: `Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>`,
class: "flag-intersex",
};
else else
return "No event"; return null;
}
function getBanner(day) {
switch (day) {
case "Zero Discrimination Day":
return "flag-progress-intersex";
break;
case "International Women's Day":
return "symbol-venus";
break;
case "Trans Day of Visibility":
return "flag-trans";
break;
case "International Asexuality Day":
return "flag-ace";
break;
case "Lesbian Visibility Day":
return "flag-lesbian";
break;
case "IDAHOBIT":
return "flag-progress";
break;
case "Agender Pride Day":
return "flag-agender";
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return "flag-pan";
break;
case "Pride Month":
return "flag-progress-intersex";
break;
case "Non-Binary People's Day":
return "flag-non-binary";
break;
case "Bi Visibility Day":
return "flag-bi";
break;
case "International Lesbian Day":
return "flag-lesbian";
break;
case "National Coming Out Day":
return "flag-rainbow";
break;
case "Genderfluid Visibility Week":
return "flag-genderfluid";
break;
case "Ace Week":
return "flag-ace";
break;
case "Intersex Awareness Day":
return "flag-intersex";
break;
default:
return "";
}
}
function getBlurbHtml(day) {
switch (day) {
case "Zero Discrimination Day":
return `
Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>
`;
break;
case "International Women's Day":
return `
Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day</a>
`;
break;
case "Trans Day of Visibility":
return `
Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>
`;
break;
case "International Asexuality Day":
return `
Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>
`;
break;
case "Lesbian Visibility Day":
return `
Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>
`;
break;
case "IDAHOBIT":
return `
Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a></span>
`;
break;
case "Agender Pride Day":
return `
Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a></span>
`;
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return `
Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Visibility Day</a>
`;
break;
case "Pride Month":
return `
Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!
`;
break;
case "Non-Binary People's Day":
return `
Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>
`;
break;
case "Leilukin's Birthday":
return `
Today is Leilukin's birthday
`;
break;
case "Leilukin's Hub Anniversary":
return `
Today is the anniversary of the launch of Leilukin's Hub
`;
break;
case "Bi Visibility Day":
return `
Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>
`;
break;
case "International Lesbian Day":
return `
Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>
`;
break;
case "National Coming Out Day":
return `
Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>
`;
break;
case "Genderfluid Visibility Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>
`;
break;
case "Ace Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>
`;
break;
case "Intersex Awareness Day":
return `
Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>
`;
break;
default:
return ``;
}
} }
</script> </script>

View File

@ -98,14 +98,12 @@
const todayEvent = getTodayEvent(); const todayEvent = getTodayEvent();
if (todayEvent != "No event") { if (todayEvent) {
heroTopBarEl.classList.remove('hidden'); heroTopBarEl.classList.remove('hidden');
heroTopBarEl.innerHTML = todayEvent.blurb;
if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { if (todayEvent.class) {
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); headerImgEl.classList.add(todayEvent.class);
} else {
headerImgEl.classList.add(getBanner(todayEvent));
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent);
} }
} }
@ -114,196 +112,100 @@
const month = date.getMonth() + 1; const month = date.getMonth() + 1;
const day = date.getDate(); const day = date.getDate();
if (month == 3 && day == 1) const currentYear = date.getFullYear();
return "Zero Discrimination Day"; const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear();
else if (month == 3 && day == 8) const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate;
return "International Women's Day";
else if (month == 3 && day == 31) if (month === 3 && day === 1)
return "Trans Day of Visibility"; return {
else if (month == 4 && day == 6) blurb: `Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>`,
return "International Asexuality Day"; class: "flag-progress-intersex",
else if (month == 4 && day == 26) };
return "Lesbian Visibility Day"; else if (month === 3 && day === 8)
else if (month == 5 && day == 17) return {
return "IDAHOBIT"; blurb: `Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day}</a>`,
else if (month == 5 && day == 19) class: "symbol-venus",
return "Agender Pride Day"; };
else if (month == 5 && day == 25) else if (month === 3 && day === 31)
return "Pansexual and Panromantic Awareness & Visibility Day"; return {
else if (month == 6) blurb: `Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>`,
return "Pride Month"; class: "flag-trans",
else if (month == 7 && day == 14) };
return "Non-Binary People's Day"; else if (month === 4 && day === 6)
else if (month == 7 && day == 28) return {
return "Leilukin's Birthday"; blurb: `Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>`,
else if (month == 9 && day == 11) class: "flag-ace",
return "Leilukin's Hub Anniversary"; };
else if (month == 9 && day == 23) else if (month === 4 && day === 26)
return "Bi Visibility Day"; return {
else if (month == 10 && day == 8) blurb: `Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>`,
return "International Lesbian Day"; class: "flag-lesbian",
else if (month == 10 && day == 11) };
return "National Coming Out Day"; else if (month === 5 && day === 17)
else if (month == 10 && day == 17) return {
return "Genderfluid Visibility Week"; blurb: `Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a>`,
else if (month == 10 && day == 24) class: "flag-progress",
return "Ace Week"; };
else if (month == 10 && day == 26) else if (month === 5 && day === 19)
return "Intersex Awareness Day"; return {
blurb: `Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a>`,
class: "flag-agender",
};
else if (month === 5 && day === 25)
return {
blurb: `Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Awareness and Visibility Day</a>`,
class: "flag-pan",
};
else if (month === 6)
return {
blurb: `Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!`,
class: "flag-progress-intersex",
};
else if (month === 7 && day === 14)
return {
blurb: `Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>`,
class: "flag-nonbinary",
};
else if (month === 7 && day === 28)
return {
blurb: `Today is Leilukin's Birthday`
};
else if (month === 9 && day === 11)
return {
blurb: `Today is the ${leilukinsHubAnniversary}-year anniversary of the launch of Leilukin's Hub`
};
else if (month === 9 && day === 23)
return {
blurb: `Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>`,
class: "flag-bi",
};
else if (month === 10 && day === 8)
return {
blurb: `Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>`,
class: "flag-lesbian",
};
else if (month === 10 && day === 11)
return {
blurb: `Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>`,
class: "flag-rainbow",
};
else if (month === 10 && day === 17)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>`,
class: "flag-genderfluid",
};
else if (month === 10 && day === 24)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>`,
class: "flag-ace",
};
else if (month === 10 && day === 26)
return {
blurb: `Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>`,
class: "flag-intersex",
};
else else
return "No event"; return null;
}
function getBanner(day) {
switch (day) {
case "Zero Discrimination Day":
return "flag-progress-intersex";
break;
case "International Women's Day":
return "symbol-venus";
break;
case "Trans Day of Visibility":
return "flag-trans";
break;
case "International Asexuality Day":
return "flag-ace";
break;
case "Lesbian Visibility Day":
return "flag-lesbian";
break;
case "IDAHOBIT":
return "flag-progress";
break;
case "Agender Pride Day":
return "flag-agender";
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return "flag-pan";
break;
case "Pride Month":
return "flag-progress-intersex";
break;
case "Non-Binary People's Day":
return "flag-non-binary";
break;
case "Bi Visibility Day":
return "flag-bi";
break;
case "International Lesbian Day":
return "flag-lesbian";
break;
case "National Coming Out Day":
return "flag-rainbow";
break;
case "Genderfluid Visibility Week":
return "flag-genderfluid";
break;
case "Ace Week":
return "flag-ace";
break;
case "Intersex Awareness Day":
return "flag-intersex";
break;
default:
return "";
}
}
function getBlurbHtml(day) {
switch (day) {
case "Zero Discrimination Day":
return `
Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>
`;
break;
case "International Women's Day":
return `
Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day</a>
`;
break;
case "Trans Day of Visibility":
return `
Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>
`;
break;
case "International Asexuality Day":
return `
Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>
`;
break;
case "Lesbian Visibility Day":
return `
Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>
`;
break;
case "IDAHOBIT":
return `
Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a></span>
`;
break;
case "Agender Pride Day":
return `
Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a></span>
`;
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return `
Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Visibility Day</a>
`;
break;
case "Pride Month":
return `
Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!
`;
break;
case "Non-Binary People's Day":
return `
Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>
`;
break;
case "Leilukin's Birthday":
return `
Today is Leilukin's birthday
`;
break;
case "Leilukin's Hub Anniversary":
return `
Today is the anniversary of the launch of Leilukin's Hub
`;
break;
case "Bi Visibility Day":
return `
Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>
`;
break;
case "International Lesbian Day":
return `
Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>
`;
break;
case "National Coming Out Day":
return `
Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>
`;
break;
case "Genderfluid Visibility Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>
`;
break;
case "Ace Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>
`;
break;
case "Intersex Awareness Day":
return `
Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>
`;
break;
default:
return ``;
}
} }
</script> </script>

View File

@ -98,14 +98,12 @@
const todayEvent = getTodayEvent(); const todayEvent = getTodayEvent();
if (todayEvent != "No event") { if (todayEvent) {
heroTopBarEl.classList.remove('hidden'); heroTopBarEl.classList.remove('hidden');
heroTopBarEl.innerHTML = todayEvent.blurb;
if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { if (todayEvent.class) {
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); headerImgEl.classList.add(todayEvent.class);
} else {
headerImgEl.classList.add(getBanner(todayEvent));
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent);
} }
} }
@ -114,196 +112,100 @@
const month = date.getMonth() + 1; const month = date.getMonth() + 1;
const day = date.getDate(); const day = date.getDate();
if (month == 3 && day == 1) const currentYear = date.getFullYear();
return "Zero Discrimination Day"; const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear();
else if (month == 3 && day == 8) const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate;
return "International Women's Day";
else if (month == 3 && day == 31) if (month === 3 && day === 1)
return "Trans Day of Visibility"; return {
else if (month == 4 && day == 6) blurb: `Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>`,
return "International Asexuality Day"; class: "flag-progress-intersex",
else if (month == 4 && day == 26) };
return "Lesbian Visibility Day"; else if (month === 3 && day === 8)
else if (month == 5 && day == 17) return {
return "IDAHOBIT"; blurb: `Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day}</a>`,
else if (month == 5 && day == 19) class: "symbol-venus",
return "Agender Pride Day"; };
else if (month == 5 && day == 25) else if (month === 3 && day === 31)
return "Pansexual and Panromantic Awareness & Visibility Day"; return {
else if (month == 6) blurb: `Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>`,
return "Pride Month"; class: "flag-trans",
else if (month == 7 && day == 14) };
return "Non-Binary People's Day"; else if (month === 4 && day === 6)
else if (month == 7 && day == 28) return {
return "Leilukin's Birthday"; blurb: `Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>`,
else if (month == 9 && day == 11) class: "flag-ace",
return "Leilukin's Hub Anniversary"; };
else if (month == 9 && day == 23) else if (month === 4 && day === 26)
return "Bi Visibility Day"; return {
else if (month == 10 && day == 8) blurb: `Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>`,
return "International Lesbian Day"; class: "flag-lesbian",
else if (month == 10 && day == 11) };
return "National Coming Out Day"; else if (month === 5 && day === 17)
else if (month == 10 && day == 17) return {
return "Genderfluid Visibility Week"; blurb: `Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a>`,
else if (month == 10 && day == 24) class: "flag-progress",
return "Ace Week"; };
else if (month == 10 && day == 26) else if (month === 5 && day === 19)
return "Intersex Awareness Day"; return {
blurb: `Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a>`,
class: "flag-agender",
};
else if (month === 5 && day === 25)
return {
blurb: `Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Awareness and Visibility Day</a>`,
class: "flag-pan",
};
else if (month === 6)
return {
blurb: `Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!`,
class: "flag-progress-intersex",
};
else if (month === 7 && day === 14)
return {
blurb: `Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>`,
class: "flag-nonbinary",
};
else if (month === 7 && day === 28)
return {
blurb: `Today is Leilukin's Birthday`
};
else if (month === 9 && day === 11)
return {
blurb: `Today is the ${leilukinsHubAnniversary}-year anniversary of the launch of Leilukin's Hub`
};
else if (month === 9 && day === 23)
return {
blurb: `Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>`,
class: "flag-bi",
};
else if (month === 10 && day === 8)
return {
blurb: `Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>`,
class: "flag-lesbian",
};
else if (month === 10 && day === 11)
return {
blurb: `Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>`,
class: "flag-rainbow",
};
else if (month === 10 && day === 17)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>`,
class: "flag-genderfluid",
};
else if (month === 10 && day === 24)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>`,
class: "flag-ace",
};
else if (month === 10 && day === 26)
return {
blurb: `Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>`,
class: "flag-intersex",
};
else else
return "No event"; return null;
}
function getBanner(day) {
switch (day) {
case "Zero Discrimination Day":
return "flag-progress-intersex";
break;
case "International Women's Day":
return "symbol-venus";
break;
case "Trans Day of Visibility":
return "flag-trans";
break;
case "International Asexuality Day":
return "flag-ace";
break;
case "Lesbian Visibility Day":
return "flag-lesbian";
break;
case "IDAHOBIT":
return "flag-progress";
break;
case "Agender Pride Day":
return "flag-agender";
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return "flag-pan";
break;
case "Pride Month":
return "flag-progress-intersex";
break;
case "Non-Binary People's Day":
return "flag-non-binary";
break;
case "Bi Visibility Day":
return "flag-bi";
break;
case "International Lesbian Day":
return "flag-lesbian";
break;
case "National Coming Out Day":
return "flag-rainbow";
break;
case "Genderfluid Visibility Week":
return "flag-genderfluid";
break;
case "Ace Week":
return "flag-ace";
break;
case "Intersex Awareness Day":
return "flag-intersex";
break;
default:
return "";
}
}
function getBlurbHtml(day) {
switch (day) {
case "Zero Discrimination Day":
return `
Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>
`;
break;
case "International Women's Day":
return `
Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day</a>
`;
break;
case "Trans Day of Visibility":
return `
Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>
`;
break;
case "International Asexuality Day":
return `
Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>
`;
break;
case "Lesbian Visibility Day":
return `
Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>
`;
break;
case "IDAHOBIT":
return `
Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a></span>
`;
break;
case "Agender Pride Day":
return `
Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a></span>
`;
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return `
Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Visibility Day</a>
`;
break;
case "Pride Month":
return `
Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!
`;
break;
case "Non-Binary People's Day":
return `
Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>
`;
break;
case "Leilukin's Birthday":
return `
Today is Leilukin's birthday
`;
break;
case "Leilukin's Hub Anniversary":
return `
Today is the anniversary of the launch of Leilukin's Hub
`;
break;
case "Bi Visibility Day":
return `
Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>
`;
break;
case "International Lesbian Day":
return `
Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>
`;
break;
case "National Coming Out Day":
return `
Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>
`;
break;
case "Genderfluid Visibility Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>
`;
break;
case "Ace Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>
`;
break;
case "Intersex Awareness Day":
return `
Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>
`;
break;
default:
return ``;
}
} }
</script> </script>

View File

@ -98,14 +98,12 @@
const todayEvent = getTodayEvent(); const todayEvent = getTodayEvent();
if (todayEvent != "No event") { if (todayEvent) {
heroTopBarEl.classList.remove('hidden'); heroTopBarEl.classList.remove('hidden');
heroTopBarEl.innerHTML = todayEvent.blurb;
if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { if (todayEvent.class) {
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); headerImgEl.classList.add(todayEvent.class);
} else {
headerImgEl.classList.add(getBanner(todayEvent));
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent);
} }
} }
@ -114,196 +112,100 @@
const month = date.getMonth() + 1; const month = date.getMonth() + 1;
const day = date.getDate(); const day = date.getDate();
if (month == 3 && day == 1) const currentYear = date.getFullYear();
return "Zero Discrimination Day"; const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear();
else if (month == 3 && day == 8) const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate;
return "International Women's Day";
else if (month == 3 && day == 31) if (month === 3 && day === 1)
return "Trans Day of Visibility"; return {
else if (month == 4 && day == 6) blurb: `Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>`,
return "International Asexuality Day"; class: "flag-progress-intersex",
else if (month == 4 && day == 26) };
return "Lesbian Visibility Day"; else if (month === 3 && day === 8)
else if (month == 5 && day == 17) return {
return "IDAHOBIT"; blurb: `Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day}</a>`,
else if (month == 5 && day == 19) class: "symbol-venus",
return "Agender Pride Day"; };
else if (month == 5 && day == 25) else if (month === 3 && day === 31)
return "Pansexual and Panromantic Awareness & Visibility Day"; return {
else if (month == 6) blurb: `Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>`,
return "Pride Month"; class: "flag-trans",
else if (month == 7 && day == 14) };
return "Non-Binary People's Day"; else if (month === 4 && day === 6)
else if (month == 7 && day == 28) return {
return "Leilukin's Birthday"; blurb: `Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>`,
else if (month == 9 && day == 11) class: "flag-ace",
return "Leilukin's Hub Anniversary"; };
else if (month == 9 && day == 23) else if (month === 4 && day === 26)
return "Bi Visibility Day"; return {
else if (month == 10 && day == 8) blurb: `Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>`,
return "International Lesbian Day"; class: "flag-lesbian",
else if (month == 10 && day == 11) };
return "National Coming Out Day"; else if (month === 5 && day === 17)
else if (month == 10 && day == 17) return {
return "Genderfluid Visibility Week"; blurb: `Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a>`,
else if (month == 10 && day == 24) class: "flag-progress",
return "Ace Week"; };
else if (month == 10 && day == 26) else if (month === 5 && day === 19)
return "Intersex Awareness Day"; return {
blurb: `Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a>`,
class: "flag-agender",
};
else if (month === 5 && day === 25)
return {
blurb: `Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Awareness and Visibility Day</a>`,
class: "flag-pan",
};
else if (month === 6)
return {
blurb: `Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!`,
class: "flag-progress-intersex",
};
else if (month === 7 && day === 14)
return {
blurb: `Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>`,
class: "flag-nonbinary",
};
else if (month === 7 && day === 28)
return {
blurb: `Today is Leilukin's Birthday`
};
else if (month === 9 && day === 11)
return {
blurb: `Today is the ${leilukinsHubAnniversary}-year anniversary of the launch of Leilukin's Hub`
};
else if (month === 9 && day === 23)
return {
blurb: `Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>`,
class: "flag-bi",
};
else if (month === 10 && day === 8)
return {
blurb: `Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>`,
class: "flag-lesbian",
};
else if (month === 10 && day === 11)
return {
blurb: `Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>`,
class: "flag-rainbow",
};
else if (month === 10 && day === 17)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>`,
class: "flag-genderfluid",
};
else if (month === 10 && day === 24)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>`,
class: "flag-ace",
};
else if (month === 10 && day === 26)
return {
blurb: `Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>`,
class: "flag-intersex",
};
else else
return "No event"; return null;
}
function getBanner(day) {
switch (day) {
case "Zero Discrimination Day":
return "flag-progress-intersex";
break;
case "International Women's Day":
return "symbol-venus";
break;
case "Trans Day of Visibility":
return "flag-trans";
break;
case "International Asexuality Day":
return "flag-ace";
break;
case "Lesbian Visibility Day":
return "flag-lesbian";
break;
case "IDAHOBIT":
return "flag-progress";
break;
case "Agender Pride Day":
return "flag-agender";
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return "flag-pan";
break;
case "Pride Month":
return "flag-progress-intersex";
break;
case "Non-Binary People's Day":
return "flag-non-binary";
break;
case "Bi Visibility Day":
return "flag-bi";
break;
case "International Lesbian Day":
return "flag-lesbian";
break;
case "National Coming Out Day":
return "flag-rainbow";
break;
case "Genderfluid Visibility Week":
return "flag-genderfluid";
break;
case "Ace Week":
return "flag-ace";
break;
case "Intersex Awareness Day":
return "flag-intersex";
break;
default:
return "";
}
}
function getBlurbHtml(day) {
switch (day) {
case "Zero Discrimination Day":
return `
Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>
`;
break;
case "International Women's Day":
return `
Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day</a>
`;
break;
case "Trans Day of Visibility":
return `
Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>
`;
break;
case "International Asexuality Day":
return `
Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>
`;
break;
case "Lesbian Visibility Day":
return `
Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>
`;
break;
case "IDAHOBIT":
return `
Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a></span>
`;
break;
case "Agender Pride Day":
return `
Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a></span>
`;
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return `
Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Visibility Day</a>
`;
break;
case "Pride Month":
return `
Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!
`;
break;
case "Non-Binary People's Day":
return `
Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>
`;
break;
case "Leilukin's Birthday":
return `
Today is Leilukin's birthday
`;
break;
case "Leilukin's Hub Anniversary":
return `
Today is the anniversary of the launch of Leilukin's Hub
`;
break;
case "Bi Visibility Day":
return `
Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>
`;
break;
case "International Lesbian Day":
return `
Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>
`;
break;
case "National Coming Out Day":
return `
Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>
`;
break;
case "Genderfluid Visibility Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>
`;
break;
case "Ace Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>
`;
break;
case "Intersex Awareness Day":
return `
Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>
`;
break;
default:
return ``;
}
} }
</script> </script>

View File

@ -98,14 +98,12 @@
const todayEvent = getTodayEvent(); const todayEvent = getTodayEvent();
if (todayEvent != "No event") { if (todayEvent) {
heroTopBarEl.classList.remove('hidden'); heroTopBarEl.classList.remove('hidden');
heroTopBarEl.innerHTML = todayEvent.blurb;
if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { if (todayEvent.class) {
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); headerImgEl.classList.add(todayEvent.class);
} else {
headerImgEl.classList.add(getBanner(todayEvent));
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent);
} }
} }
@ -114,196 +112,100 @@
const month = date.getMonth() + 1; const month = date.getMonth() + 1;
const day = date.getDate(); const day = date.getDate();
if (month == 3 && day == 1) const currentYear = date.getFullYear();
return "Zero Discrimination Day"; const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear();
else if (month == 3 && day == 8) const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate;
return "International Women's Day";
else if (month == 3 && day == 31) if (month === 3 && day === 1)
return "Trans Day of Visibility"; return {
else if (month == 4 && day == 6) blurb: `Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>`,
return "International Asexuality Day"; class: "flag-progress-intersex",
else if (month == 4 && day == 26) };
return "Lesbian Visibility Day"; else if (month === 3 && day === 8)
else if (month == 5 && day == 17) return {
return "IDAHOBIT"; blurb: `Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day}</a>`,
else if (month == 5 && day == 19) class: "symbol-venus",
return "Agender Pride Day"; };
else if (month == 5 && day == 25) else if (month === 3 && day === 31)
return "Pansexual and Panromantic Awareness & Visibility Day"; return {
else if (month == 6) blurb: `Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>`,
return "Pride Month"; class: "flag-trans",
else if (month == 7 && day == 14) };
return "Non-Binary People's Day"; else if (month === 4 && day === 6)
else if (month == 7 && day == 28) return {
return "Leilukin's Birthday"; blurb: `Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>`,
else if (month == 9 && day == 11) class: "flag-ace",
return "Leilukin's Hub Anniversary"; };
else if (month == 9 && day == 23) else if (month === 4 && day === 26)
return "Bi Visibility Day"; return {
else if (month == 10 && day == 8) blurb: `Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>`,
return "International Lesbian Day"; class: "flag-lesbian",
else if (month == 10 && day == 11) };
return "National Coming Out Day"; else if (month === 5 && day === 17)
else if (month == 10 && day == 17) return {
return "Genderfluid Visibility Week"; blurb: `Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a>`,
else if (month == 10 && day == 24) class: "flag-progress",
return "Ace Week"; };
else if (month == 10 && day == 26) else if (month === 5 && day === 19)
return "Intersex Awareness Day"; return {
blurb: `Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a>`,
class: "flag-agender",
};
else if (month === 5 && day === 25)
return {
blurb: `Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Awareness and Visibility Day</a>`,
class: "flag-pan",
};
else if (month === 6)
return {
blurb: `Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!`,
class: "flag-progress-intersex",
};
else if (month === 7 && day === 14)
return {
blurb: `Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>`,
class: "flag-nonbinary",
};
else if (month === 7 && day === 28)
return {
blurb: `Today is Leilukin's Birthday`
};
else if (month === 9 && day === 11)
return {
blurb: `Today is the ${leilukinsHubAnniversary}-year anniversary of the launch of Leilukin's Hub`
};
else if (month === 9 && day === 23)
return {
blurb: `Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>`,
class: "flag-bi",
};
else if (month === 10 && day === 8)
return {
blurb: `Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>`,
class: "flag-lesbian",
};
else if (month === 10 && day === 11)
return {
blurb: `Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>`,
class: "flag-rainbow",
};
else if (month === 10 && day === 17)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>`,
class: "flag-genderfluid",
};
else if (month === 10 && day === 24)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>`,
class: "flag-ace",
};
else if (month === 10 && day === 26)
return {
blurb: `Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>`,
class: "flag-intersex",
};
else else
return "No event"; return null;
}
function getBanner(day) {
switch (day) {
case "Zero Discrimination Day":
return "flag-progress-intersex";
break;
case "International Women's Day":
return "symbol-venus";
break;
case "Trans Day of Visibility":
return "flag-trans";
break;
case "International Asexuality Day":
return "flag-ace";
break;
case "Lesbian Visibility Day":
return "flag-lesbian";
break;
case "IDAHOBIT":
return "flag-progress";
break;
case "Agender Pride Day":
return "flag-agender";
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return "flag-pan";
break;
case "Pride Month":
return "flag-progress-intersex";
break;
case "Non-Binary People's Day":
return "flag-non-binary";
break;
case "Bi Visibility Day":
return "flag-bi";
break;
case "International Lesbian Day":
return "flag-lesbian";
break;
case "National Coming Out Day":
return "flag-rainbow";
break;
case "Genderfluid Visibility Week":
return "flag-genderfluid";
break;
case "Ace Week":
return "flag-ace";
break;
case "Intersex Awareness Day":
return "flag-intersex";
break;
default:
return "";
}
}
function getBlurbHtml(day) {
switch (day) {
case "Zero Discrimination Day":
return `
Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>
`;
break;
case "International Women's Day":
return `
Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day</a>
`;
break;
case "Trans Day of Visibility":
return `
Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>
`;
break;
case "International Asexuality Day":
return `
Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>
`;
break;
case "Lesbian Visibility Day":
return `
Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>
`;
break;
case "IDAHOBIT":
return `
Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a></span>
`;
break;
case "Agender Pride Day":
return `
Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a></span>
`;
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return `
Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Visibility Day</a>
`;
break;
case "Pride Month":
return `
Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!
`;
break;
case "Non-Binary People's Day":
return `
Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>
`;
break;
case "Leilukin's Birthday":
return `
Today is Leilukin's birthday
`;
break;
case "Leilukin's Hub Anniversary":
return `
Today is the anniversary of the launch of Leilukin's Hub
`;
break;
case "Bi Visibility Day":
return `
Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>
`;
break;
case "International Lesbian Day":
return `
Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>
`;
break;
case "National Coming Out Day":
return `
Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>
`;
break;
case "Genderfluid Visibility Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>
`;
break;
case "Ace Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>
`;
break;
case "Intersex Awareness Day":
return `
Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>
`;
break;
default:
return ``;
}
} }
</script> </script>

View File

@ -98,14 +98,12 @@
const todayEvent = getTodayEvent(); const todayEvent = getTodayEvent();
if (todayEvent != "No event") { if (todayEvent) {
heroTopBarEl.classList.remove('hidden'); heroTopBarEl.classList.remove('hidden');
heroTopBarEl.innerHTML = todayEvent.blurb;
if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { if (todayEvent.class) {
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); headerImgEl.classList.add(todayEvent.class);
} else {
headerImgEl.classList.add(getBanner(todayEvent));
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent);
} }
} }
@ -114,196 +112,100 @@
const month = date.getMonth() + 1; const month = date.getMonth() + 1;
const day = date.getDate(); const day = date.getDate();
if (month == 3 && day == 1) const currentYear = date.getFullYear();
return "Zero Discrimination Day"; const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear();
else if (month == 3 && day == 8) const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate;
return "International Women's Day";
else if (month == 3 && day == 31) if (month === 3 && day === 1)
return "Trans Day of Visibility"; return {
else if (month == 4 && day == 6) blurb: `Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>`,
return "International Asexuality Day"; class: "flag-progress-intersex",
else if (month == 4 && day == 26) };
return "Lesbian Visibility Day"; else if (month === 3 && day === 8)
else if (month == 5 && day == 17) return {
return "IDAHOBIT"; blurb: `Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day}</a>`,
else if (month == 5 && day == 19) class: "symbol-venus",
return "Agender Pride Day"; };
else if (month == 5 && day == 25) else if (month === 3 && day === 31)
return "Pansexual and Panromantic Awareness & Visibility Day"; return {
else if (month == 6) blurb: `Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>`,
return "Pride Month"; class: "flag-trans",
else if (month == 7 && day == 14) };
return "Non-Binary People's Day"; else if (month === 4 && day === 6)
else if (month == 7 && day == 28) return {
return "Leilukin's Birthday"; blurb: `Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>`,
else if (month == 9 && day == 11) class: "flag-ace",
return "Leilukin's Hub Anniversary"; };
else if (month == 9 && day == 23) else if (month === 4 && day === 26)
return "Bi Visibility Day"; return {
else if (month == 10 && day == 8) blurb: `Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>`,
return "International Lesbian Day"; class: "flag-lesbian",
else if (month == 10 && day == 11) };
return "National Coming Out Day"; else if (month === 5 && day === 17)
else if (month == 10 && day == 17) return {
return "Genderfluid Visibility Week"; blurb: `Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a>`,
else if (month == 10 && day == 24) class: "flag-progress",
return "Ace Week"; };
else if (month == 10 && day == 26) else if (month === 5 && day === 19)
return "Intersex Awareness Day"; return {
blurb: `Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a>`,
class: "flag-agender",
};
else if (month === 5 && day === 25)
return {
blurb: `Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Awareness and Visibility Day</a>`,
class: "flag-pan",
};
else if (month === 6)
return {
blurb: `Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!`,
class: "flag-progress-intersex",
};
else if (month === 7 && day === 14)
return {
blurb: `Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>`,
class: "flag-nonbinary",
};
else if (month === 7 && day === 28)
return {
blurb: `Today is Leilukin's Birthday`
};
else if (month === 9 && day === 11)
return {
blurb: `Today is the ${leilukinsHubAnniversary}-year anniversary of the launch of Leilukin's Hub`
};
else if (month === 9 && day === 23)
return {
blurb: `Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>`,
class: "flag-bi",
};
else if (month === 10 && day === 8)
return {
blurb: `Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>`,
class: "flag-lesbian",
};
else if (month === 10 && day === 11)
return {
blurb: `Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>`,
class: "flag-rainbow",
};
else if (month === 10 && day === 17)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>`,
class: "flag-genderfluid",
};
else if (month === 10 && day === 24)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>`,
class: "flag-ace",
};
else if (month === 10 && day === 26)
return {
blurb: `Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>`,
class: "flag-intersex",
};
else else
return "No event"; return null;
}
function getBanner(day) {
switch (day) {
case "Zero Discrimination Day":
return "flag-progress-intersex";
break;
case "International Women's Day":
return "symbol-venus";
break;
case "Trans Day of Visibility":
return "flag-trans";
break;
case "International Asexuality Day":
return "flag-ace";
break;
case "Lesbian Visibility Day":
return "flag-lesbian";
break;
case "IDAHOBIT":
return "flag-progress";
break;
case "Agender Pride Day":
return "flag-agender";
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return "flag-pan";
break;
case "Pride Month":
return "flag-progress-intersex";
break;
case "Non-Binary People's Day":
return "flag-non-binary";
break;
case "Bi Visibility Day":
return "flag-bi";
break;
case "International Lesbian Day":
return "flag-lesbian";
break;
case "National Coming Out Day":
return "flag-rainbow";
break;
case "Genderfluid Visibility Week":
return "flag-genderfluid";
break;
case "Ace Week":
return "flag-ace";
break;
case "Intersex Awareness Day":
return "flag-intersex";
break;
default:
return "";
}
}
function getBlurbHtml(day) {
switch (day) {
case "Zero Discrimination Day":
return `
Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>
`;
break;
case "International Women's Day":
return `
Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day</a>
`;
break;
case "Trans Day of Visibility":
return `
Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>
`;
break;
case "International Asexuality Day":
return `
Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>
`;
break;
case "Lesbian Visibility Day":
return `
Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>
`;
break;
case "IDAHOBIT":
return `
Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a></span>
`;
break;
case "Agender Pride Day":
return `
Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a></span>
`;
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return `
Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Visibility Day</a>
`;
break;
case "Pride Month":
return `
Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!
`;
break;
case "Non-Binary People's Day":
return `
Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>
`;
break;
case "Leilukin's Birthday":
return `
Today is Leilukin's birthday
`;
break;
case "Leilukin's Hub Anniversary":
return `
Today is the anniversary of the launch of Leilukin's Hub
`;
break;
case "Bi Visibility Day":
return `
Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>
`;
break;
case "International Lesbian Day":
return `
Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>
`;
break;
case "National Coming Out Day":
return `
Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>
`;
break;
case "Genderfluid Visibility Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>
`;
break;
case "Ace Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>
`;
break;
case "Intersex Awareness Day":
return `
Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>
`;
break;
default:
return ``;
}
} }
</script> </script>

View File

@ -98,14 +98,12 @@
const todayEvent = getTodayEvent(); const todayEvent = getTodayEvent();
if (todayEvent != "No event") { if (todayEvent) {
heroTopBarEl.classList.remove('hidden'); heroTopBarEl.classList.remove('hidden');
heroTopBarEl.innerHTML = todayEvent.blurb;
if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { if (todayEvent.class) {
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); headerImgEl.classList.add(todayEvent.class);
} else {
headerImgEl.classList.add(getBanner(todayEvent));
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent);
} }
} }
@ -114,196 +112,100 @@
const month = date.getMonth() + 1; const month = date.getMonth() + 1;
const day = date.getDate(); const day = date.getDate();
if (month == 3 && day == 1) const currentYear = date.getFullYear();
return "Zero Discrimination Day"; const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear();
else if (month == 3 && day == 8) const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate;
return "International Women's Day";
else if (month == 3 && day == 31) if (month === 3 && day === 1)
return "Trans Day of Visibility"; return {
else if (month == 4 && day == 6) blurb: `Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>`,
return "International Asexuality Day"; class: "flag-progress-intersex",
else if (month == 4 && day == 26) };
return "Lesbian Visibility Day"; else if (month === 3 && day === 8)
else if (month == 5 && day == 17) return {
return "IDAHOBIT"; blurb: `Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day}</a>`,
else if (month == 5 && day == 19) class: "symbol-venus",
return "Agender Pride Day"; };
else if (month == 5 && day == 25) else if (month === 3 && day === 31)
return "Pansexual and Panromantic Awareness & Visibility Day"; return {
else if (month == 6) blurb: `Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>`,
return "Pride Month"; class: "flag-trans",
else if (month == 7 && day == 14) };
return "Non-Binary People's Day"; else if (month === 4 && day === 6)
else if (month == 7 && day == 28) return {
return "Leilukin's Birthday"; blurb: `Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>`,
else if (month == 9 && day == 11) class: "flag-ace",
return "Leilukin's Hub Anniversary"; };
else if (month == 9 && day == 23) else if (month === 4 && day === 26)
return "Bi Visibility Day"; return {
else if (month == 10 && day == 8) blurb: `Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>`,
return "International Lesbian Day"; class: "flag-lesbian",
else if (month == 10 && day == 11) };
return "National Coming Out Day"; else if (month === 5 && day === 17)
else if (month == 10 && day == 17) return {
return "Genderfluid Visibility Week"; blurb: `Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a>`,
else if (month == 10 && day == 24) class: "flag-progress",
return "Ace Week"; };
else if (month == 10 && day == 26) else if (month === 5 && day === 19)
return "Intersex Awareness Day"; return {
blurb: `Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a>`,
class: "flag-agender",
};
else if (month === 5 && day === 25)
return {
blurb: `Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Awareness and Visibility Day</a>`,
class: "flag-pan",
};
else if (month === 6)
return {
blurb: `Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!`,
class: "flag-progress-intersex",
};
else if (month === 7 && day === 14)
return {
blurb: `Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>`,
class: "flag-nonbinary",
};
else if (month === 7 && day === 28)
return {
blurb: `Today is Leilukin's Birthday`
};
else if (month === 9 && day === 11)
return {
blurb: `Today is the ${leilukinsHubAnniversary}-year anniversary of the launch of Leilukin's Hub`
};
else if (month === 9 && day === 23)
return {
blurb: `Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>`,
class: "flag-bi",
};
else if (month === 10 && day === 8)
return {
blurb: `Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>`,
class: "flag-lesbian",
};
else if (month === 10 && day === 11)
return {
blurb: `Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>`,
class: "flag-rainbow",
};
else if (month === 10 && day === 17)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>`,
class: "flag-genderfluid",
};
else if (month === 10 && day === 24)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>`,
class: "flag-ace",
};
else if (month === 10 && day === 26)
return {
blurb: `Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>`,
class: "flag-intersex",
};
else else
return "No event"; return null;
}
function getBanner(day) {
switch (day) {
case "Zero Discrimination Day":
return "flag-progress-intersex";
break;
case "International Women's Day":
return "symbol-venus";
break;
case "Trans Day of Visibility":
return "flag-trans";
break;
case "International Asexuality Day":
return "flag-ace";
break;
case "Lesbian Visibility Day":
return "flag-lesbian";
break;
case "IDAHOBIT":
return "flag-progress";
break;
case "Agender Pride Day":
return "flag-agender";
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return "flag-pan";
break;
case "Pride Month":
return "flag-progress-intersex";
break;
case "Non-Binary People's Day":
return "flag-non-binary";
break;
case "Bi Visibility Day":
return "flag-bi";
break;
case "International Lesbian Day":
return "flag-lesbian";
break;
case "National Coming Out Day":
return "flag-rainbow";
break;
case "Genderfluid Visibility Week":
return "flag-genderfluid";
break;
case "Ace Week":
return "flag-ace";
break;
case "Intersex Awareness Day":
return "flag-intersex";
break;
default:
return "";
}
}
function getBlurbHtml(day) {
switch (day) {
case "Zero Discrimination Day":
return `
Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>
`;
break;
case "International Women's Day":
return `
Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day</a>
`;
break;
case "Trans Day of Visibility":
return `
Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>
`;
break;
case "International Asexuality Day":
return `
Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>
`;
break;
case "Lesbian Visibility Day":
return `
Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>
`;
break;
case "IDAHOBIT":
return `
Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a></span>
`;
break;
case "Agender Pride Day":
return `
Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a></span>
`;
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return `
Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Visibility Day</a>
`;
break;
case "Pride Month":
return `
Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!
`;
break;
case "Non-Binary People's Day":
return `
Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>
`;
break;
case "Leilukin's Birthday":
return `
Today is Leilukin's birthday
`;
break;
case "Leilukin's Hub Anniversary":
return `
Today is the anniversary of the launch of Leilukin's Hub
`;
break;
case "Bi Visibility Day":
return `
Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>
`;
break;
case "International Lesbian Day":
return `
Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>
`;
break;
case "National Coming Out Day":
return `
Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>
`;
break;
case "Genderfluid Visibility Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>
`;
break;
case "Ace Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>
`;
break;
case "Intersex Awareness Day":
return `
Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>
`;
break;
default:
return ``;
}
} }
</script> </script>

View File

@ -98,14 +98,12 @@
const todayEvent = getTodayEvent(); const todayEvent = getTodayEvent();
if (todayEvent != "No event") { if (todayEvent) {
heroTopBarEl.classList.remove('hidden'); heroTopBarEl.classList.remove('hidden');
heroTopBarEl.innerHTML = todayEvent.blurb;
if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { if (todayEvent.class) {
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); headerImgEl.classList.add(todayEvent.class);
} else {
headerImgEl.classList.add(getBanner(todayEvent));
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent);
} }
} }
@ -114,196 +112,100 @@
const month = date.getMonth() + 1; const month = date.getMonth() + 1;
const day = date.getDate(); const day = date.getDate();
if (month == 3 && day == 1) const currentYear = date.getFullYear();
return "Zero Discrimination Day"; const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear();
else if (month == 3 && day == 8) const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate;
return "International Women's Day";
else if (month == 3 && day == 31) if (month === 3 && day === 1)
return "Trans Day of Visibility"; return {
else if (month == 4 && day == 6) blurb: `Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>`,
return "International Asexuality Day"; class: "flag-progress-intersex",
else if (month == 4 && day == 26) };
return "Lesbian Visibility Day"; else if (month === 3 && day === 8)
else if (month == 5 && day == 17) return {
return "IDAHOBIT"; blurb: `Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day}</a>`,
else if (month == 5 && day == 19) class: "symbol-venus",
return "Agender Pride Day"; };
else if (month == 5 && day == 25) else if (month === 3 && day === 31)
return "Pansexual and Panromantic Awareness & Visibility Day"; return {
else if (month == 6) blurb: `Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>`,
return "Pride Month"; class: "flag-trans",
else if (month == 7 && day == 14) };
return "Non-Binary People's Day"; else if (month === 4 && day === 6)
else if (month == 7 && day == 28) return {
return "Leilukin's Birthday"; blurb: `Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>`,
else if (month == 9 && day == 11) class: "flag-ace",
return "Leilukin's Hub Anniversary"; };
else if (month == 9 && day == 23) else if (month === 4 && day === 26)
return "Bi Visibility Day"; return {
else if (month == 10 && day == 8) blurb: `Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>`,
return "International Lesbian Day"; class: "flag-lesbian",
else if (month == 10 && day == 11) };
return "National Coming Out Day"; else if (month === 5 && day === 17)
else if (month == 10 && day == 17) return {
return "Genderfluid Visibility Week"; blurb: `Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a>`,
else if (month == 10 && day == 24) class: "flag-progress",
return "Ace Week"; };
else if (month == 10 && day == 26) else if (month === 5 && day === 19)
return "Intersex Awareness Day"; return {
blurb: `Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a>`,
class: "flag-agender",
};
else if (month === 5 && day === 25)
return {
blurb: `Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Awareness and Visibility Day</a>`,
class: "flag-pan",
};
else if (month === 6)
return {
blurb: `Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!`,
class: "flag-progress-intersex",
};
else if (month === 7 && day === 14)
return {
blurb: `Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>`,
class: "flag-nonbinary",
};
else if (month === 7 && day === 28)
return {
blurb: `Today is Leilukin's Birthday`
};
else if (month === 9 && day === 11)
return {
blurb: `Today is the ${leilukinsHubAnniversary}-year anniversary of the launch of Leilukin's Hub`
};
else if (month === 9 && day === 23)
return {
blurb: `Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>`,
class: "flag-bi",
};
else if (month === 10 && day === 8)
return {
blurb: `Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>`,
class: "flag-lesbian",
};
else if (month === 10 && day === 11)
return {
blurb: `Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>`,
class: "flag-rainbow",
};
else if (month === 10 && day === 17)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>`,
class: "flag-genderfluid",
};
else if (month === 10 && day === 24)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>`,
class: "flag-ace",
};
else if (month === 10 && day === 26)
return {
blurb: `Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>`,
class: "flag-intersex",
};
else else
return "No event"; return null;
}
function getBanner(day) {
switch (day) {
case "Zero Discrimination Day":
return "flag-progress-intersex";
break;
case "International Women's Day":
return "symbol-venus";
break;
case "Trans Day of Visibility":
return "flag-trans";
break;
case "International Asexuality Day":
return "flag-ace";
break;
case "Lesbian Visibility Day":
return "flag-lesbian";
break;
case "IDAHOBIT":
return "flag-progress";
break;
case "Agender Pride Day":
return "flag-agender";
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return "flag-pan";
break;
case "Pride Month":
return "flag-progress-intersex";
break;
case "Non-Binary People's Day":
return "flag-non-binary";
break;
case "Bi Visibility Day":
return "flag-bi";
break;
case "International Lesbian Day":
return "flag-lesbian";
break;
case "National Coming Out Day":
return "flag-rainbow";
break;
case "Genderfluid Visibility Week":
return "flag-genderfluid";
break;
case "Ace Week":
return "flag-ace";
break;
case "Intersex Awareness Day":
return "flag-intersex";
break;
default:
return "";
}
}
function getBlurbHtml(day) {
switch (day) {
case "Zero Discrimination Day":
return `
Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>
`;
break;
case "International Women's Day":
return `
Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day</a>
`;
break;
case "Trans Day of Visibility":
return `
Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>
`;
break;
case "International Asexuality Day":
return `
Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>
`;
break;
case "Lesbian Visibility Day":
return `
Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>
`;
break;
case "IDAHOBIT":
return `
Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a></span>
`;
break;
case "Agender Pride Day":
return `
Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a></span>
`;
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return `
Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Visibility Day</a>
`;
break;
case "Pride Month":
return `
Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!
`;
break;
case "Non-Binary People's Day":
return `
Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>
`;
break;
case "Leilukin's Birthday":
return `
Today is Leilukin's birthday
`;
break;
case "Leilukin's Hub Anniversary":
return `
Today is the anniversary of the launch of Leilukin's Hub
`;
break;
case "Bi Visibility Day":
return `
Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>
`;
break;
case "International Lesbian Day":
return `
Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>
`;
break;
case "National Coming Out Day":
return `
Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>
`;
break;
case "Genderfluid Visibility Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>
`;
break;
case "Ace Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>
`;
break;
case "Intersex Awareness Day":
return `
Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>
`;
break;
default:
return ``;
}
} }
</script> </script>

View File

@ -98,14 +98,12 @@
const todayEvent = getTodayEvent(); const todayEvent = getTodayEvent();
if (todayEvent != "No event") { if (todayEvent) {
heroTopBarEl.classList.remove('hidden'); heroTopBarEl.classList.remove('hidden');
heroTopBarEl.innerHTML = todayEvent.blurb;
if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { if (todayEvent.class) {
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); headerImgEl.classList.add(todayEvent.class);
} else {
headerImgEl.classList.add(getBanner(todayEvent));
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent);
} }
} }
@ -114,196 +112,100 @@
const month = date.getMonth() + 1; const month = date.getMonth() + 1;
const day = date.getDate(); const day = date.getDate();
if (month == 3 && day == 1) const currentYear = date.getFullYear();
return "Zero Discrimination Day"; const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear();
else if (month == 3 && day == 8) const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate;
return "International Women's Day";
else if (month == 3 && day == 31) if (month === 3 && day === 1)
return "Trans Day of Visibility"; return {
else if (month == 4 && day == 6) blurb: `Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>`,
return "International Asexuality Day"; class: "flag-progress-intersex",
else if (month == 4 && day == 26) };
return "Lesbian Visibility Day"; else if (month === 3 && day === 8)
else if (month == 5 && day == 17) return {
return "IDAHOBIT"; blurb: `Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day}</a>`,
else if (month == 5 && day == 19) class: "symbol-venus",
return "Agender Pride Day"; };
else if (month == 5 && day == 25) else if (month === 3 && day === 31)
return "Pansexual and Panromantic Awareness & Visibility Day"; return {
else if (month == 6) blurb: `Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>`,
return "Pride Month"; class: "flag-trans",
else if (month == 7 && day == 14) };
return "Non-Binary People's Day"; else if (month === 4 && day === 6)
else if (month == 7 && day == 28) return {
return "Leilukin's Birthday"; blurb: `Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>`,
else if (month == 9 && day == 11) class: "flag-ace",
return "Leilukin's Hub Anniversary"; };
else if (month == 9 && day == 23) else if (month === 4 && day === 26)
return "Bi Visibility Day"; return {
else if (month == 10 && day == 8) blurb: `Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>`,
return "International Lesbian Day"; class: "flag-lesbian",
else if (month == 10 && day == 11) };
return "National Coming Out Day"; else if (month === 5 && day === 17)
else if (month == 10 && day == 17) return {
return "Genderfluid Visibility Week"; blurb: `Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a>`,
else if (month == 10 && day == 24) class: "flag-progress",
return "Ace Week"; };
else if (month == 10 && day == 26) else if (month === 5 && day === 19)
return "Intersex Awareness Day"; return {
blurb: `Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a>`,
class: "flag-agender",
};
else if (month === 5 && day === 25)
return {
blurb: `Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Awareness and Visibility Day</a>`,
class: "flag-pan",
};
else if (month === 6)
return {
blurb: `Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!`,
class: "flag-progress-intersex",
};
else if (month === 7 && day === 14)
return {
blurb: `Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>`,
class: "flag-nonbinary",
};
else if (month === 7 && day === 28)
return {
blurb: `Today is Leilukin's Birthday`
};
else if (month === 9 && day === 11)
return {
blurb: `Today is the ${leilukinsHubAnniversary}-year anniversary of the launch of Leilukin's Hub`
};
else if (month === 9 && day === 23)
return {
blurb: `Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>`,
class: "flag-bi",
};
else if (month === 10 && day === 8)
return {
blurb: `Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>`,
class: "flag-lesbian",
};
else if (month === 10 && day === 11)
return {
blurb: `Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>`,
class: "flag-rainbow",
};
else if (month === 10 && day === 17)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>`,
class: "flag-genderfluid",
};
else if (month === 10 && day === 24)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>`,
class: "flag-ace",
};
else if (month === 10 && day === 26)
return {
blurb: `Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>`,
class: "flag-intersex",
};
else else
return "No event"; return null;
}
function getBanner(day) {
switch (day) {
case "Zero Discrimination Day":
return "flag-progress-intersex";
break;
case "International Women's Day":
return "symbol-venus";
break;
case "Trans Day of Visibility":
return "flag-trans";
break;
case "International Asexuality Day":
return "flag-ace";
break;
case "Lesbian Visibility Day":
return "flag-lesbian";
break;
case "IDAHOBIT":
return "flag-progress";
break;
case "Agender Pride Day":
return "flag-agender";
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return "flag-pan";
break;
case "Pride Month":
return "flag-progress-intersex";
break;
case "Non-Binary People's Day":
return "flag-non-binary";
break;
case "Bi Visibility Day":
return "flag-bi";
break;
case "International Lesbian Day":
return "flag-lesbian";
break;
case "National Coming Out Day":
return "flag-rainbow";
break;
case "Genderfluid Visibility Week":
return "flag-genderfluid";
break;
case "Ace Week":
return "flag-ace";
break;
case "Intersex Awareness Day":
return "flag-intersex";
break;
default:
return "";
}
}
function getBlurbHtml(day) {
switch (day) {
case "Zero Discrimination Day":
return `
Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>
`;
break;
case "International Women's Day":
return `
Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day</a>
`;
break;
case "Trans Day of Visibility":
return `
Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>
`;
break;
case "International Asexuality Day":
return `
Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>
`;
break;
case "Lesbian Visibility Day":
return `
Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>
`;
break;
case "IDAHOBIT":
return `
Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a></span>
`;
break;
case "Agender Pride Day":
return `
Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a></span>
`;
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return `
Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Visibility Day</a>
`;
break;
case "Pride Month":
return `
Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!
`;
break;
case "Non-Binary People's Day":
return `
Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>
`;
break;
case "Leilukin's Birthday":
return `
Today is Leilukin's birthday
`;
break;
case "Leilukin's Hub Anniversary":
return `
Today is the anniversary of the launch of Leilukin's Hub
`;
break;
case "Bi Visibility Day":
return `
Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>
`;
break;
case "International Lesbian Day":
return `
Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>
`;
break;
case "National Coming Out Day":
return `
Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>
`;
break;
case "Genderfluid Visibility Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>
`;
break;
case "Ace Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>
`;
break;
case "Intersex Awareness Day":
return `
Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>
`;
break;
default:
return ``;
}
} }
</script> </script>

View File

@ -98,14 +98,12 @@
const todayEvent = getTodayEvent(); const todayEvent = getTodayEvent();
if (todayEvent != "No event") { if (todayEvent) {
heroTopBarEl.classList.remove('hidden'); heroTopBarEl.classList.remove('hidden');
heroTopBarEl.innerHTML = todayEvent.blurb;
if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { if (todayEvent.class) {
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); headerImgEl.classList.add(todayEvent.class);
} else {
headerImgEl.classList.add(getBanner(todayEvent));
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent);
} }
} }
@ -114,196 +112,100 @@
const month = date.getMonth() + 1; const month = date.getMonth() + 1;
const day = date.getDate(); const day = date.getDate();
if (month == 3 && day == 1) const currentYear = date.getFullYear();
return "Zero Discrimination Day"; const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear();
else if (month == 3 && day == 8) const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate;
return "International Women's Day";
else if (month == 3 && day == 31) if (month === 3 && day === 1)
return "Trans Day of Visibility"; return {
else if (month == 4 && day == 6) blurb: `Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>`,
return "International Asexuality Day"; class: "flag-progress-intersex",
else if (month == 4 && day == 26) };
return "Lesbian Visibility Day"; else if (month === 3 && day === 8)
else if (month == 5 && day == 17) return {
return "IDAHOBIT"; blurb: `Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day}</a>`,
else if (month == 5 && day == 19) class: "symbol-venus",
return "Agender Pride Day"; };
else if (month == 5 && day == 25) else if (month === 3 && day === 31)
return "Pansexual and Panromantic Awareness & Visibility Day"; return {
else if (month == 6) blurb: `Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>`,
return "Pride Month"; class: "flag-trans",
else if (month == 7 && day == 14) };
return "Non-Binary People's Day"; else if (month === 4 && day === 6)
else if (month == 7 && day == 28) return {
return "Leilukin's Birthday"; blurb: `Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>`,
else if (month == 9 && day == 11) class: "flag-ace",
return "Leilukin's Hub Anniversary"; };
else if (month == 9 && day == 23) else if (month === 4 && day === 26)
return "Bi Visibility Day"; return {
else if (month == 10 && day == 8) blurb: `Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>`,
return "International Lesbian Day"; class: "flag-lesbian",
else if (month == 10 && day == 11) };
return "National Coming Out Day"; else if (month === 5 && day === 17)
else if (month == 10 && day == 17) return {
return "Genderfluid Visibility Week"; blurb: `Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a>`,
else if (month == 10 && day == 24) class: "flag-progress",
return "Ace Week"; };
else if (month == 10 && day == 26) else if (month === 5 && day === 19)
return "Intersex Awareness Day"; return {
blurb: `Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a>`,
class: "flag-agender",
};
else if (month === 5 && day === 25)
return {
blurb: `Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Awareness and Visibility Day</a>`,
class: "flag-pan",
};
else if (month === 6)
return {
blurb: `Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!`,
class: "flag-progress-intersex",
};
else if (month === 7 && day === 14)
return {
blurb: `Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>`,
class: "flag-nonbinary",
};
else if (month === 7 && day === 28)
return {
blurb: `Today is Leilukin's Birthday`
};
else if (month === 9 && day === 11)
return {
blurb: `Today is the ${leilukinsHubAnniversary}-year anniversary of the launch of Leilukin's Hub`
};
else if (month === 9 && day === 23)
return {
blurb: `Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>`,
class: "flag-bi",
};
else if (month === 10 && day === 8)
return {
blurb: `Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>`,
class: "flag-lesbian",
};
else if (month === 10 && day === 11)
return {
blurb: `Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>`,
class: "flag-rainbow",
};
else if (month === 10 && day === 17)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>`,
class: "flag-genderfluid",
};
else if (month === 10 && day === 24)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>`,
class: "flag-ace",
};
else if (month === 10 && day === 26)
return {
blurb: `Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>`,
class: "flag-intersex",
};
else else
return "No event"; return null;
}
function getBanner(day) {
switch (day) {
case "Zero Discrimination Day":
return "flag-progress-intersex";
break;
case "International Women's Day":
return "symbol-venus";
break;
case "Trans Day of Visibility":
return "flag-trans";
break;
case "International Asexuality Day":
return "flag-ace";
break;
case "Lesbian Visibility Day":
return "flag-lesbian";
break;
case "IDAHOBIT":
return "flag-progress";
break;
case "Agender Pride Day":
return "flag-agender";
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return "flag-pan";
break;
case "Pride Month":
return "flag-progress-intersex";
break;
case "Non-Binary People's Day":
return "flag-non-binary";
break;
case "Bi Visibility Day":
return "flag-bi";
break;
case "International Lesbian Day":
return "flag-lesbian";
break;
case "National Coming Out Day":
return "flag-rainbow";
break;
case "Genderfluid Visibility Week":
return "flag-genderfluid";
break;
case "Ace Week":
return "flag-ace";
break;
case "Intersex Awareness Day":
return "flag-intersex";
break;
default:
return "";
}
}
function getBlurbHtml(day) {
switch (day) {
case "Zero Discrimination Day":
return `
Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>
`;
break;
case "International Women's Day":
return `
Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day</a>
`;
break;
case "Trans Day of Visibility":
return `
Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>
`;
break;
case "International Asexuality Day":
return `
Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>
`;
break;
case "Lesbian Visibility Day":
return `
Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>
`;
break;
case "IDAHOBIT":
return `
Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a></span>
`;
break;
case "Agender Pride Day":
return `
Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a></span>
`;
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return `
Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Visibility Day</a>
`;
break;
case "Pride Month":
return `
Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!
`;
break;
case "Non-Binary People's Day":
return `
Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>
`;
break;
case "Leilukin's Birthday":
return `
Today is Leilukin's birthday
`;
break;
case "Leilukin's Hub Anniversary":
return `
Today is the anniversary of the launch of Leilukin's Hub
`;
break;
case "Bi Visibility Day":
return `
Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>
`;
break;
case "International Lesbian Day":
return `
Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>
`;
break;
case "National Coming Out Day":
return `
Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>
`;
break;
case "Genderfluid Visibility Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>
`;
break;
case "Ace Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>
`;
break;
case "Intersex Awareness Day":
return `
Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>
`;
break;
default:
return ``;
}
} }
</script> </script>

View File

@ -98,14 +98,12 @@
const todayEvent = getTodayEvent(); const todayEvent = getTodayEvent();
if (todayEvent != "No event") { if (todayEvent) {
heroTopBarEl.classList.remove('hidden'); heroTopBarEl.classList.remove('hidden');
heroTopBarEl.innerHTML = todayEvent.blurb;
if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { if (todayEvent.class) {
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); headerImgEl.classList.add(todayEvent.class);
} else {
headerImgEl.classList.add(getBanner(todayEvent));
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent);
} }
} }
@ -114,196 +112,100 @@
const month = date.getMonth() + 1; const month = date.getMonth() + 1;
const day = date.getDate(); const day = date.getDate();
if (month == 3 && day == 1) const currentYear = date.getFullYear();
return "Zero Discrimination Day"; const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear();
else if (month == 3 && day == 8) const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate;
return "International Women's Day";
else if (month == 3 && day == 31) if (month === 3 && day === 1)
return "Trans Day of Visibility"; return {
else if (month == 4 && day == 6) blurb: `Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>`,
return "International Asexuality Day"; class: "flag-progress-intersex",
else if (month == 4 && day == 26) };
return "Lesbian Visibility Day"; else if (month === 3 && day === 8)
else if (month == 5 && day == 17) return {
return "IDAHOBIT"; blurb: `Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day}</a>`,
else if (month == 5 && day == 19) class: "symbol-venus",
return "Agender Pride Day"; };
else if (month == 5 && day == 25) else if (month === 3 && day === 31)
return "Pansexual and Panromantic Awareness & Visibility Day"; return {
else if (month == 6) blurb: `Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>`,
return "Pride Month"; class: "flag-trans",
else if (month == 7 && day == 14) };
return "Non-Binary People's Day"; else if (month === 4 && day === 6)
else if (month == 7 && day == 28) return {
return "Leilukin's Birthday"; blurb: `Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>`,
else if (month == 9 && day == 11) class: "flag-ace",
return "Leilukin's Hub Anniversary"; };
else if (month == 9 && day == 23) else if (month === 4 && day === 26)
return "Bi Visibility Day"; return {
else if (month == 10 && day == 8) blurb: `Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>`,
return "International Lesbian Day"; class: "flag-lesbian",
else if (month == 10 && day == 11) };
return "National Coming Out Day"; else if (month === 5 && day === 17)
else if (month == 10 && day == 17) return {
return "Genderfluid Visibility Week"; blurb: `Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a>`,
else if (month == 10 && day == 24) class: "flag-progress",
return "Ace Week"; };
else if (month == 10 && day == 26) else if (month === 5 && day === 19)
return "Intersex Awareness Day"; return {
blurb: `Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a>`,
class: "flag-agender",
};
else if (month === 5 && day === 25)
return {
blurb: `Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Awareness and Visibility Day</a>`,
class: "flag-pan",
};
else if (month === 6)
return {
blurb: `Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!`,
class: "flag-progress-intersex",
};
else if (month === 7 && day === 14)
return {
blurb: `Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>`,
class: "flag-nonbinary",
};
else if (month === 7 && day === 28)
return {
blurb: `Today is Leilukin's Birthday`
};
else if (month === 9 && day === 11)
return {
blurb: `Today is the ${leilukinsHubAnniversary}-year anniversary of the launch of Leilukin's Hub`
};
else if (month === 9 && day === 23)
return {
blurb: `Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>`,
class: "flag-bi",
};
else if (month === 10 && day === 8)
return {
blurb: `Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>`,
class: "flag-lesbian",
};
else if (month === 10 && day === 11)
return {
blurb: `Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>`,
class: "flag-rainbow",
};
else if (month === 10 && day === 17)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>`,
class: "flag-genderfluid",
};
else if (month === 10 && day === 24)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>`,
class: "flag-ace",
};
else if (month === 10 && day === 26)
return {
blurb: `Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>`,
class: "flag-intersex",
};
else else
return "No event"; return null;
}
function getBanner(day) {
switch (day) {
case "Zero Discrimination Day":
return "flag-progress-intersex";
break;
case "International Women's Day":
return "symbol-venus";
break;
case "Trans Day of Visibility":
return "flag-trans";
break;
case "International Asexuality Day":
return "flag-ace";
break;
case "Lesbian Visibility Day":
return "flag-lesbian";
break;
case "IDAHOBIT":
return "flag-progress";
break;
case "Agender Pride Day":
return "flag-agender";
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return "flag-pan";
break;
case "Pride Month":
return "flag-progress-intersex";
break;
case "Non-Binary People's Day":
return "flag-non-binary";
break;
case "Bi Visibility Day":
return "flag-bi";
break;
case "International Lesbian Day":
return "flag-lesbian";
break;
case "National Coming Out Day":
return "flag-rainbow";
break;
case "Genderfluid Visibility Week":
return "flag-genderfluid";
break;
case "Ace Week":
return "flag-ace";
break;
case "Intersex Awareness Day":
return "flag-intersex";
break;
default:
return "";
}
}
function getBlurbHtml(day) {
switch (day) {
case "Zero Discrimination Day":
return `
Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>
`;
break;
case "International Women's Day":
return `
Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day</a>
`;
break;
case "Trans Day of Visibility":
return `
Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>
`;
break;
case "International Asexuality Day":
return `
Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>
`;
break;
case "Lesbian Visibility Day":
return `
Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>
`;
break;
case "IDAHOBIT":
return `
Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a></span>
`;
break;
case "Agender Pride Day":
return `
Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a></span>
`;
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return `
Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Visibility Day</a>
`;
break;
case "Pride Month":
return `
Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!
`;
break;
case "Non-Binary People's Day":
return `
Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>
`;
break;
case "Leilukin's Birthday":
return `
Today is Leilukin's birthday
`;
break;
case "Leilukin's Hub Anniversary":
return `
Today is the anniversary of the launch of Leilukin's Hub
`;
break;
case "Bi Visibility Day":
return `
Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>
`;
break;
case "International Lesbian Day":
return `
Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>
`;
break;
case "National Coming Out Day":
return `
Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>
`;
break;
case "Genderfluid Visibility Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>
`;
break;
case "Ace Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>
`;
break;
case "Intersex Awareness Day":
return `
Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>
`;
break;
default:
return ``;
}
} }
</script> </script>

View File

@ -4,7 +4,7 @@
<subtitle>Leilukin&#39;s personal website.</subtitle> <subtitle>Leilukin&#39;s personal website.</subtitle>
<link href="https://leilukin.neocities.org/feed.xml" rel="self"/> <link href="https://leilukin.neocities.org/feed.xml" rel="self"/>
<link href="https://leilukin.neocities.org"/> <link href="https://leilukin.neocities.org"/>
<updated>2024-04-29T03:40:57Z</updated> <updated>2024-04-29T05:06:38Z</updated>
<id>https://leilukin.neocities.org</id> <id>https://leilukin.neocities.org</id>
<author> <author>
<name>Leilukin</name> <name>Leilukin</name>

View File

@ -98,14 +98,12 @@
const todayEvent = getTodayEvent(); const todayEvent = getTodayEvent();
if (todayEvent != "No event") { if (todayEvent) {
heroTopBarEl.classList.remove('hidden'); heroTopBarEl.classList.remove('hidden');
heroTopBarEl.innerHTML = todayEvent.blurb;
if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { if (todayEvent.class) {
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); headerImgEl.classList.add(todayEvent.class);
} else {
headerImgEl.classList.add(getBanner(todayEvent));
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent);
} }
} }
@ -114,196 +112,100 @@
const month = date.getMonth() + 1; const month = date.getMonth() + 1;
const day = date.getDate(); const day = date.getDate();
if (month == 3 && day == 1) const currentYear = date.getFullYear();
return "Zero Discrimination Day"; const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear();
else if (month == 3 && day == 8) const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate;
return "International Women's Day";
else if (month == 3 && day == 31) if (month === 3 && day === 1)
return "Trans Day of Visibility"; return {
else if (month == 4 && day == 6) blurb: `Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>`,
return "International Asexuality Day"; class: "flag-progress-intersex",
else if (month == 4 && day == 26) };
return "Lesbian Visibility Day"; else if (month === 3 && day === 8)
else if (month == 5 && day == 17) return {
return "IDAHOBIT"; blurb: `Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day}</a>`,
else if (month == 5 && day == 19) class: "symbol-venus",
return "Agender Pride Day"; };
else if (month == 5 && day == 25) else if (month === 3 && day === 31)
return "Pansexual and Panromantic Awareness & Visibility Day"; return {
else if (month == 6) blurb: `Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>`,
return "Pride Month"; class: "flag-trans",
else if (month == 7 && day == 14) };
return "Non-Binary People's Day"; else if (month === 4 && day === 6)
else if (month == 7 && day == 28) return {
return "Leilukin's Birthday"; blurb: `Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>`,
else if (month == 9 && day == 11) class: "flag-ace",
return "Leilukin's Hub Anniversary"; };
else if (month == 9 && day == 23) else if (month === 4 && day === 26)
return "Bi Visibility Day"; return {
else if (month == 10 && day == 8) blurb: `Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>`,
return "International Lesbian Day"; class: "flag-lesbian",
else if (month == 10 && day == 11) };
return "National Coming Out Day"; else if (month === 5 && day === 17)
else if (month == 10 && day == 17) return {
return "Genderfluid Visibility Week"; blurb: `Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a>`,
else if (month == 10 && day == 24) class: "flag-progress",
return "Ace Week"; };
else if (month == 10 && day == 26) else if (month === 5 && day === 19)
return "Intersex Awareness Day"; return {
blurb: `Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a>`,
class: "flag-agender",
};
else if (month === 5 && day === 25)
return {
blurb: `Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Awareness and Visibility Day</a>`,
class: "flag-pan",
};
else if (month === 6)
return {
blurb: `Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!`,
class: "flag-progress-intersex",
};
else if (month === 7 && day === 14)
return {
blurb: `Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>`,
class: "flag-nonbinary",
};
else if (month === 7 && day === 28)
return {
blurb: `Today is Leilukin's Birthday`
};
else if (month === 9 && day === 11)
return {
blurb: `Today is the ${leilukinsHubAnniversary}-year anniversary of the launch of Leilukin's Hub`
};
else if (month === 9 && day === 23)
return {
blurb: `Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>`,
class: "flag-bi",
};
else if (month === 10 && day === 8)
return {
blurb: `Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>`,
class: "flag-lesbian",
};
else if (month === 10 && day === 11)
return {
blurb: `Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>`,
class: "flag-rainbow",
};
else if (month === 10 && day === 17)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>`,
class: "flag-genderfluid",
};
else if (month === 10 && day === 24)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>`,
class: "flag-ace",
};
else if (month === 10 && day === 26)
return {
blurb: `Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>`,
class: "flag-intersex",
};
else else
return "No event"; return null;
}
function getBanner(day) {
switch (day) {
case "Zero Discrimination Day":
return "flag-progress-intersex";
break;
case "International Women's Day":
return "symbol-venus";
break;
case "Trans Day of Visibility":
return "flag-trans";
break;
case "International Asexuality Day":
return "flag-ace";
break;
case "Lesbian Visibility Day":
return "flag-lesbian";
break;
case "IDAHOBIT":
return "flag-progress";
break;
case "Agender Pride Day":
return "flag-agender";
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return "flag-pan";
break;
case "Pride Month":
return "flag-progress-intersex";
break;
case "Non-Binary People's Day":
return "flag-non-binary";
break;
case "Bi Visibility Day":
return "flag-bi";
break;
case "International Lesbian Day":
return "flag-lesbian";
break;
case "National Coming Out Day":
return "flag-rainbow";
break;
case "Genderfluid Visibility Week":
return "flag-genderfluid";
break;
case "Ace Week":
return "flag-ace";
break;
case "Intersex Awareness Day":
return "flag-intersex";
break;
default:
return "";
}
}
function getBlurbHtml(day) {
switch (day) {
case "Zero Discrimination Day":
return `
Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>
`;
break;
case "International Women's Day":
return `
Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day</a>
`;
break;
case "Trans Day of Visibility":
return `
Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>
`;
break;
case "International Asexuality Day":
return `
Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>
`;
break;
case "Lesbian Visibility Day":
return `
Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>
`;
break;
case "IDAHOBIT":
return `
Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a></span>
`;
break;
case "Agender Pride Day":
return `
Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a></span>
`;
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return `
Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Visibility Day</a>
`;
break;
case "Pride Month":
return `
Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!
`;
break;
case "Non-Binary People's Day":
return `
Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>
`;
break;
case "Leilukin's Birthday":
return `
Today is Leilukin's birthday
`;
break;
case "Leilukin's Hub Anniversary":
return `
Today is the anniversary of the launch of Leilukin's Hub
`;
break;
case "Bi Visibility Day":
return `
Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>
`;
break;
case "International Lesbian Day":
return `
Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>
`;
break;
case "National Coming Out Day":
return `
Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>
`;
break;
case "Genderfluid Visibility Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>
`;
break;
case "Ace Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>
`;
break;
case "Intersex Awareness Day":
return `
Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>
`;
break;
default:
return ``;
}
} }
</script> </script>

View File

@ -98,14 +98,12 @@
const todayEvent = getTodayEvent(); const todayEvent = getTodayEvent();
if (todayEvent != "No event") { if (todayEvent) {
heroTopBarEl.classList.remove('hidden'); heroTopBarEl.classList.remove('hidden');
heroTopBarEl.innerHTML = todayEvent.blurb;
if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { if (todayEvent.class) {
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); headerImgEl.classList.add(todayEvent.class);
} else {
headerImgEl.classList.add(getBanner(todayEvent));
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent);
} }
} }
@ -114,196 +112,100 @@
const month = date.getMonth() + 1; const month = date.getMonth() + 1;
const day = date.getDate(); const day = date.getDate();
if (month == 3 && day == 1) const currentYear = date.getFullYear();
return "Zero Discrimination Day"; const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear();
else if (month == 3 && day == 8) const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate;
return "International Women's Day";
else if (month == 3 && day == 31) if (month === 3 && day === 1)
return "Trans Day of Visibility"; return {
else if (month == 4 && day == 6) blurb: `Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>`,
return "International Asexuality Day"; class: "flag-progress-intersex",
else if (month == 4 && day == 26) };
return "Lesbian Visibility Day"; else if (month === 3 && day === 8)
else if (month == 5 && day == 17) return {
return "IDAHOBIT"; blurb: `Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day}</a>`,
else if (month == 5 && day == 19) class: "symbol-venus",
return "Agender Pride Day"; };
else if (month == 5 && day == 25) else if (month === 3 && day === 31)
return "Pansexual and Panromantic Awareness & Visibility Day"; return {
else if (month == 6) blurb: `Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>`,
return "Pride Month"; class: "flag-trans",
else if (month == 7 && day == 14) };
return "Non-Binary People's Day"; else if (month === 4 && day === 6)
else if (month == 7 && day == 28) return {
return "Leilukin's Birthday"; blurb: `Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>`,
else if (month == 9 && day == 11) class: "flag-ace",
return "Leilukin's Hub Anniversary"; };
else if (month == 9 && day == 23) else if (month === 4 && day === 26)
return "Bi Visibility Day"; return {
else if (month == 10 && day == 8) blurb: `Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>`,
return "International Lesbian Day"; class: "flag-lesbian",
else if (month == 10 && day == 11) };
return "National Coming Out Day"; else if (month === 5 && day === 17)
else if (month == 10 && day == 17) return {
return "Genderfluid Visibility Week"; blurb: `Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a>`,
else if (month == 10 && day == 24) class: "flag-progress",
return "Ace Week"; };
else if (month == 10 && day == 26) else if (month === 5 && day === 19)
return "Intersex Awareness Day"; return {
blurb: `Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a>`,
class: "flag-agender",
};
else if (month === 5 && day === 25)
return {
blurb: `Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Awareness and Visibility Day</a>`,
class: "flag-pan",
};
else if (month === 6)
return {
blurb: `Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!`,
class: "flag-progress-intersex",
};
else if (month === 7 && day === 14)
return {
blurb: `Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>`,
class: "flag-nonbinary",
};
else if (month === 7 && day === 28)
return {
blurb: `Today is Leilukin's Birthday`
};
else if (month === 9 && day === 11)
return {
blurb: `Today is the ${leilukinsHubAnniversary}-year anniversary of the launch of Leilukin's Hub`
};
else if (month === 9 && day === 23)
return {
blurb: `Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>`,
class: "flag-bi",
};
else if (month === 10 && day === 8)
return {
blurb: `Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>`,
class: "flag-lesbian",
};
else if (month === 10 && day === 11)
return {
blurb: `Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>`,
class: "flag-rainbow",
};
else if (month === 10 && day === 17)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>`,
class: "flag-genderfluid",
};
else if (month === 10 && day === 24)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>`,
class: "flag-ace",
};
else if (month === 10 && day === 26)
return {
blurb: `Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>`,
class: "flag-intersex",
};
else else
return "No event"; return null;
}
function getBanner(day) {
switch (day) {
case "Zero Discrimination Day":
return "flag-progress-intersex";
break;
case "International Women's Day":
return "symbol-venus";
break;
case "Trans Day of Visibility":
return "flag-trans";
break;
case "International Asexuality Day":
return "flag-ace";
break;
case "Lesbian Visibility Day":
return "flag-lesbian";
break;
case "IDAHOBIT":
return "flag-progress";
break;
case "Agender Pride Day":
return "flag-agender";
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return "flag-pan";
break;
case "Pride Month":
return "flag-progress-intersex";
break;
case "Non-Binary People's Day":
return "flag-non-binary";
break;
case "Bi Visibility Day":
return "flag-bi";
break;
case "International Lesbian Day":
return "flag-lesbian";
break;
case "National Coming Out Day":
return "flag-rainbow";
break;
case "Genderfluid Visibility Week":
return "flag-genderfluid";
break;
case "Ace Week":
return "flag-ace";
break;
case "Intersex Awareness Day":
return "flag-intersex";
break;
default:
return "";
}
}
function getBlurbHtml(day) {
switch (day) {
case "Zero Discrimination Day":
return `
Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>
`;
break;
case "International Women's Day":
return `
Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day</a>
`;
break;
case "Trans Day of Visibility":
return `
Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>
`;
break;
case "International Asexuality Day":
return `
Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>
`;
break;
case "Lesbian Visibility Day":
return `
Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>
`;
break;
case "IDAHOBIT":
return `
Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a></span>
`;
break;
case "Agender Pride Day":
return `
Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a></span>
`;
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return `
Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Visibility Day</a>
`;
break;
case "Pride Month":
return `
Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!
`;
break;
case "Non-Binary People's Day":
return `
Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>
`;
break;
case "Leilukin's Birthday":
return `
Today is Leilukin's birthday
`;
break;
case "Leilukin's Hub Anniversary":
return `
Today is the anniversary of the launch of Leilukin's Hub
`;
break;
case "Bi Visibility Day":
return `
Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>
`;
break;
case "International Lesbian Day":
return `
Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>
`;
break;
case "National Coming Out Day":
return `
Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>
`;
break;
case "Genderfluid Visibility Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>
`;
break;
case "Ace Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>
`;
break;
case "Intersex Awareness Day":
return `
Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>
`;
break;
default:
return ``;
}
} }
</script> </script>

View File

@ -98,14 +98,12 @@
const todayEvent = getTodayEvent(); const todayEvent = getTodayEvent();
if (todayEvent != "No event") { if (todayEvent) {
heroTopBarEl.classList.remove('hidden'); heroTopBarEl.classList.remove('hidden');
heroTopBarEl.innerHTML = todayEvent.blurb;
if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { if (todayEvent.class) {
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); headerImgEl.classList.add(todayEvent.class);
} else {
headerImgEl.classList.add(getBanner(todayEvent));
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent);
} }
} }
@ -114,196 +112,100 @@
const month = date.getMonth() + 1; const month = date.getMonth() + 1;
const day = date.getDate(); const day = date.getDate();
if (month == 3 && day == 1) const currentYear = date.getFullYear();
return "Zero Discrimination Day"; const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear();
else if (month == 3 && day == 8) const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate;
return "International Women's Day";
else if (month == 3 && day == 31) if (month === 3 && day === 1)
return "Trans Day of Visibility"; return {
else if (month == 4 && day == 6) blurb: `Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>`,
return "International Asexuality Day"; class: "flag-progress-intersex",
else if (month == 4 && day == 26) };
return "Lesbian Visibility Day"; else if (month === 3 && day === 8)
else if (month == 5 && day == 17) return {
return "IDAHOBIT"; blurb: `Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day}</a>`,
else if (month == 5 && day == 19) class: "symbol-venus",
return "Agender Pride Day"; };
else if (month == 5 && day == 25) else if (month === 3 && day === 31)
return "Pansexual and Panromantic Awareness & Visibility Day"; return {
else if (month == 6) blurb: `Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>`,
return "Pride Month"; class: "flag-trans",
else if (month == 7 && day == 14) };
return "Non-Binary People's Day"; else if (month === 4 && day === 6)
else if (month == 7 && day == 28) return {
return "Leilukin's Birthday"; blurb: `Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>`,
else if (month == 9 && day == 11) class: "flag-ace",
return "Leilukin's Hub Anniversary"; };
else if (month == 9 && day == 23) else if (month === 4 && day === 26)
return "Bi Visibility Day"; return {
else if (month == 10 && day == 8) blurb: `Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>`,
return "International Lesbian Day"; class: "flag-lesbian",
else if (month == 10 && day == 11) };
return "National Coming Out Day"; else if (month === 5 && day === 17)
else if (month == 10 && day == 17) return {
return "Genderfluid Visibility Week"; blurb: `Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a>`,
else if (month == 10 && day == 24) class: "flag-progress",
return "Ace Week"; };
else if (month == 10 && day == 26) else if (month === 5 && day === 19)
return "Intersex Awareness Day"; return {
blurb: `Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a>`,
class: "flag-agender",
};
else if (month === 5 && day === 25)
return {
blurb: `Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Awareness and Visibility Day</a>`,
class: "flag-pan",
};
else if (month === 6)
return {
blurb: `Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!`,
class: "flag-progress-intersex",
};
else if (month === 7 && day === 14)
return {
blurb: `Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>`,
class: "flag-nonbinary",
};
else if (month === 7 && day === 28)
return {
blurb: `Today is Leilukin's Birthday`
};
else if (month === 9 && day === 11)
return {
blurb: `Today is the ${leilukinsHubAnniversary}-year anniversary of the launch of Leilukin's Hub`
};
else if (month === 9 && day === 23)
return {
blurb: `Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>`,
class: "flag-bi",
};
else if (month === 10 && day === 8)
return {
blurb: `Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>`,
class: "flag-lesbian",
};
else if (month === 10 && day === 11)
return {
blurb: `Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>`,
class: "flag-rainbow",
};
else if (month === 10 && day === 17)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>`,
class: "flag-genderfluid",
};
else if (month === 10 && day === 24)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>`,
class: "flag-ace",
};
else if (month === 10 && day === 26)
return {
blurb: `Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>`,
class: "flag-intersex",
};
else else
return "No event"; return null;
}
function getBanner(day) {
switch (day) {
case "Zero Discrimination Day":
return "flag-progress-intersex";
break;
case "International Women's Day":
return "symbol-venus";
break;
case "Trans Day of Visibility":
return "flag-trans";
break;
case "International Asexuality Day":
return "flag-ace";
break;
case "Lesbian Visibility Day":
return "flag-lesbian";
break;
case "IDAHOBIT":
return "flag-progress";
break;
case "Agender Pride Day":
return "flag-agender";
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return "flag-pan";
break;
case "Pride Month":
return "flag-progress-intersex";
break;
case "Non-Binary People's Day":
return "flag-non-binary";
break;
case "Bi Visibility Day":
return "flag-bi";
break;
case "International Lesbian Day":
return "flag-lesbian";
break;
case "National Coming Out Day":
return "flag-rainbow";
break;
case "Genderfluid Visibility Week":
return "flag-genderfluid";
break;
case "Ace Week":
return "flag-ace";
break;
case "Intersex Awareness Day":
return "flag-intersex";
break;
default:
return "";
}
}
function getBlurbHtml(day) {
switch (day) {
case "Zero Discrimination Day":
return `
Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>
`;
break;
case "International Women's Day":
return `
Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day</a>
`;
break;
case "Trans Day of Visibility":
return `
Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>
`;
break;
case "International Asexuality Day":
return `
Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>
`;
break;
case "Lesbian Visibility Day":
return `
Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>
`;
break;
case "IDAHOBIT":
return `
Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a></span>
`;
break;
case "Agender Pride Day":
return `
Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a></span>
`;
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return `
Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Visibility Day</a>
`;
break;
case "Pride Month":
return `
Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!
`;
break;
case "Non-Binary People's Day":
return `
Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>
`;
break;
case "Leilukin's Birthday":
return `
Today is Leilukin's birthday
`;
break;
case "Leilukin's Hub Anniversary":
return `
Today is the anniversary of the launch of Leilukin's Hub
`;
break;
case "Bi Visibility Day":
return `
Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>
`;
break;
case "International Lesbian Day":
return `
Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>
`;
break;
case "National Coming Out Day":
return `
Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>
`;
break;
case "Genderfluid Visibility Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>
`;
break;
case "Ace Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>
`;
break;
case "Intersex Awareness Day":
return `
Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>
`;
break;
default:
return ``;
}
} }
</script> </script>

View File

@ -98,14 +98,12 @@
const todayEvent = getTodayEvent(); const todayEvent = getTodayEvent();
if (todayEvent != "No event") { if (todayEvent) {
heroTopBarEl.classList.remove('hidden'); heroTopBarEl.classList.remove('hidden');
heroTopBarEl.innerHTML = todayEvent.blurb;
if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { if (todayEvent.class) {
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); headerImgEl.classList.add(todayEvent.class);
} else {
headerImgEl.classList.add(getBanner(todayEvent));
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent);
} }
} }
@ -114,196 +112,100 @@
const month = date.getMonth() + 1; const month = date.getMonth() + 1;
const day = date.getDate(); const day = date.getDate();
if (month == 3 && day == 1) const currentYear = date.getFullYear();
return "Zero Discrimination Day"; const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear();
else if (month == 3 && day == 8) const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate;
return "International Women's Day";
else if (month == 3 && day == 31) if (month === 3 && day === 1)
return "Trans Day of Visibility"; return {
else if (month == 4 && day == 6) blurb: `Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>`,
return "International Asexuality Day"; class: "flag-progress-intersex",
else if (month == 4 && day == 26) };
return "Lesbian Visibility Day"; else if (month === 3 && day === 8)
else if (month == 5 && day == 17) return {
return "IDAHOBIT"; blurb: `Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day}</a>`,
else if (month == 5 && day == 19) class: "symbol-venus",
return "Agender Pride Day"; };
else if (month == 5 && day == 25) else if (month === 3 && day === 31)
return "Pansexual and Panromantic Awareness & Visibility Day"; return {
else if (month == 6) blurb: `Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>`,
return "Pride Month"; class: "flag-trans",
else if (month == 7 && day == 14) };
return "Non-Binary People's Day"; else if (month === 4 && day === 6)
else if (month == 7 && day == 28) return {
return "Leilukin's Birthday"; blurb: `Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>`,
else if (month == 9 && day == 11) class: "flag-ace",
return "Leilukin's Hub Anniversary"; };
else if (month == 9 && day == 23) else if (month === 4 && day === 26)
return "Bi Visibility Day"; return {
else if (month == 10 && day == 8) blurb: `Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>`,
return "International Lesbian Day"; class: "flag-lesbian",
else if (month == 10 && day == 11) };
return "National Coming Out Day"; else if (month === 5 && day === 17)
else if (month == 10 && day == 17) return {
return "Genderfluid Visibility Week"; blurb: `Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a>`,
else if (month == 10 && day == 24) class: "flag-progress",
return "Ace Week"; };
else if (month == 10 && day == 26) else if (month === 5 && day === 19)
return "Intersex Awareness Day"; return {
blurb: `Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a>`,
class: "flag-agender",
};
else if (month === 5 && day === 25)
return {
blurb: `Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Awareness and Visibility Day</a>`,
class: "flag-pan",
};
else if (month === 6)
return {
blurb: `Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!`,
class: "flag-progress-intersex",
};
else if (month === 7 && day === 14)
return {
blurb: `Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>`,
class: "flag-nonbinary",
};
else if (month === 7 && day === 28)
return {
blurb: `Today is Leilukin's Birthday`
};
else if (month === 9 && day === 11)
return {
blurb: `Today is the ${leilukinsHubAnniversary}-year anniversary of the launch of Leilukin's Hub`
};
else if (month === 9 && day === 23)
return {
blurb: `Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>`,
class: "flag-bi",
};
else if (month === 10 && day === 8)
return {
blurb: `Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>`,
class: "flag-lesbian",
};
else if (month === 10 && day === 11)
return {
blurb: `Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>`,
class: "flag-rainbow",
};
else if (month === 10 && day === 17)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>`,
class: "flag-genderfluid",
};
else if (month === 10 && day === 24)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>`,
class: "flag-ace",
};
else if (month === 10 && day === 26)
return {
blurb: `Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>`,
class: "flag-intersex",
};
else else
return "No event"; return null;
}
function getBanner(day) {
switch (day) {
case "Zero Discrimination Day":
return "flag-progress-intersex";
break;
case "International Women's Day":
return "symbol-venus";
break;
case "Trans Day of Visibility":
return "flag-trans";
break;
case "International Asexuality Day":
return "flag-ace";
break;
case "Lesbian Visibility Day":
return "flag-lesbian";
break;
case "IDAHOBIT":
return "flag-progress";
break;
case "Agender Pride Day":
return "flag-agender";
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return "flag-pan";
break;
case "Pride Month":
return "flag-progress-intersex";
break;
case "Non-Binary People's Day":
return "flag-non-binary";
break;
case "Bi Visibility Day":
return "flag-bi";
break;
case "International Lesbian Day":
return "flag-lesbian";
break;
case "National Coming Out Day":
return "flag-rainbow";
break;
case "Genderfluid Visibility Week":
return "flag-genderfluid";
break;
case "Ace Week":
return "flag-ace";
break;
case "Intersex Awareness Day":
return "flag-intersex";
break;
default:
return "";
}
}
function getBlurbHtml(day) {
switch (day) {
case "Zero Discrimination Day":
return `
Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>
`;
break;
case "International Women's Day":
return `
Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day</a>
`;
break;
case "Trans Day of Visibility":
return `
Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>
`;
break;
case "International Asexuality Day":
return `
Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>
`;
break;
case "Lesbian Visibility Day":
return `
Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>
`;
break;
case "IDAHOBIT":
return `
Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a></span>
`;
break;
case "Agender Pride Day":
return `
Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a></span>
`;
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return `
Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Visibility Day</a>
`;
break;
case "Pride Month":
return `
Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!
`;
break;
case "Non-Binary People's Day":
return `
Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>
`;
break;
case "Leilukin's Birthday":
return `
Today is Leilukin's birthday
`;
break;
case "Leilukin's Hub Anniversary":
return `
Today is the anniversary of the launch of Leilukin's Hub
`;
break;
case "Bi Visibility Day":
return `
Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>
`;
break;
case "International Lesbian Day":
return `
Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>
`;
break;
case "National Coming Out Day":
return `
Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>
`;
break;
case "Genderfluid Visibility Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>
`;
break;
case "Ace Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>
`;
break;
case "Intersex Awareness Day":
return `
Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>
`;
break;
default:
return ``;
}
} }
</script> </script>

View File

@ -98,14 +98,12 @@
const todayEvent = getTodayEvent(); const todayEvent = getTodayEvent();
if (todayEvent != "No event") { if (todayEvent) {
heroTopBarEl.classList.remove('hidden'); heroTopBarEl.classList.remove('hidden');
heroTopBarEl.innerHTML = todayEvent.blurb;
if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { if (todayEvent.class) {
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); headerImgEl.classList.add(todayEvent.class);
} else {
headerImgEl.classList.add(getBanner(todayEvent));
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent);
} }
} }
@ -114,196 +112,100 @@
const month = date.getMonth() + 1; const month = date.getMonth() + 1;
const day = date.getDate(); const day = date.getDate();
if (month == 3 && day == 1) const currentYear = date.getFullYear();
return "Zero Discrimination Day"; const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear();
else if (month == 3 && day == 8) const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate;
return "International Women's Day";
else if (month == 3 && day == 31) if (month === 3 && day === 1)
return "Trans Day of Visibility"; return {
else if (month == 4 && day == 6) blurb: `Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>`,
return "International Asexuality Day"; class: "flag-progress-intersex",
else if (month == 4 && day == 26) };
return "Lesbian Visibility Day"; else if (month === 3 && day === 8)
else if (month == 5 && day == 17) return {
return "IDAHOBIT"; blurb: `Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day}</a>`,
else if (month == 5 && day == 19) class: "symbol-venus",
return "Agender Pride Day"; };
else if (month == 5 && day == 25) else if (month === 3 && day === 31)
return "Pansexual and Panromantic Awareness & Visibility Day"; return {
else if (month == 6) blurb: `Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>`,
return "Pride Month"; class: "flag-trans",
else if (month == 7 && day == 14) };
return "Non-Binary People's Day"; else if (month === 4 && day === 6)
else if (month == 7 && day == 28) return {
return "Leilukin's Birthday"; blurb: `Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>`,
else if (month == 9 && day == 11) class: "flag-ace",
return "Leilukin's Hub Anniversary"; };
else if (month == 9 && day == 23) else if (month === 4 && day === 26)
return "Bi Visibility Day"; return {
else if (month == 10 && day == 8) blurb: `Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>`,
return "International Lesbian Day"; class: "flag-lesbian",
else if (month == 10 && day == 11) };
return "National Coming Out Day"; else if (month === 5 && day === 17)
else if (month == 10 && day == 17) return {
return "Genderfluid Visibility Week"; blurb: `Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a>`,
else if (month == 10 && day == 24) class: "flag-progress",
return "Ace Week"; };
else if (month == 10 && day == 26) else if (month === 5 && day === 19)
return "Intersex Awareness Day"; return {
blurb: `Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a>`,
class: "flag-agender",
};
else if (month === 5 && day === 25)
return {
blurb: `Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Awareness and Visibility Day</a>`,
class: "flag-pan",
};
else if (month === 6)
return {
blurb: `Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!`,
class: "flag-progress-intersex",
};
else if (month === 7 && day === 14)
return {
blurb: `Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>`,
class: "flag-nonbinary",
};
else if (month === 7 && day === 28)
return {
blurb: `Today is Leilukin's Birthday`
};
else if (month === 9 && day === 11)
return {
blurb: `Today is the ${leilukinsHubAnniversary}-year anniversary of the launch of Leilukin's Hub`
};
else if (month === 9 && day === 23)
return {
blurb: `Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>`,
class: "flag-bi",
};
else if (month === 10 && day === 8)
return {
blurb: `Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>`,
class: "flag-lesbian",
};
else if (month === 10 && day === 11)
return {
blurb: `Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>`,
class: "flag-rainbow",
};
else if (month === 10 && day === 17)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>`,
class: "flag-genderfluid",
};
else if (month === 10 && day === 24)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>`,
class: "flag-ace",
};
else if (month === 10 && day === 26)
return {
blurb: `Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>`,
class: "flag-intersex",
};
else else
return "No event"; return null;
}
function getBanner(day) {
switch (day) {
case "Zero Discrimination Day":
return "flag-progress-intersex";
break;
case "International Women's Day":
return "symbol-venus";
break;
case "Trans Day of Visibility":
return "flag-trans";
break;
case "International Asexuality Day":
return "flag-ace";
break;
case "Lesbian Visibility Day":
return "flag-lesbian";
break;
case "IDAHOBIT":
return "flag-progress";
break;
case "Agender Pride Day":
return "flag-agender";
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return "flag-pan";
break;
case "Pride Month":
return "flag-progress-intersex";
break;
case "Non-Binary People's Day":
return "flag-non-binary";
break;
case "Bi Visibility Day":
return "flag-bi";
break;
case "International Lesbian Day":
return "flag-lesbian";
break;
case "National Coming Out Day":
return "flag-rainbow";
break;
case "Genderfluid Visibility Week":
return "flag-genderfluid";
break;
case "Ace Week":
return "flag-ace";
break;
case "Intersex Awareness Day":
return "flag-intersex";
break;
default:
return "";
}
}
function getBlurbHtml(day) {
switch (day) {
case "Zero Discrimination Day":
return `
Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>
`;
break;
case "International Women's Day":
return `
Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day</a>
`;
break;
case "Trans Day of Visibility":
return `
Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>
`;
break;
case "International Asexuality Day":
return `
Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>
`;
break;
case "Lesbian Visibility Day":
return `
Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>
`;
break;
case "IDAHOBIT":
return `
Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a></span>
`;
break;
case "Agender Pride Day":
return `
Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a></span>
`;
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return `
Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Visibility Day</a>
`;
break;
case "Pride Month":
return `
Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!
`;
break;
case "Non-Binary People's Day":
return `
Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>
`;
break;
case "Leilukin's Birthday":
return `
Today is Leilukin's birthday
`;
break;
case "Leilukin's Hub Anniversary":
return `
Today is the anniversary of the launch of Leilukin's Hub
`;
break;
case "Bi Visibility Day":
return `
Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>
`;
break;
case "International Lesbian Day":
return `
Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>
`;
break;
case "National Coming Out Day":
return `
Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>
`;
break;
case "Genderfluid Visibility Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>
`;
break;
case "Ace Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>
`;
break;
case "Intersex Awareness Day":
return `
Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>
`;
break;
default:
return ``;
}
} }
</script> </script>

View File

@ -98,14 +98,12 @@
const todayEvent = getTodayEvent(); const todayEvent = getTodayEvent();
if (todayEvent != "No event") { if (todayEvent) {
heroTopBarEl.classList.remove('hidden'); heroTopBarEl.classList.remove('hidden');
heroTopBarEl.innerHTML = todayEvent.blurb;
if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { if (todayEvent.class) {
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); headerImgEl.classList.add(todayEvent.class);
} else {
headerImgEl.classList.add(getBanner(todayEvent));
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent);
} }
} }
@ -114,196 +112,100 @@
const month = date.getMonth() + 1; const month = date.getMonth() + 1;
const day = date.getDate(); const day = date.getDate();
if (month == 3 && day == 1) const currentYear = date.getFullYear();
return "Zero Discrimination Day"; const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear();
else if (month == 3 && day == 8) const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate;
return "International Women's Day";
else if (month == 3 && day == 31) if (month === 3 && day === 1)
return "Trans Day of Visibility"; return {
else if (month == 4 && day == 6) blurb: `Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>`,
return "International Asexuality Day"; class: "flag-progress-intersex",
else if (month == 4 && day == 26) };
return "Lesbian Visibility Day"; else if (month === 3 && day === 8)
else if (month == 5 && day == 17) return {
return "IDAHOBIT"; blurb: `Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day}</a>`,
else if (month == 5 && day == 19) class: "symbol-venus",
return "Agender Pride Day"; };
else if (month == 5 && day == 25) else if (month === 3 && day === 31)
return "Pansexual and Panromantic Awareness & Visibility Day"; return {
else if (month == 6) blurb: `Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>`,
return "Pride Month"; class: "flag-trans",
else if (month == 7 && day == 14) };
return "Non-Binary People's Day"; else if (month === 4 && day === 6)
else if (month == 7 && day == 28) return {
return "Leilukin's Birthday"; blurb: `Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>`,
else if (month == 9 && day == 11) class: "flag-ace",
return "Leilukin's Hub Anniversary"; };
else if (month == 9 && day == 23) else if (month === 4 && day === 26)
return "Bi Visibility Day"; return {
else if (month == 10 && day == 8) blurb: `Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>`,
return "International Lesbian Day"; class: "flag-lesbian",
else if (month == 10 && day == 11) };
return "National Coming Out Day"; else if (month === 5 && day === 17)
else if (month == 10 && day == 17) return {
return "Genderfluid Visibility Week"; blurb: `Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a>`,
else if (month == 10 && day == 24) class: "flag-progress",
return "Ace Week"; };
else if (month == 10 && day == 26) else if (month === 5 && day === 19)
return "Intersex Awareness Day"; return {
blurb: `Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a>`,
class: "flag-agender",
};
else if (month === 5 && day === 25)
return {
blurb: `Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Awareness and Visibility Day</a>`,
class: "flag-pan",
};
else if (month === 6)
return {
blurb: `Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!`,
class: "flag-progress-intersex",
};
else if (month === 7 && day === 14)
return {
blurb: `Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>`,
class: "flag-nonbinary",
};
else if (month === 7 && day === 28)
return {
blurb: `Today is Leilukin's Birthday`
};
else if (month === 9 && day === 11)
return {
blurb: `Today is the ${leilukinsHubAnniversary}-year anniversary of the launch of Leilukin's Hub`
};
else if (month === 9 && day === 23)
return {
blurb: `Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>`,
class: "flag-bi",
};
else if (month === 10 && day === 8)
return {
blurb: `Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>`,
class: "flag-lesbian",
};
else if (month === 10 && day === 11)
return {
blurb: `Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>`,
class: "flag-rainbow",
};
else if (month === 10 && day === 17)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>`,
class: "flag-genderfluid",
};
else if (month === 10 && day === 24)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>`,
class: "flag-ace",
};
else if (month === 10 && day === 26)
return {
blurb: `Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>`,
class: "flag-intersex",
};
else else
return "No event"; return null;
}
function getBanner(day) {
switch (day) {
case "Zero Discrimination Day":
return "flag-progress-intersex";
break;
case "International Women's Day":
return "symbol-venus";
break;
case "Trans Day of Visibility":
return "flag-trans";
break;
case "International Asexuality Day":
return "flag-ace";
break;
case "Lesbian Visibility Day":
return "flag-lesbian";
break;
case "IDAHOBIT":
return "flag-progress";
break;
case "Agender Pride Day":
return "flag-agender";
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return "flag-pan";
break;
case "Pride Month":
return "flag-progress-intersex";
break;
case "Non-Binary People's Day":
return "flag-non-binary";
break;
case "Bi Visibility Day":
return "flag-bi";
break;
case "International Lesbian Day":
return "flag-lesbian";
break;
case "National Coming Out Day":
return "flag-rainbow";
break;
case "Genderfluid Visibility Week":
return "flag-genderfluid";
break;
case "Ace Week":
return "flag-ace";
break;
case "Intersex Awareness Day":
return "flag-intersex";
break;
default:
return "";
}
}
function getBlurbHtml(day) {
switch (day) {
case "Zero Discrimination Day":
return `
Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>
`;
break;
case "International Women's Day":
return `
Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day</a>
`;
break;
case "Trans Day of Visibility":
return `
Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>
`;
break;
case "International Asexuality Day":
return `
Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>
`;
break;
case "Lesbian Visibility Day":
return `
Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>
`;
break;
case "IDAHOBIT":
return `
Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a></span>
`;
break;
case "Agender Pride Day":
return `
Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a></span>
`;
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return `
Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Visibility Day</a>
`;
break;
case "Pride Month":
return `
Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!
`;
break;
case "Non-Binary People's Day":
return `
Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>
`;
break;
case "Leilukin's Birthday":
return `
Today is Leilukin's birthday
`;
break;
case "Leilukin's Hub Anniversary":
return `
Today is the anniversary of the launch of Leilukin's Hub
`;
break;
case "Bi Visibility Day":
return `
Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>
`;
break;
case "International Lesbian Day":
return `
Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>
`;
break;
case "National Coming Out Day":
return `
Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>
`;
break;
case "Genderfluid Visibility Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>
`;
break;
case "Ace Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>
`;
break;
case "Intersex Awareness Day":
return `
Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>
`;
break;
default:
return ``;
}
} }
</script> </script>

View File

@ -98,14 +98,12 @@
const todayEvent = getTodayEvent(); const todayEvent = getTodayEvent();
if (todayEvent != "No event") { if (todayEvent) {
heroTopBarEl.classList.remove('hidden'); heroTopBarEl.classList.remove('hidden');
heroTopBarEl.innerHTML = todayEvent.blurb;
if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { if (todayEvent.class) {
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); headerImgEl.classList.add(todayEvent.class);
} else {
headerImgEl.classList.add(getBanner(todayEvent));
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent);
} }
} }
@ -114,196 +112,100 @@
const month = date.getMonth() + 1; const month = date.getMonth() + 1;
const day = date.getDate(); const day = date.getDate();
if (month == 3 && day == 1) const currentYear = date.getFullYear();
return "Zero Discrimination Day"; const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear();
else if (month == 3 && day == 8) const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate;
return "International Women's Day";
else if (month == 3 && day == 31) if (month === 3 && day === 1)
return "Trans Day of Visibility"; return {
else if (month == 4 && day == 6) blurb: `Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>`,
return "International Asexuality Day"; class: "flag-progress-intersex",
else if (month == 4 && day == 26) };
return "Lesbian Visibility Day"; else if (month === 3 && day === 8)
else if (month == 5 && day == 17) return {
return "IDAHOBIT"; blurb: `Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day}</a>`,
else if (month == 5 && day == 19) class: "symbol-venus",
return "Agender Pride Day"; };
else if (month == 5 && day == 25) else if (month === 3 && day === 31)
return "Pansexual and Panromantic Awareness & Visibility Day"; return {
else if (month == 6) blurb: `Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>`,
return "Pride Month"; class: "flag-trans",
else if (month == 7 && day == 14) };
return "Non-Binary People's Day"; else if (month === 4 && day === 6)
else if (month == 7 && day == 28) return {
return "Leilukin's Birthday"; blurb: `Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>`,
else if (month == 9 && day == 11) class: "flag-ace",
return "Leilukin's Hub Anniversary"; };
else if (month == 9 && day == 23) else if (month === 4 && day === 26)
return "Bi Visibility Day"; return {
else if (month == 10 && day == 8) blurb: `Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>`,
return "International Lesbian Day"; class: "flag-lesbian",
else if (month == 10 && day == 11) };
return "National Coming Out Day"; else if (month === 5 && day === 17)
else if (month == 10 && day == 17) return {
return "Genderfluid Visibility Week"; blurb: `Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a>`,
else if (month == 10 && day == 24) class: "flag-progress",
return "Ace Week"; };
else if (month == 10 && day == 26) else if (month === 5 && day === 19)
return "Intersex Awareness Day"; return {
blurb: `Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a>`,
class: "flag-agender",
};
else if (month === 5 && day === 25)
return {
blurb: `Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Awareness and Visibility Day</a>`,
class: "flag-pan",
};
else if (month === 6)
return {
blurb: `Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!`,
class: "flag-progress-intersex",
};
else if (month === 7 && day === 14)
return {
blurb: `Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>`,
class: "flag-nonbinary",
};
else if (month === 7 && day === 28)
return {
blurb: `Today is Leilukin's Birthday`
};
else if (month === 9 && day === 11)
return {
blurb: `Today is the ${leilukinsHubAnniversary}-year anniversary of the launch of Leilukin's Hub`
};
else if (month === 9 && day === 23)
return {
blurb: `Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>`,
class: "flag-bi",
};
else if (month === 10 && day === 8)
return {
blurb: `Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>`,
class: "flag-lesbian",
};
else if (month === 10 && day === 11)
return {
blurb: `Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>`,
class: "flag-rainbow",
};
else if (month === 10 && day === 17)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>`,
class: "flag-genderfluid",
};
else if (month === 10 && day === 24)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>`,
class: "flag-ace",
};
else if (month === 10 && day === 26)
return {
blurb: `Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>`,
class: "flag-intersex",
};
else else
return "No event"; return null;
}
function getBanner(day) {
switch (day) {
case "Zero Discrimination Day":
return "flag-progress-intersex";
break;
case "International Women's Day":
return "symbol-venus";
break;
case "Trans Day of Visibility":
return "flag-trans";
break;
case "International Asexuality Day":
return "flag-ace";
break;
case "Lesbian Visibility Day":
return "flag-lesbian";
break;
case "IDAHOBIT":
return "flag-progress";
break;
case "Agender Pride Day":
return "flag-agender";
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return "flag-pan";
break;
case "Pride Month":
return "flag-progress-intersex";
break;
case "Non-Binary People's Day":
return "flag-non-binary";
break;
case "Bi Visibility Day":
return "flag-bi";
break;
case "International Lesbian Day":
return "flag-lesbian";
break;
case "National Coming Out Day":
return "flag-rainbow";
break;
case "Genderfluid Visibility Week":
return "flag-genderfluid";
break;
case "Ace Week":
return "flag-ace";
break;
case "Intersex Awareness Day":
return "flag-intersex";
break;
default:
return "";
}
}
function getBlurbHtml(day) {
switch (day) {
case "Zero Discrimination Day":
return `
Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>
`;
break;
case "International Women's Day":
return `
Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day</a>
`;
break;
case "Trans Day of Visibility":
return `
Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>
`;
break;
case "International Asexuality Day":
return `
Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>
`;
break;
case "Lesbian Visibility Day":
return `
Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>
`;
break;
case "IDAHOBIT":
return `
Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a></span>
`;
break;
case "Agender Pride Day":
return `
Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a></span>
`;
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return `
Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Visibility Day</a>
`;
break;
case "Pride Month":
return `
Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!
`;
break;
case "Non-Binary People's Day":
return `
Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>
`;
break;
case "Leilukin's Birthday":
return `
Today is Leilukin's birthday
`;
break;
case "Leilukin's Hub Anniversary":
return `
Today is the anniversary of the launch of Leilukin's Hub
`;
break;
case "Bi Visibility Day":
return `
Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>
`;
break;
case "International Lesbian Day":
return `
Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>
`;
break;
case "National Coming Out Day":
return `
Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>
`;
break;
case "Genderfluid Visibility Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>
`;
break;
case "Ace Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>
`;
break;
case "Intersex Awareness Day":
return `
Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>
`;
break;
default:
return ``;
}
} }
</script> </script>

View File

@ -98,14 +98,12 @@
const todayEvent = getTodayEvent(); const todayEvent = getTodayEvent();
if (todayEvent != "No event") { if (todayEvent) {
heroTopBarEl.classList.remove('hidden'); heroTopBarEl.classList.remove('hidden');
heroTopBarEl.innerHTML = todayEvent.blurb;
if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { if (todayEvent.class) {
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); headerImgEl.classList.add(todayEvent.class);
} else {
headerImgEl.classList.add(getBanner(todayEvent));
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent);
} }
} }
@ -114,196 +112,100 @@
const month = date.getMonth() + 1; const month = date.getMonth() + 1;
const day = date.getDate(); const day = date.getDate();
if (month == 3 && day == 1) const currentYear = date.getFullYear();
return "Zero Discrimination Day"; const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear();
else if (month == 3 && day == 8) const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate;
return "International Women's Day";
else if (month == 3 && day == 31) if (month === 3 && day === 1)
return "Trans Day of Visibility"; return {
else if (month == 4 && day == 6) blurb: `Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>`,
return "International Asexuality Day"; class: "flag-progress-intersex",
else if (month == 4 && day == 26) };
return "Lesbian Visibility Day"; else if (month === 3 && day === 8)
else if (month == 5 && day == 17) return {
return "IDAHOBIT"; blurb: `Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day}</a>`,
else if (month == 5 && day == 19) class: "symbol-venus",
return "Agender Pride Day"; };
else if (month == 5 && day == 25) else if (month === 3 && day === 31)
return "Pansexual and Panromantic Awareness & Visibility Day"; return {
else if (month == 6) blurb: `Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>`,
return "Pride Month"; class: "flag-trans",
else if (month == 7 && day == 14) };
return "Non-Binary People's Day"; else if (month === 4 && day === 6)
else if (month == 7 && day == 28) return {
return "Leilukin's Birthday"; blurb: `Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>`,
else if (month == 9 && day == 11) class: "flag-ace",
return "Leilukin's Hub Anniversary"; };
else if (month == 9 && day == 23) else if (month === 4 && day === 26)
return "Bi Visibility Day"; return {
else if (month == 10 && day == 8) blurb: `Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>`,
return "International Lesbian Day"; class: "flag-lesbian",
else if (month == 10 && day == 11) };
return "National Coming Out Day"; else if (month === 5 && day === 17)
else if (month == 10 && day == 17) return {
return "Genderfluid Visibility Week"; blurb: `Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a>`,
else if (month == 10 && day == 24) class: "flag-progress",
return "Ace Week"; };
else if (month == 10 && day == 26) else if (month === 5 && day === 19)
return "Intersex Awareness Day"; return {
blurb: `Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a>`,
class: "flag-agender",
};
else if (month === 5 && day === 25)
return {
blurb: `Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Awareness and Visibility Day</a>`,
class: "flag-pan",
};
else if (month === 6)
return {
blurb: `Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!`,
class: "flag-progress-intersex",
};
else if (month === 7 && day === 14)
return {
blurb: `Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>`,
class: "flag-nonbinary",
};
else if (month === 7 && day === 28)
return {
blurb: `Today is Leilukin's Birthday`
};
else if (month === 9 && day === 11)
return {
blurb: `Today is the ${leilukinsHubAnniversary}-year anniversary of the launch of Leilukin's Hub`
};
else if (month === 9 && day === 23)
return {
blurb: `Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>`,
class: "flag-bi",
};
else if (month === 10 && day === 8)
return {
blurb: `Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>`,
class: "flag-lesbian",
};
else if (month === 10 && day === 11)
return {
blurb: `Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>`,
class: "flag-rainbow",
};
else if (month === 10 && day === 17)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>`,
class: "flag-genderfluid",
};
else if (month === 10 && day === 24)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>`,
class: "flag-ace",
};
else if (month === 10 && day === 26)
return {
blurb: `Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>`,
class: "flag-intersex",
};
else else
return "No event"; return null;
}
function getBanner(day) {
switch (day) {
case "Zero Discrimination Day":
return "flag-progress-intersex";
break;
case "International Women's Day":
return "symbol-venus";
break;
case "Trans Day of Visibility":
return "flag-trans";
break;
case "International Asexuality Day":
return "flag-ace";
break;
case "Lesbian Visibility Day":
return "flag-lesbian";
break;
case "IDAHOBIT":
return "flag-progress";
break;
case "Agender Pride Day":
return "flag-agender";
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return "flag-pan";
break;
case "Pride Month":
return "flag-progress-intersex";
break;
case "Non-Binary People's Day":
return "flag-non-binary";
break;
case "Bi Visibility Day":
return "flag-bi";
break;
case "International Lesbian Day":
return "flag-lesbian";
break;
case "National Coming Out Day":
return "flag-rainbow";
break;
case "Genderfluid Visibility Week":
return "flag-genderfluid";
break;
case "Ace Week":
return "flag-ace";
break;
case "Intersex Awareness Day":
return "flag-intersex";
break;
default:
return "";
}
}
function getBlurbHtml(day) {
switch (day) {
case "Zero Discrimination Day":
return `
Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>
`;
break;
case "International Women's Day":
return `
Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day</a>
`;
break;
case "Trans Day of Visibility":
return `
Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>
`;
break;
case "International Asexuality Day":
return `
Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>
`;
break;
case "Lesbian Visibility Day":
return `
Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>
`;
break;
case "IDAHOBIT":
return `
Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a></span>
`;
break;
case "Agender Pride Day":
return `
Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a></span>
`;
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return `
Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Visibility Day</a>
`;
break;
case "Pride Month":
return `
Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!
`;
break;
case "Non-Binary People's Day":
return `
Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>
`;
break;
case "Leilukin's Birthday":
return `
Today is Leilukin's birthday
`;
break;
case "Leilukin's Hub Anniversary":
return `
Today is the anniversary of the launch of Leilukin's Hub
`;
break;
case "Bi Visibility Day":
return `
Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>
`;
break;
case "International Lesbian Day":
return `
Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>
`;
break;
case "National Coming Out Day":
return `
Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>
`;
break;
case "Genderfluid Visibility Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>
`;
break;
case "Ace Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>
`;
break;
case "Intersex Awareness Day":
return `
Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>
`;
break;
default:
return ``;
}
} }
</script> </script>

View File

@ -98,14 +98,12 @@
const todayEvent = getTodayEvent(); const todayEvent = getTodayEvent();
if (todayEvent != "No event") { if (todayEvent) {
heroTopBarEl.classList.remove('hidden'); heroTopBarEl.classList.remove('hidden');
heroTopBarEl.innerHTML = todayEvent.blurb;
if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { if (todayEvent.class) {
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); headerImgEl.classList.add(todayEvent.class);
} else {
headerImgEl.classList.add(getBanner(todayEvent));
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent);
} }
} }
@ -114,196 +112,100 @@
const month = date.getMonth() + 1; const month = date.getMonth() + 1;
const day = date.getDate(); const day = date.getDate();
if (month == 3 && day == 1) const currentYear = date.getFullYear();
return "Zero Discrimination Day"; const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear();
else if (month == 3 && day == 8) const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate;
return "International Women's Day";
else if (month == 3 && day == 31) if (month === 3 && day === 1)
return "Trans Day of Visibility"; return {
else if (month == 4 && day == 6) blurb: `Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>`,
return "International Asexuality Day"; class: "flag-progress-intersex",
else if (month == 4 && day == 26) };
return "Lesbian Visibility Day"; else if (month === 3 && day === 8)
else if (month == 5 && day == 17) return {
return "IDAHOBIT"; blurb: `Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day}</a>`,
else if (month == 5 && day == 19) class: "symbol-venus",
return "Agender Pride Day"; };
else if (month == 5 && day == 25) else if (month === 3 && day === 31)
return "Pansexual and Panromantic Awareness & Visibility Day"; return {
else if (month == 6) blurb: `Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>`,
return "Pride Month"; class: "flag-trans",
else if (month == 7 && day == 14) };
return "Non-Binary People's Day"; else if (month === 4 && day === 6)
else if (month == 7 && day == 28) return {
return "Leilukin's Birthday"; blurb: `Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>`,
else if (month == 9 && day == 11) class: "flag-ace",
return "Leilukin's Hub Anniversary"; };
else if (month == 9 && day == 23) else if (month === 4 && day === 26)
return "Bi Visibility Day"; return {
else if (month == 10 && day == 8) blurb: `Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>`,
return "International Lesbian Day"; class: "flag-lesbian",
else if (month == 10 && day == 11) };
return "National Coming Out Day"; else if (month === 5 && day === 17)
else if (month == 10 && day == 17) return {
return "Genderfluid Visibility Week"; blurb: `Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a>`,
else if (month == 10 && day == 24) class: "flag-progress",
return "Ace Week"; };
else if (month == 10 && day == 26) else if (month === 5 && day === 19)
return "Intersex Awareness Day"; return {
blurb: `Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a>`,
class: "flag-agender",
};
else if (month === 5 && day === 25)
return {
blurb: `Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Awareness and Visibility Day</a>`,
class: "flag-pan",
};
else if (month === 6)
return {
blurb: `Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!`,
class: "flag-progress-intersex",
};
else if (month === 7 && day === 14)
return {
blurb: `Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>`,
class: "flag-nonbinary",
};
else if (month === 7 && day === 28)
return {
blurb: `Today is Leilukin's Birthday`
};
else if (month === 9 && day === 11)
return {
blurb: `Today is the ${leilukinsHubAnniversary}-year anniversary of the launch of Leilukin's Hub`
};
else if (month === 9 && day === 23)
return {
blurb: `Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>`,
class: "flag-bi",
};
else if (month === 10 && day === 8)
return {
blurb: `Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>`,
class: "flag-lesbian",
};
else if (month === 10 && day === 11)
return {
blurb: `Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>`,
class: "flag-rainbow",
};
else if (month === 10 && day === 17)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>`,
class: "flag-genderfluid",
};
else if (month === 10 && day === 24)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>`,
class: "flag-ace",
};
else if (month === 10 && day === 26)
return {
blurb: `Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>`,
class: "flag-intersex",
};
else else
return "No event"; return null;
}
function getBanner(day) {
switch (day) {
case "Zero Discrimination Day":
return "flag-progress-intersex";
break;
case "International Women's Day":
return "symbol-venus";
break;
case "Trans Day of Visibility":
return "flag-trans";
break;
case "International Asexuality Day":
return "flag-ace";
break;
case "Lesbian Visibility Day":
return "flag-lesbian";
break;
case "IDAHOBIT":
return "flag-progress";
break;
case "Agender Pride Day":
return "flag-agender";
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return "flag-pan";
break;
case "Pride Month":
return "flag-progress-intersex";
break;
case "Non-Binary People's Day":
return "flag-non-binary";
break;
case "Bi Visibility Day":
return "flag-bi";
break;
case "International Lesbian Day":
return "flag-lesbian";
break;
case "National Coming Out Day":
return "flag-rainbow";
break;
case "Genderfluid Visibility Week":
return "flag-genderfluid";
break;
case "Ace Week":
return "flag-ace";
break;
case "Intersex Awareness Day":
return "flag-intersex";
break;
default:
return "";
}
}
function getBlurbHtml(day) {
switch (day) {
case "Zero Discrimination Day":
return `
Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>
`;
break;
case "International Women's Day":
return `
Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day</a>
`;
break;
case "Trans Day of Visibility":
return `
Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>
`;
break;
case "International Asexuality Day":
return `
Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>
`;
break;
case "Lesbian Visibility Day":
return `
Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>
`;
break;
case "IDAHOBIT":
return `
Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a></span>
`;
break;
case "Agender Pride Day":
return `
Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a></span>
`;
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return `
Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Visibility Day</a>
`;
break;
case "Pride Month":
return `
Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!
`;
break;
case "Non-Binary People's Day":
return `
Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>
`;
break;
case "Leilukin's Birthday":
return `
Today is Leilukin's birthday
`;
break;
case "Leilukin's Hub Anniversary":
return `
Today is the anniversary of the launch of Leilukin's Hub
`;
break;
case "Bi Visibility Day":
return `
Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>
`;
break;
case "International Lesbian Day":
return `
Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>
`;
break;
case "National Coming Out Day":
return `
Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>
`;
break;
case "Genderfluid Visibility Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>
`;
break;
case "Ace Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>
`;
break;
case "Intersex Awareness Day":
return `
Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>
`;
break;
default:
return ``;
}
} }
</script> </script>

View File

@ -11,14 +11,12 @@
{% block eventScript %} {% block eventScript %}
const todayEvent = getTodayEvent(); const todayEvent = getTodayEvent();
if (todayEvent != "No event") { if (todayEvent) {
heroTopBarEl.classList.remove('hidden'); heroTopBarEl.classList.remove('hidden');
heroTopBarEl.innerHTML = todayEvent.blurb;
if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { if (todayEvent.class) {
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); headerImgEl.classList.add(todayEvent.class);
} else {
headerImgEl.classList.add(getBanner(todayEvent));
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent);
} }
} }
@ -27,195 +25,99 @@
const month = date.getMonth() + 1; const month = date.getMonth() + 1;
const day = date.getDate(); const day = date.getDate();
if (month == 3 && day == 1) const currentYear = date.getFullYear();
return "Zero Discrimination Day"; const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear();
else if (month == 3 && day == 8) const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate;
return "International Women's Day";
else if (month == 3 && day == 31) if (month === 3 && day === 1)
return "Trans Day of Visibility"; return {
else if (month == 4 && day == 6) blurb: `Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>`,
return "International Asexuality Day"; class: "flag-progress-intersex",
else if (month == 4 && day == 26) };
return "Lesbian Visibility Day"; else if (month === 3 && day === 8)
else if (month == 5 && day == 17) return {
return "IDAHOBIT"; blurb: `Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day}</a>`,
else if (month == 5 && day == 19) class: "symbol-venus",
return "Agender Pride Day"; };
else if (month == 5 && day == 25) else if (month === 3 && day === 31)
return "Pansexual and Panromantic Awareness & Visibility Day"; return {
else if (month == 6) blurb: `Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>`,
return "Pride Month"; class: "flag-trans",
else if (month == 7 && day == 14) };
return "Non-Binary People's Day"; else if (month === 4 && day === 6)
else if (month == 7 && day == 28) return {
return "Leilukin's Birthday"; blurb: `Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>`,
else if (month == 9 && day == 11) class: "flag-ace",
return "Leilukin's Hub Anniversary"; };
else if (month == 9 && day == 23) else if (month === 4 && day === 26)
return "Bi Visibility Day"; return {
else if (month == 10 && day == 8) blurb: `Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>`,
return "International Lesbian Day"; class: "flag-lesbian",
else if (month == 10 && day == 11) };
return "National Coming Out Day"; else if (month === 5 && day === 17)
else if (month == 10 && day == 17) return {
return "Genderfluid Visibility Week"; blurb: `Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a>`,
else if (month == 10 && day == 24) class: "flag-progress",
return "Ace Week"; };
else if (month == 10 && day == 26) else if (month === 5 && day === 19)
return "Intersex Awareness Day"; return {
blurb: `Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a>`,
class: "flag-agender",
};
else if (month === 5 && day === 25)
return {
blurb: `Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Awareness and Visibility Day</a>`,
class: "flag-pan",
};
else if (month === 6)
return {
blurb: `Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!`,
class: "flag-progress-intersex",
};
else if (month === 7 && day === 14)
return {
blurb: `Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>`,
class: "flag-nonbinary",
};
else if (month === 7 && day === 28)
return {
blurb: `Today is Leilukin's Birthday`
};
else if (month === 9 && day === 11)
return {
blurb: `Today is the ${leilukinsHubAnniversary}-year anniversary of the launch of Leilukin's Hub`
};
else if (month === 9 && day === 23)
return {
blurb: `Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>`,
class: "flag-bi",
};
else if (month === 10 && day === 8)
return {
blurb: `Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>`,
class: "flag-lesbian",
};
else if (month === 10 && day === 11)
return {
blurb: `Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>`,
class: "flag-rainbow",
};
else if (month === 10 && day === 17)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>`,
class: "flag-genderfluid",
};
else if (month === 10 && day === 24)
return {
blurb: `Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>`,
class: "flag-ace",
};
else if (month === 10 && day === 26)
return {
blurb: `Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>`,
class: "flag-intersex",
};
else else
return "No event"; return null;
}
function getBanner(day) {
switch (day) {
case "Zero Discrimination Day":
return "flag-progress-intersex";
break;
case "International Women's Day":
return "symbol-venus";
break;
case "Trans Day of Visibility":
return "flag-trans";
break;
case "International Asexuality Day":
return "flag-ace";
break;
case "Lesbian Visibility Day":
return "flag-lesbian";
break;
case "IDAHOBIT":
return "flag-progress";
break;
case "Agender Pride Day":
return "flag-agender";
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return "flag-pan";
break;
case "Pride Month":
return "flag-progress-intersex";
break;
case "Non-Binary People's Day":
return "flag-non-binary";
break;
case "Bi Visibility Day":
return "flag-bi";
break;
case "International Lesbian Day":
return "flag-lesbian";
break;
case "National Coming Out Day":
return "flag-rainbow";
break;
case "Genderfluid Visibility Week":
return "flag-genderfluid";
break;
case "Ace Week":
return "flag-ace";
break;
case "Intersex Awareness Day":
return "flag-intersex";
break;
default:
return "";
}
}
function getBlurbHtml(day) {
switch (day) {
case "Zero Discrimination Day":
return `
Today is <a href="https://www.unaids.org/en/zero-discrimination-day" target="_blank">Zero Discrimination Day</a>
`;
break;
case "International Women's Day":
return `
Today is <a href="https://www.internationalwomensday.com/" target="_blank">International Women's Day</a>
`;
break;
case "Trans Day of Visibility":
return `
Today is <a href="https://www.manygendersonevoice.org/tdov.html" target="_blank">Trans Day of Visibility</a>
`;
break;
case "International Asexuality Day":
return `
Today is <a href="https://internationalasexualityday.org/en" target="_blank">International Asexuality Day</a>
`;
break;
case "Lesbian Visibility Day":
return `
Today is <a href="https://www.lesbianvisibilityweek.com" target="_blank">Lesbian Visibility Day</a>
`;
break;
case "IDAHOBIT":
return `
Today is <a href="https://may17.org" target="_blank">International Day Against Homophobia, Biphobia and Transphobia</a></span>
`;
break;
case "Agender Pride Day":
return `
Today is <a href="https://www.believeoutloud.com/voices/article/agender-pride-day/" target="_blank">Agender Pride Day</a></span>
`;
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return `
Today is <a href="https://genderedintelligence.co.uk/panvisibilityday" target="_blank">Pansexual and Panromantic Visibility Day</a>
`;
break;
case "Pride Month":
return `
Happy <a href="https://www.loc.gov/lgbt-pride-month/about/" target="_blank">Pride Month</a>!
`;
break;
case "Non-Binary People's Day":
return `
Today is <a href="https://www.manygendersonevoice.org/non-binary-peoples-day.html" target="_blank">Non-Binary People's Day</a>
`;
break;
case "Leilukin's Birthday":
return `
Today is Leilukin's birthday
`;
break;
case "Leilukin's Hub Anniversary":
return `
Today is the anniversary of the launch of Leilukin's Hub
`;
break;
case "Bi Visibility Day":
return `
Today is <a href="https://bivisibilityday.com/about" target="_blank">Bi Visibility Day</a>
`;
break;
case "International Lesbian Day":
return `
Today is <a href="https://www.lgbtiqhealth.org.au/international_lesbian_day2" target="_blank">International Lesbian Day</a>
`;
break;
case "National Coming Out Day":
return `
Today is <a href="https://www.hrc.org/resources/national-coming-out-day" target="_blank">National Coming Out Day</a>
`;
break;
case "Genderfluid Visibility Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target="_blank">Genderfluid Visibility Week</a>
`;
break;
case "Ace Week":
return `
Today is the start of <a href="https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target="_blank">Ace Week</a>
`;
break;
case "Intersex Awareness Day":
return `
Today is <a href="https://interactadvocates.org/intersex-awareness-day" target="_blank">Intersex Awareness Day</a>
`;
break;
default:
return ``;
}
} }
{% endblock %} {% endblock %}