From 1830f0b8c8d14f1aa695ba71cc44572fdfe27450 Mon Sep 17 00:00:00 2001 From: Helen Chong <119173961+helenclx@users.noreply.github.com> Date: Mon, 29 Apr 2024 13:07:49 +0800 Subject: [PATCH] Refactor main hero header events --- _site/about/index.html | 292 ++++++------------ _site/archive/index.html | 292 ++++++------------ .../index.html | 292 ++++++------------ .../index.html | 292 ++++++------------ _site/articles/index.html | 292 ++++++------------ .../index.html | 292 ++++++------------ .../index.html | 292 ++++++------------ .../my-dislike-of-shipping-culture/index.html | 292 ++++++------------ _site/blog/index.html | 292 ++++++------------ _site/blog/page/2/index.html | 292 ++++++------------ _site/blog/page/3/index.html | 292 ++++++------------ .../index.html | 292 ++++++------------ .../index.html | 292 ++++++------------ .../index.html | 292 ++++++------------ .../index.html | 292 ++++++------------ .../index.html | 292 ++++++------------ .../index.html | 292 ++++++------------ .../index.html | 292 ++++++------------ .../index.html | 292 ++++++------------ .../index.html | 292 ++++++------------ .../index.html | 292 ++++++------------ .../index.html | 292 ++++++------------ .../index.html | 292 ++++++------------ .../index.html | 292 ++++++------------ _site/blog/posts/index.html | 292 ++++++------------ _site/categories/a-summers-end/index.html | 292 ++++++------------ _site/categories/anti-harry-potter/index.html | 292 ++++++------------ _site/categories/anti-jk-rowling/index.html | 292 ++++++------------ _site/categories/cassette-beasts/index.html | 292 ++++++------------ _site/categories/dracula-daily/index.html | 292 ++++++------------ _site/categories/fandom-culture/index.html | 292 ++++++------------ _site/categories/index.html | 292 ++++++------------ _site/categories/lesbian/index.html | 292 ++++++------------ _site/categories/life-updates/index.html | 292 ++++++------------ _site/categories/modding/index.html | 292 ++++++------------ _site/categories/my-birthday/index.html | 292 ++++++------------ _site/categories/my-interviews/index.html | 292 ++++++------------ _site/categories/site-anniversary/index.html | 292 ++++++------------ _site/categories/site-updates/index.html | 292 ++++++------------ _site/categories/star-wars-kotor-2/index.html | 292 ++++++------------ _site/categories/star-wars-kotor/index.html | 292 ++++++------------ _site/changelogs/2022/index.html | 292 ++++++------------ _site/changelogs/2023/index.html | 292 ++++++------------ _site/changelogs/2024/index.html | 292 ++++++------------ _site/changelogs/index.html | 292 ++++++------------ _site/changelogs/layouts/index.html | 292 ++++++------------ _site/changelogs/page/2/index.html | 292 ++++++------------ _site/changelogs/page/3/index.html | 292 ++++++------------ _site/changelogs/page/4/index.html | 292 ++++++------------ _site/changelogs/page/5/index.html | 292 ++++++------------ _site/feed.xml | 2 +- _site/index.html | 292 ++++++------------ _site/links/index.html | 292 ++++++------------ _site/now/index.html | 292 ++++++------------ _site/projects/index.html | 292 ++++++------------ _site/projects/kotor1mods/index.html | 292 ++++++------------ _site/projects/kotor2mods/index.html | 292 ++++++------------ _site/projects/playlists/index.html | 292 ++++++------------ _site/shrines/index.html | 292 ++++++------------ _site/sitemap/index.html | 292 ++++++------------ src/_includes/main/hero.njk | 292 ++++++------------ 61 files changed, 5821 insertions(+), 11701 deletions(-) diff --git a/_site/about/index.html b/_site/about/index.html index 7374f351..6200ac1f 100644 --- a/_site/about/index.html +++ b/_site/about/index.html @@ -98,14 +98,12 @@ const todayEvent = getTodayEvent(); - if (todayEvent != "No event") { + if (todayEvent) { heroTopBarEl.classList.remove('hidden'); + heroTopBarEl.innerHTML = todayEvent.blurb; - if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); - } else { - headerImgEl.classList.add(getBanner(todayEvent)); - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); + if (todayEvent.class) { + headerImgEl.classList.add(todayEvent.class); } } @@ -114,196 +112,100 @@ const month = date.getMonth() + 1; const day = date.getDate(); - if (month == 3 && day == 1) - return "Zero Discrimination Day"; - else if (month == 3 && day == 8) - return "International Women's Day"; - else if (month == 3 && day == 31) - return "Trans Day of Visibility"; - else if (month == 4 && day == 6) - return "International Asexuality Day"; - else if (month == 4 && day == 26) - return "Lesbian Visibility Day"; - else if (month == 5 && day == 17) - return "IDAHOBIT"; - else if (month == 5 && day == 19) - return "Agender Pride Day"; - else if (month == 5 && day == 25) - return "Pansexual and Panromantic Awareness & Visibility Day"; - else if (month == 6) - return "Pride Month"; - else if (month == 7 && day == 14) - return "Non-Binary People's Day"; - else if (month == 7 && day == 28) - return "Leilukin's Birthday"; - else if (month == 9 && day == 11) - return "Leilukin's Hub Anniversary"; - else if (month == 9 && day == 23) - return "Bi Visibility Day"; - else if (month == 10 && day == 8) - return "International Lesbian Day"; - else if (month == 10 && day == 11) - return "National Coming Out Day"; - else if (month == 10 && day == 17) - return "Genderfluid Visibility Week"; - else if (month == 10 && day == 24) - return "Ace Week"; - else if (month == 10 && day == 26) - return "Intersex Awareness Day"; + const currentYear = date.getFullYear(); + const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear(); + const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate; + + if (month === 3 && day === 1) + return { + blurb: `Today is Zero Discrimination Day`, + class: "flag-progress-intersex", + }; + else if (month === 3 && day === 8) + return { + blurb: `Today is International Women's Day}`, + class: "symbol-venus", + }; + else if (month === 3 && day === 31) + return { + blurb: `Today is Trans Day of Visibility`, + class: "flag-trans", + }; + else if (month === 4 && day === 6) + return { + blurb: `Today is International Asexuality Day`, + class: "flag-ace", + }; + else if (month === 4 && day === 26) + return { + blurb: `Today is Lesbian Visibility Day`, + class: "flag-lesbian", + }; + else if (month === 5 && day === 17) + return { + blurb: `Today is International Day Against Homophobia, Biphobia and Transphobia`, + class: "flag-progress", + }; + else if (month === 5 && day === 19) + return { + blurb: `Today is Agender Pride Day`, + class: "flag-agender", + }; + else if (month === 5 && day === 25) + return { + blurb: `Today is Pansexual and Panromantic Awareness and Visibility Day`, + class: "flag-pan", + }; + else if (month === 6) + return { + blurb: `Happy Pride Month!`, + class: "flag-progress-intersex", + }; + else if (month === 7 && day === 14) + return { + blurb: `Today is Non-Binary People's Day`, + 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 Bi Visibility Day`, + class: "flag-bi", + }; + else if (month === 10 && day === 8) + return { + blurb: `Today is International Lesbian Day`, + class: "flag-lesbian", + }; + else if (month === 10 && day === 11) + return { + blurb: `Today is National Coming Out Day`, + class: "flag-rainbow", + }; + else if (month === 10 && day === 17) + return { + blurb: `Today is the start of Genderfluid Visibility Week`, + class: "flag-genderfluid", + }; + else if (month === 10 && day === 24) + return { + blurb: `Today is the start of Ace Week`, + class: "flag-ace", + }; + else if (month === 10 && day === 26) + return { + blurb: `Today is Intersex Awareness Day`, + class: "flag-intersex", + }; else - return "No event"; - } - - 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 Zero Discrimination Day - `; - break; - case "International Women's Day": - return ` - Today is International Women's Day - `; - break; - case "Trans Day of Visibility": - return ` - Today is Trans Day of Visibility - `; - break; - case "International Asexuality Day": - return ` - Today is International Asexuality Day - `; - break; - case "Lesbian Visibility Day": - return ` - Today is Lesbian Visibility Day - `; - break; - case "IDAHOBIT": - return ` - Today is International Day Against Homophobia, Biphobia and Transphobia - `; - break; - case "Agender Pride Day": - return ` - Today is Agender Pride Day - `; - break; - case "Pansexual and Panromantic Awareness & Visibility Day": - return ` - Today is Pansexual and Panromantic Visibility Day - `; - break; - case "Pride Month": - return ` - Happy Pride Month! - `; - break; - case "Non-Binary People's Day": - return ` - Today is Non-Binary People's Day - `; - 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 Bi Visibility Day - `; - break; - case "International Lesbian Day": - return ` - Today is International Lesbian Day - `; - break; - case "National Coming Out Day": - return ` - Today is National Coming Out Day - `; - break; - case "Genderfluid Visibility Week": - return ` - Today is the start of Genderfluid Visibility Week - `; - break; - case "Ace Week": - return ` - Today is the start of Ace Week - `; - break; - case "Intersex Awareness Day": - return ` - Today is Intersex Awareness Day - `; - break; - default: - return ``; - } + return null; } diff --git a/_site/archive/index.html b/_site/archive/index.html index 3af4ccf4..c9a27dfc 100644 --- a/_site/archive/index.html +++ b/_site/archive/index.html @@ -98,14 +98,12 @@ const todayEvent = getTodayEvent(); - if (todayEvent != "No event") { + if (todayEvent) { heroTopBarEl.classList.remove('hidden'); + heroTopBarEl.innerHTML = todayEvent.blurb; - if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); - } else { - headerImgEl.classList.add(getBanner(todayEvent)); - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); + if (todayEvent.class) { + headerImgEl.classList.add(todayEvent.class); } } @@ -114,196 +112,100 @@ const month = date.getMonth() + 1; const day = date.getDate(); - if (month == 3 && day == 1) - return "Zero Discrimination Day"; - else if (month == 3 && day == 8) - return "International Women's Day"; - else if (month == 3 && day == 31) - return "Trans Day of Visibility"; - else if (month == 4 && day == 6) - return "International Asexuality Day"; - else if (month == 4 && day == 26) - return "Lesbian Visibility Day"; - else if (month == 5 && day == 17) - return "IDAHOBIT"; - else if (month == 5 && day == 19) - return "Agender Pride Day"; - else if (month == 5 && day == 25) - return "Pansexual and Panromantic Awareness & Visibility Day"; - else if (month == 6) - return "Pride Month"; - else if (month == 7 && day == 14) - return "Non-Binary People's Day"; - else if (month == 7 && day == 28) - return "Leilukin's Birthday"; - else if (month == 9 && day == 11) - return "Leilukin's Hub Anniversary"; - else if (month == 9 && day == 23) - return "Bi Visibility Day"; - else if (month == 10 && day == 8) - return "International Lesbian Day"; - else if (month == 10 && day == 11) - return "National Coming Out Day"; - else if (month == 10 && day == 17) - return "Genderfluid Visibility Week"; - else if (month == 10 && day == 24) - return "Ace Week"; - else if (month == 10 && day == 26) - return "Intersex Awareness Day"; + const currentYear = date.getFullYear(); + const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear(); + const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate; + + if (month === 3 && day === 1) + return { + blurb: `Today is Zero Discrimination Day`, + class: "flag-progress-intersex", + }; + else if (month === 3 && day === 8) + return { + blurb: `Today is International Women's Day}`, + class: "symbol-venus", + }; + else if (month === 3 && day === 31) + return { + blurb: `Today is Trans Day of Visibility`, + class: "flag-trans", + }; + else if (month === 4 && day === 6) + return { + blurb: `Today is International Asexuality Day`, + class: "flag-ace", + }; + else if (month === 4 && day === 26) + return { + blurb: `Today is Lesbian Visibility Day`, + class: "flag-lesbian", + }; + else if (month === 5 && day === 17) + return { + blurb: `Today is International Day Against Homophobia, Biphobia and Transphobia`, + class: "flag-progress", + }; + else if (month === 5 && day === 19) + return { + blurb: `Today is Agender Pride Day`, + class: "flag-agender", + }; + else if (month === 5 && day === 25) + return { + blurb: `Today is Pansexual and Panromantic Awareness and Visibility Day`, + class: "flag-pan", + }; + else if (month === 6) + return { + blurb: `Happy Pride Month!`, + class: "flag-progress-intersex", + }; + else if (month === 7 && day === 14) + return { + blurb: `Today is Non-Binary People's Day`, + 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 Bi Visibility Day`, + class: "flag-bi", + }; + else if (month === 10 && day === 8) + return { + blurb: `Today is International Lesbian Day`, + class: "flag-lesbian", + }; + else if (month === 10 && day === 11) + return { + blurb: `Today is National Coming Out Day`, + class: "flag-rainbow", + }; + else if (month === 10 && day === 17) + return { + blurb: `Today is the start of Genderfluid Visibility Week`, + class: "flag-genderfluid", + }; + else if (month === 10 && day === 24) + return { + blurb: `Today is the start of Ace Week`, + class: "flag-ace", + }; + else if (month === 10 && day === 26) + return { + blurb: `Today is Intersex Awareness Day`, + class: "flag-intersex", + }; else - return "No event"; - } - - 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 Zero Discrimination Day - `; - break; - case "International Women's Day": - return ` - Today is International Women's Day - `; - break; - case "Trans Day of Visibility": - return ` - Today is Trans Day of Visibility - `; - break; - case "International Asexuality Day": - return ` - Today is International Asexuality Day - `; - break; - case "Lesbian Visibility Day": - return ` - Today is Lesbian Visibility Day - `; - break; - case "IDAHOBIT": - return ` - Today is International Day Against Homophobia, Biphobia and Transphobia - `; - break; - case "Agender Pride Day": - return ` - Today is Agender Pride Day - `; - break; - case "Pansexual and Panromantic Awareness & Visibility Day": - return ` - Today is Pansexual and Panromantic Visibility Day - `; - break; - case "Pride Month": - return ` - Happy Pride Month! - `; - break; - case "Non-Binary People's Day": - return ` - Today is Non-Binary People's Day - `; - 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 Bi Visibility Day - `; - break; - case "International Lesbian Day": - return ` - Today is International Lesbian Day - `; - break; - case "National Coming Out Day": - return ` - Today is National Coming Out Day - `; - break; - case "Genderfluid Visibility Week": - return ` - Today is the start of Genderfluid Visibility Week - `; - break; - case "Ace Week": - return ` - Today is the start of Ace Week - `; - break; - case "Intersex Awareness Day": - return ` - Today is Intersex Awareness Day - `; - break; - default: - return ``; - } + return null; } diff --git a/_site/articles/anti-harry-potter-jk-rowling-masterlist/index.html b/_site/articles/anti-harry-potter-jk-rowling-masterlist/index.html index 0641543c..def69ef4 100644 --- a/_site/articles/anti-harry-potter-jk-rowling-masterlist/index.html +++ b/_site/articles/anti-harry-potter-jk-rowling-masterlist/index.html @@ -98,14 +98,12 @@ const todayEvent = getTodayEvent(); - if (todayEvent != "No event") { + if (todayEvent) { heroTopBarEl.classList.remove('hidden'); + heroTopBarEl.innerHTML = todayEvent.blurb; - if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); - } else { - headerImgEl.classList.add(getBanner(todayEvent)); - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); + if (todayEvent.class) { + headerImgEl.classList.add(todayEvent.class); } } @@ -114,196 +112,100 @@ const month = date.getMonth() + 1; const day = date.getDate(); - if (month == 3 && day == 1) - return "Zero Discrimination Day"; - else if (month == 3 && day == 8) - return "International Women's Day"; - else if (month == 3 && day == 31) - return "Trans Day of Visibility"; - else if (month == 4 && day == 6) - return "International Asexuality Day"; - else if (month == 4 && day == 26) - return "Lesbian Visibility Day"; - else if (month == 5 && day == 17) - return "IDAHOBIT"; - else if (month == 5 && day == 19) - return "Agender Pride Day"; - else if (month == 5 && day == 25) - return "Pansexual and Panromantic Awareness & Visibility Day"; - else if (month == 6) - return "Pride Month"; - else if (month == 7 && day == 14) - return "Non-Binary People's Day"; - else if (month == 7 && day == 28) - return "Leilukin's Birthday"; - else if (month == 9 && day == 11) - return "Leilukin's Hub Anniversary"; - else if (month == 9 && day == 23) - return "Bi Visibility Day"; - else if (month == 10 && day == 8) - return "International Lesbian Day"; - else if (month == 10 && day == 11) - return "National Coming Out Day"; - else if (month == 10 && day == 17) - return "Genderfluid Visibility Week"; - else if (month == 10 && day == 24) - return "Ace Week"; - else if (month == 10 && day == 26) - return "Intersex Awareness Day"; + const currentYear = date.getFullYear(); + const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear(); + const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate; + + if (month === 3 && day === 1) + return { + blurb: `Today is Zero Discrimination Day`, + class: "flag-progress-intersex", + }; + else if (month === 3 && day === 8) + return { + blurb: `Today is International Women's Day}`, + class: "symbol-venus", + }; + else if (month === 3 && day === 31) + return { + blurb: `Today is Trans Day of Visibility`, + class: "flag-trans", + }; + else if (month === 4 && day === 6) + return { + blurb: `Today is International Asexuality Day`, + class: "flag-ace", + }; + else if (month === 4 && day === 26) + return { + blurb: `Today is Lesbian Visibility Day`, + class: "flag-lesbian", + }; + else if (month === 5 && day === 17) + return { + blurb: `Today is International Day Against Homophobia, Biphobia and Transphobia`, + class: "flag-progress", + }; + else if (month === 5 && day === 19) + return { + blurb: `Today is Agender Pride Day`, + class: "flag-agender", + }; + else if (month === 5 && day === 25) + return { + blurb: `Today is Pansexual and Panromantic Awareness and Visibility Day`, + class: "flag-pan", + }; + else if (month === 6) + return { + blurb: `Happy Pride Month!`, + class: "flag-progress-intersex", + }; + else if (month === 7 && day === 14) + return { + blurb: `Today is Non-Binary People's Day`, + 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 Bi Visibility Day`, + class: "flag-bi", + }; + else if (month === 10 && day === 8) + return { + blurb: `Today is International Lesbian Day`, + class: "flag-lesbian", + }; + else if (month === 10 && day === 11) + return { + blurb: `Today is National Coming Out Day`, + class: "flag-rainbow", + }; + else if (month === 10 && day === 17) + return { + blurb: `Today is the start of Genderfluid Visibility Week`, + class: "flag-genderfluid", + }; + else if (month === 10 && day === 24) + return { + blurb: `Today is the start of Ace Week`, + class: "flag-ace", + }; + else if (month === 10 && day === 26) + return { + blurb: `Today is Intersex Awareness Day`, + class: "flag-intersex", + }; else - return "No event"; - } - - 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 Zero Discrimination Day - `; - break; - case "International Women's Day": - return ` - Today is International Women's Day - `; - break; - case "Trans Day of Visibility": - return ` - Today is Trans Day of Visibility - `; - break; - case "International Asexuality Day": - return ` - Today is International Asexuality Day - `; - break; - case "Lesbian Visibility Day": - return ` - Today is Lesbian Visibility Day - `; - break; - case "IDAHOBIT": - return ` - Today is International Day Against Homophobia, Biphobia and Transphobia - `; - break; - case "Agender Pride Day": - return ` - Today is Agender Pride Day - `; - break; - case "Pansexual and Panromantic Awareness & Visibility Day": - return ` - Today is Pansexual and Panromantic Visibility Day - `; - break; - case "Pride Month": - return ` - Happy Pride Month! - `; - break; - case "Non-Binary People's Day": - return ` - Today is Non-Binary People's Day - `; - 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 Bi Visibility Day - `; - break; - case "International Lesbian Day": - return ` - Today is International Lesbian Day - `; - break; - case "National Coming Out Day": - return ` - Today is National Coming Out Day - `; - break; - case "Genderfluid Visibility Week": - return ` - Today is the start of Genderfluid Visibility Week - `; - break; - case "Ace Week": - return ` - Today is the start of Ace Week - `; - break; - case "Intersex Awareness Day": - return ` - Today is Intersex Awareness Day - `; - break; - default: - return ``; - } + return null; } diff --git a/_site/articles/designated-lesbian-syndrome-fandom/index.html b/_site/articles/designated-lesbian-syndrome-fandom/index.html index 625b4c87..5fb2a0dd 100644 --- a/_site/articles/designated-lesbian-syndrome-fandom/index.html +++ b/_site/articles/designated-lesbian-syndrome-fandom/index.html @@ -98,14 +98,12 @@ const todayEvent = getTodayEvent(); - if (todayEvent != "No event") { + if (todayEvent) { heroTopBarEl.classList.remove('hidden'); + heroTopBarEl.innerHTML = todayEvent.blurb; - if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); - } else { - headerImgEl.classList.add(getBanner(todayEvent)); - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); + if (todayEvent.class) { + headerImgEl.classList.add(todayEvent.class); } } @@ -114,196 +112,100 @@ const month = date.getMonth() + 1; const day = date.getDate(); - if (month == 3 && day == 1) - return "Zero Discrimination Day"; - else if (month == 3 && day == 8) - return "International Women's Day"; - else if (month == 3 && day == 31) - return "Trans Day of Visibility"; - else if (month == 4 && day == 6) - return "International Asexuality Day"; - else if (month == 4 && day == 26) - return "Lesbian Visibility Day"; - else if (month == 5 && day == 17) - return "IDAHOBIT"; - else if (month == 5 && day == 19) - return "Agender Pride Day"; - else if (month == 5 && day == 25) - return "Pansexual and Panromantic Awareness & Visibility Day"; - else if (month == 6) - return "Pride Month"; - else if (month == 7 && day == 14) - return "Non-Binary People's Day"; - else if (month == 7 && day == 28) - return "Leilukin's Birthday"; - else if (month == 9 && day == 11) - return "Leilukin's Hub Anniversary"; - else if (month == 9 && day == 23) - return "Bi Visibility Day"; - else if (month == 10 && day == 8) - return "International Lesbian Day"; - else if (month == 10 && day == 11) - return "National Coming Out Day"; - else if (month == 10 && day == 17) - return "Genderfluid Visibility Week"; - else if (month == 10 && day == 24) - return "Ace Week"; - else if (month == 10 && day == 26) - return "Intersex Awareness Day"; + const currentYear = date.getFullYear(); + const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear(); + const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate; + + if (month === 3 && day === 1) + return { + blurb: `Today is Zero Discrimination Day`, + class: "flag-progress-intersex", + }; + else if (month === 3 && day === 8) + return { + blurb: `Today is International Women's Day}`, + class: "symbol-venus", + }; + else if (month === 3 && day === 31) + return { + blurb: `Today is Trans Day of Visibility`, + class: "flag-trans", + }; + else if (month === 4 && day === 6) + return { + blurb: `Today is International Asexuality Day`, + class: "flag-ace", + }; + else if (month === 4 && day === 26) + return { + blurb: `Today is Lesbian Visibility Day`, + class: "flag-lesbian", + }; + else if (month === 5 && day === 17) + return { + blurb: `Today is International Day Against Homophobia, Biphobia and Transphobia`, + class: "flag-progress", + }; + else if (month === 5 && day === 19) + return { + blurb: `Today is Agender Pride Day`, + class: "flag-agender", + }; + else if (month === 5 && day === 25) + return { + blurb: `Today is Pansexual and Panromantic Awareness and Visibility Day`, + class: "flag-pan", + }; + else if (month === 6) + return { + blurb: `Happy Pride Month!`, + class: "flag-progress-intersex", + }; + else if (month === 7 && day === 14) + return { + blurb: `Today is Non-Binary People's Day`, + 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 Bi Visibility Day`, + class: "flag-bi", + }; + else if (month === 10 && day === 8) + return { + blurb: `Today is International Lesbian Day`, + class: "flag-lesbian", + }; + else if (month === 10 && day === 11) + return { + blurb: `Today is National Coming Out Day`, + class: "flag-rainbow", + }; + else if (month === 10 && day === 17) + return { + blurb: `Today is the start of Genderfluid Visibility Week`, + class: "flag-genderfluid", + }; + else if (month === 10 && day === 24) + return { + blurb: `Today is the start of Ace Week`, + class: "flag-ace", + }; + else if (month === 10 && day === 26) + return { + blurb: `Today is Intersex Awareness Day`, + class: "flag-intersex", + }; else - return "No event"; - } - - 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 Zero Discrimination Day - `; - break; - case "International Women's Day": - return ` - Today is International Women's Day - `; - break; - case "Trans Day of Visibility": - return ` - Today is Trans Day of Visibility - `; - break; - case "International Asexuality Day": - return ` - Today is International Asexuality Day - `; - break; - case "Lesbian Visibility Day": - return ` - Today is Lesbian Visibility Day - `; - break; - case "IDAHOBIT": - return ` - Today is International Day Against Homophobia, Biphobia and Transphobia - `; - break; - case "Agender Pride Day": - return ` - Today is Agender Pride Day - `; - break; - case "Pansexual and Panromantic Awareness & Visibility Day": - return ` - Today is Pansexual and Panromantic Visibility Day - `; - break; - case "Pride Month": - return ` - Happy Pride Month! - `; - break; - case "Non-Binary People's Day": - return ` - Today is Non-Binary People's Day - `; - 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 Bi Visibility Day - `; - break; - case "International Lesbian Day": - return ` - Today is International Lesbian Day - `; - break; - case "National Coming Out Day": - return ` - Today is National Coming Out Day - `; - break; - case "Genderfluid Visibility Week": - return ` - Today is the start of Genderfluid Visibility Week - `; - break; - case "Ace Week": - return ` - Today is the start of Ace Week - `; - break; - case "Intersex Awareness Day": - return ` - Today is Intersex Awareness Day - `; - break; - default: - return ``; - } + return null; } diff --git a/_site/articles/index.html b/_site/articles/index.html index 8ce0a259..17ce5aa7 100644 --- a/_site/articles/index.html +++ b/_site/articles/index.html @@ -98,14 +98,12 @@ const todayEvent = getTodayEvent(); - if (todayEvent != "No event") { + if (todayEvent) { heroTopBarEl.classList.remove('hidden'); + heroTopBarEl.innerHTML = todayEvent.blurb; - if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); - } else { - headerImgEl.classList.add(getBanner(todayEvent)); - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); + if (todayEvent.class) { + headerImgEl.classList.add(todayEvent.class); } } @@ -114,196 +112,100 @@ const month = date.getMonth() + 1; const day = date.getDate(); - if (month == 3 && day == 1) - return "Zero Discrimination Day"; - else if (month == 3 && day == 8) - return "International Women's Day"; - else if (month == 3 && day == 31) - return "Trans Day of Visibility"; - else if (month == 4 && day == 6) - return "International Asexuality Day"; - else if (month == 4 && day == 26) - return "Lesbian Visibility Day"; - else if (month == 5 && day == 17) - return "IDAHOBIT"; - else if (month == 5 && day == 19) - return "Agender Pride Day"; - else if (month == 5 && day == 25) - return "Pansexual and Panromantic Awareness & Visibility Day"; - else if (month == 6) - return "Pride Month"; - else if (month == 7 && day == 14) - return "Non-Binary People's Day"; - else if (month == 7 && day == 28) - return "Leilukin's Birthday"; - else if (month == 9 && day == 11) - return "Leilukin's Hub Anniversary"; - else if (month == 9 && day == 23) - return "Bi Visibility Day"; - else if (month == 10 && day == 8) - return "International Lesbian Day"; - else if (month == 10 && day == 11) - return "National Coming Out Day"; - else if (month == 10 && day == 17) - return "Genderfluid Visibility Week"; - else if (month == 10 && day == 24) - return "Ace Week"; - else if (month == 10 && day == 26) - return "Intersex Awareness Day"; + const currentYear = date.getFullYear(); + const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear(); + const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate; + + if (month === 3 && day === 1) + return { + blurb: `Today is Zero Discrimination Day`, + class: "flag-progress-intersex", + }; + else if (month === 3 && day === 8) + return { + blurb: `Today is International Women's Day}`, + class: "symbol-venus", + }; + else if (month === 3 && day === 31) + return { + blurb: `Today is Trans Day of Visibility`, + class: "flag-trans", + }; + else if (month === 4 && day === 6) + return { + blurb: `Today is International Asexuality Day`, + class: "flag-ace", + }; + else if (month === 4 && day === 26) + return { + blurb: `Today is Lesbian Visibility Day`, + class: "flag-lesbian", + }; + else if (month === 5 && day === 17) + return { + blurb: `Today is International Day Against Homophobia, Biphobia and Transphobia`, + class: "flag-progress", + }; + else if (month === 5 && day === 19) + return { + blurb: `Today is Agender Pride Day`, + class: "flag-agender", + }; + else if (month === 5 && day === 25) + return { + blurb: `Today is Pansexual and Panromantic Awareness and Visibility Day`, + class: "flag-pan", + }; + else if (month === 6) + return { + blurb: `Happy Pride Month!`, + class: "flag-progress-intersex", + }; + else if (month === 7 && day === 14) + return { + blurb: `Today is Non-Binary People's Day`, + 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 Bi Visibility Day`, + class: "flag-bi", + }; + else if (month === 10 && day === 8) + return { + blurb: `Today is International Lesbian Day`, + class: "flag-lesbian", + }; + else if (month === 10 && day === 11) + return { + blurb: `Today is National Coming Out Day`, + class: "flag-rainbow", + }; + else if (month === 10 && day === 17) + return { + blurb: `Today is the start of Genderfluid Visibility Week`, + class: "flag-genderfluid", + }; + else if (month === 10 && day === 24) + return { + blurb: `Today is the start of Ace Week`, + class: "flag-ace", + }; + else if (month === 10 && day === 26) + return { + blurb: `Today is Intersex Awareness Day`, + class: "flag-intersex", + }; else - return "No event"; - } - - 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 Zero Discrimination Day - `; - break; - case "International Women's Day": - return ` - Today is International Women's Day - `; - break; - case "Trans Day of Visibility": - return ` - Today is Trans Day of Visibility - `; - break; - case "International Asexuality Day": - return ` - Today is International Asexuality Day - `; - break; - case "Lesbian Visibility Day": - return ` - Today is Lesbian Visibility Day - `; - break; - case "IDAHOBIT": - return ` - Today is International Day Against Homophobia, Biphobia and Transphobia - `; - break; - case "Agender Pride Day": - return ` - Today is Agender Pride Day - `; - break; - case "Pansexual and Panromantic Awareness & Visibility Day": - return ` - Today is Pansexual and Panromantic Visibility Day - `; - break; - case "Pride Month": - return ` - Happy Pride Month! - `; - break; - case "Non-Binary People's Day": - return ` - Today is Non-Binary People's Day - `; - 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 Bi Visibility Day - `; - break; - case "International Lesbian Day": - return ` - Today is International Lesbian Day - `; - break; - case "National Coming Out Day": - return ` - Today is National Coming Out Day - `; - break; - case "Genderfluid Visibility Week": - return ` - Today is the start of Genderfluid Visibility Week - `; - break; - case "Ace Week": - return ` - Today is the start of Ace Week - `; - break; - case "Intersex Awareness Day": - return ` - Today is Intersex Awareness Day - `; - break; - default: - return ``; - } + return null; } diff --git a/_site/articles/kotor2-modder-interview-ars-technica/index.html b/_site/articles/kotor2-modder-interview-ars-technica/index.html index beb7ab08..dbdde8c7 100644 --- a/_site/articles/kotor2-modder-interview-ars-technica/index.html +++ b/_site/articles/kotor2-modder-interview-ars-technica/index.html @@ -98,14 +98,12 @@ const todayEvent = getTodayEvent(); - if (todayEvent != "No event") { + if (todayEvent) { heroTopBarEl.classList.remove('hidden'); + heroTopBarEl.innerHTML = todayEvent.blurb; - if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); - } else { - headerImgEl.classList.add(getBanner(todayEvent)); - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); + if (todayEvent.class) { + headerImgEl.classList.add(todayEvent.class); } } @@ -114,196 +112,100 @@ const month = date.getMonth() + 1; const day = date.getDate(); - if (month == 3 && day == 1) - return "Zero Discrimination Day"; - else if (month == 3 && day == 8) - return "International Women's Day"; - else if (month == 3 && day == 31) - return "Trans Day of Visibility"; - else if (month == 4 && day == 6) - return "International Asexuality Day"; - else if (month == 4 && day == 26) - return "Lesbian Visibility Day"; - else if (month == 5 && day == 17) - return "IDAHOBIT"; - else if (month == 5 && day == 19) - return "Agender Pride Day"; - else if (month == 5 && day == 25) - return "Pansexual and Panromantic Awareness & Visibility Day"; - else if (month == 6) - return "Pride Month"; - else if (month == 7 && day == 14) - return "Non-Binary People's Day"; - else if (month == 7 && day == 28) - return "Leilukin's Birthday"; - else if (month == 9 && day == 11) - return "Leilukin's Hub Anniversary"; - else if (month == 9 && day == 23) - return "Bi Visibility Day"; - else if (month == 10 && day == 8) - return "International Lesbian Day"; - else if (month == 10 && day == 11) - return "National Coming Out Day"; - else if (month == 10 && day == 17) - return "Genderfluid Visibility Week"; - else if (month == 10 && day == 24) - return "Ace Week"; - else if (month == 10 && day == 26) - return "Intersex Awareness Day"; + const currentYear = date.getFullYear(); + const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear(); + const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate; + + if (month === 3 && day === 1) + return { + blurb: `Today is Zero Discrimination Day`, + class: "flag-progress-intersex", + }; + else if (month === 3 && day === 8) + return { + blurb: `Today is International Women's Day}`, + class: "symbol-venus", + }; + else if (month === 3 && day === 31) + return { + blurb: `Today is Trans Day of Visibility`, + class: "flag-trans", + }; + else if (month === 4 && day === 6) + return { + blurb: `Today is International Asexuality Day`, + class: "flag-ace", + }; + else if (month === 4 && day === 26) + return { + blurb: `Today is Lesbian Visibility Day`, + class: "flag-lesbian", + }; + else if (month === 5 && day === 17) + return { + blurb: `Today is International Day Against Homophobia, Biphobia and Transphobia`, + class: "flag-progress", + }; + else if (month === 5 && day === 19) + return { + blurb: `Today is Agender Pride Day`, + class: "flag-agender", + }; + else if (month === 5 && day === 25) + return { + blurb: `Today is Pansexual and Panromantic Awareness and Visibility Day`, + class: "flag-pan", + }; + else if (month === 6) + return { + blurb: `Happy Pride Month!`, + class: "flag-progress-intersex", + }; + else if (month === 7 && day === 14) + return { + blurb: `Today is Non-Binary People's Day`, + 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 Bi Visibility Day`, + class: "flag-bi", + }; + else if (month === 10 && day === 8) + return { + blurb: `Today is International Lesbian Day`, + class: "flag-lesbian", + }; + else if (month === 10 && day === 11) + return { + blurb: `Today is National Coming Out Day`, + class: "flag-rainbow", + }; + else if (month === 10 && day === 17) + return { + blurb: `Today is the start of Genderfluid Visibility Week`, + class: "flag-genderfluid", + }; + else if (month === 10 && day === 24) + return { + blurb: `Today is the start of Ace Week`, + class: "flag-ace", + }; + else if (month === 10 && day === 26) + return { + blurb: `Today is Intersex Awareness Day`, + class: "flag-intersex", + }; else - return "No event"; - } - - 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 Zero Discrimination Day - `; - break; - case "International Women's Day": - return ` - Today is International Women's Day - `; - break; - case "Trans Day of Visibility": - return ` - Today is Trans Day of Visibility - `; - break; - case "International Asexuality Day": - return ` - Today is International Asexuality Day - `; - break; - case "Lesbian Visibility Day": - return ` - Today is Lesbian Visibility Day - `; - break; - case "IDAHOBIT": - return ` - Today is International Day Against Homophobia, Biphobia and Transphobia - `; - break; - case "Agender Pride Day": - return ` - Today is Agender Pride Day - `; - break; - case "Pansexual and Panromantic Awareness & Visibility Day": - return ` - Today is Pansexual and Panromantic Visibility Day - `; - break; - case "Pride Month": - return ` - Happy Pride Month! - `; - break; - case "Non-Binary People's Day": - return ` - Today is Non-Binary People's Day - `; - 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 Bi Visibility Day - `; - break; - case "International Lesbian Day": - return ` - Today is International Lesbian Day - `; - break; - case "National Coming Out Day": - return ` - Today is National Coming Out Day - `; - break; - case "Genderfluid Visibility Week": - return ` - Today is the start of Genderfluid Visibility Week - `; - break; - case "Ace Week": - return ` - Today is the start of Ace Week - `; - break; - case "Intersex Awareness Day": - return ` - Today is Intersex Awareness Day - `; - break; - default: - return ``; - } + return null; } diff --git a/_site/articles/lgbtq-booklet-interview-misi-bawang/index.html b/_site/articles/lgbtq-booklet-interview-misi-bawang/index.html index 575cf4a9..3858dc38 100644 --- a/_site/articles/lgbtq-booklet-interview-misi-bawang/index.html +++ b/_site/articles/lgbtq-booklet-interview-misi-bawang/index.html @@ -98,14 +98,12 @@ const todayEvent = getTodayEvent(); - if (todayEvent != "No event") { + if (todayEvent) { heroTopBarEl.classList.remove('hidden'); + heroTopBarEl.innerHTML = todayEvent.blurb; - if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); - } else { - headerImgEl.classList.add(getBanner(todayEvent)); - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); + if (todayEvent.class) { + headerImgEl.classList.add(todayEvent.class); } } @@ -114,196 +112,100 @@ const month = date.getMonth() + 1; const day = date.getDate(); - if (month == 3 && day == 1) - return "Zero Discrimination Day"; - else if (month == 3 && day == 8) - return "International Women's Day"; - else if (month == 3 && day == 31) - return "Trans Day of Visibility"; - else if (month == 4 && day == 6) - return "International Asexuality Day"; - else if (month == 4 && day == 26) - return "Lesbian Visibility Day"; - else if (month == 5 && day == 17) - return "IDAHOBIT"; - else if (month == 5 && day == 19) - return "Agender Pride Day"; - else if (month == 5 && day == 25) - return "Pansexual and Panromantic Awareness & Visibility Day"; - else if (month == 6) - return "Pride Month"; - else if (month == 7 && day == 14) - return "Non-Binary People's Day"; - else if (month == 7 && day == 28) - return "Leilukin's Birthday"; - else if (month == 9 && day == 11) - return "Leilukin's Hub Anniversary"; - else if (month == 9 && day == 23) - return "Bi Visibility Day"; - else if (month == 10 && day == 8) - return "International Lesbian Day"; - else if (month == 10 && day == 11) - return "National Coming Out Day"; - else if (month == 10 && day == 17) - return "Genderfluid Visibility Week"; - else if (month == 10 && day == 24) - return "Ace Week"; - else if (month == 10 && day == 26) - return "Intersex Awareness Day"; + const currentYear = date.getFullYear(); + const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear(); + const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate; + + if (month === 3 && day === 1) + return { + blurb: `Today is Zero Discrimination Day`, + class: "flag-progress-intersex", + }; + else if (month === 3 && day === 8) + return { + blurb: `Today is International Women's Day}`, + class: "symbol-venus", + }; + else if (month === 3 && day === 31) + return { + blurb: `Today is Trans Day of Visibility`, + class: "flag-trans", + }; + else if (month === 4 && day === 6) + return { + blurb: `Today is International Asexuality Day`, + class: "flag-ace", + }; + else if (month === 4 && day === 26) + return { + blurb: `Today is Lesbian Visibility Day`, + class: "flag-lesbian", + }; + else if (month === 5 && day === 17) + return { + blurb: `Today is International Day Against Homophobia, Biphobia and Transphobia`, + class: "flag-progress", + }; + else if (month === 5 && day === 19) + return { + blurb: `Today is Agender Pride Day`, + class: "flag-agender", + }; + else if (month === 5 && day === 25) + return { + blurb: `Today is Pansexual and Panromantic Awareness and Visibility Day`, + class: "flag-pan", + }; + else if (month === 6) + return { + blurb: `Happy Pride Month!`, + class: "flag-progress-intersex", + }; + else if (month === 7 && day === 14) + return { + blurb: `Today is Non-Binary People's Day`, + 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 Bi Visibility Day`, + class: "flag-bi", + }; + else if (month === 10 && day === 8) + return { + blurb: `Today is International Lesbian Day`, + class: "flag-lesbian", + }; + else if (month === 10 && day === 11) + return { + blurb: `Today is National Coming Out Day`, + class: "flag-rainbow", + }; + else if (month === 10 && day === 17) + return { + blurb: `Today is the start of Genderfluid Visibility Week`, + class: "flag-genderfluid", + }; + else if (month === 10 && day === 24) + return { + blurb: `Today is the start of Ace Week`, + class: "flag-ace", + }; + else if (month === 10 && day === 26) + return { + blurb: `Today is Intersex Awareness Day`, + class: "flag-intersex", + }; else - return "No event"; - } - - 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 Zero Discrimination Day - `; - break; - case "International Women's Day": - return ` - Today is International Women's Day - `; - break; - case "Trans Day of Visibility": - return ` - Today is Trans Day of Visibility - `; - break; - case "International Asexuality Day": - return ` - Today is International Asexuality Day - `; - break; - case "Lesbian Visibility Day": - return ` - Today is Lesbian Visibility Day - `; - break; - case "IDAHOBIT": - return ` - Today is International Day Against Homophobia, Biphobia and Transphobia - `; - break; - case "Agender Pride Day": - return ` - Today is Agender Pride Day - `; - break; - case "Pansexual and Panromantic Awareness & Visibility Day": - return ` - Today is Pansexual and Panromantic Visibility Day - `; - break; - case "Pride Month": - return ` - Happy Pride Month! - `; - break; - case "Non-Binary People's Day": - return ` - Today is Non-Binary People's Day - `; - 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 Bi Visibility Day - `; - break; - case "International Lesbian Day": - return ` - Today is International Lesbian Day - `; - break; - case "National Coming Out Day": - return ` - Today is National Coming Out Day - `; - break; - case "Genderfluid Visibility Week": - return ` - Today is the start of Genderfluid Visibility Week - `; - break; - case "Ace Week": - return ` - Today is the start of Ace Week - `; - break; - case "Intersex Awareness Day": - return ` - Today is Intersex Awareness Day - `; - break; - default: - return ``; - } + return null; } diff --git a/_site/articles/my-dislike-of-shipping-culture/index.html b/_site/articles/my-dislike-of-shipping-culture/index.html index 93e94188..5d4e587e 100644 --- a/_site/articles/my-dislike-of-shipping-culture/index.html +++ b/_site/articles/my-dislike-of-shipping-culture/index.html @@ -98,14 +98,12 @@ const todayEvent = getTodayEvent(); - if (todayEvent != "No event") { + if (todayEvent) { heroTopBarEl.classList.remove('hidden'); + heroTopBarEl.innerHTML = todayEvent.blurb; - if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); - } else { - headerImgEl.classList.add(getBanner(todayEvent)); - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); + if (todayEvent.class) { + headerImgEl.classList.add(todayEvent.class); } } @@ -114,196 +112,100 @@ const month = date.getMonth() + 1; const day = date.getDate(); - if (month == 3 && day == 1) - return "Zero Discrimination Day"; - else if (month == 3 && day == 8) - return "International Women's Day"; - else if (month == 3 && day == 31) - return "Trans Day of Visibility"; - else if (month == 4 && day == 6) - return "International Asexuality Day"; - else if (month == 4 && day == 26) - return "Lesbian Visibility Day"; - else if (month == 5 && day == 17) - return "IDAHOBIT"; - else if (month == 5 && day == 19) - return "Agender Pride Day"; - else if (month == 5 && day == 25) - return "Pansexual and Panromantic Awareness & Visibility Day"; - else if (month == 6) - return "Pride Month"; - else if (month == 7 && day == 14) - return "Non-Binary People's Day"; - else if (month == 7 && day == 28) - return "Leilukin's Birthday"; - else if (month == 9 && day == 11) - return "Leilukin's Hub Anniversary"; - else if (month == 9 && day == 23) - return "Bi Visibility Day"; - else if (month == 10 && day == 8) - return "International Lesbian Day"; - else if (month == 10 && day == 11) - return "National Coming Out Day"; - else if (month == 10 && day == 17) - return "Genderfluid Visibility Week"; - else if (month == 10 && day == 24) - return "Ace Week"; - else if (month == 10 && day == 26) - return "Intersex Awareness Day"; + const currentYear = date.getFullYear(); + const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear(); + const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate; + + if (month === 3 && day === 1) + return { + blurb: `Today is Zero Discrimination Day`, + class: "flag-progress-intersex", + }; + else if (month === 3 && day === 8) + return { + blurb: `Today is International Women's Day}`, + class: "symbol-venus", + }; + else if (month === 3 && day === 31) + return { + blurb: `Today is Trans Day of Visibility`, + class: "flag-trans", + }; + else if (month === 4 && day === 6) + return { + blurb: `Today is International Asexuality Day`, + class: "flag-ace", + }; + else if (month === 4 && day === 26) + return { + blurb: `Today is Lesbian Visibility Day`, + class: "flag-lesbian", + }; + else if (month === 5 && day === 17) + return { + blurb: `Today is International Day Against Homophobia, Biphobia and Transphobia`, + class: "flag-progress", + }; + else if (month === 5 && day === 19) + return { + blurb: `Today is Agender Pride Day`, + class: "flag-agender", + }; + else if (month === 5 && day === 25) + return { + blurb: `Today is Pansexual and Panromantic Awareness and Visibility Day`, + class: "flag-pan", + }; + else if (month === 6) + return { + blurb: `Happy Pride Month!`, + class: "flag-progress-intersex", + }; + else if (month === 7 && day === 14) + return { + blurb: `Today is Non-Binary People's Day`, + 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 Bi Visibility Day`, + class: "flag-bi", + }; + else if (month === 10 && day === 8) + return { + blurb: `Today is International Lesbian Day`, + class: "flag-lesbian", + }; + else if (month === 10 && day === 11) + return { + blurb: `Today is National Coming Out Day`, + class: "flag-rainbow", + }; + else if (month === 10 && day === 17) + return { + blurb: `Today is the start of Genderfluid Visibility Week`, + class: "flag-genderfluid", + }; + else if (month === 10 && day === 24) + return { + blurb: `Today is the start of Ace Week`, + class: "flag-ace", + }; + else if (month === 10 && day === 26) + return { + blurb: `Today is Intersex Awareness Day`, + class: "flag-intersex", + }; else - return "No event"; - } - - 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 Zero Discrimination Day - `; - break; - case "International Women's Day": - return ` - Today is International Women's Day - `; - break; - case "Trans Day of Visibility": - return ` - Today is Trans Day of Visibility - `; - break; - case "International Asexuality Day": - return ` - Today is International Asexuality Day - `; - break; - case "Lesbian Visibility Day": - return ` - Today is Lesbian Visibility Day - `; - break; - case "IDAHOBIT": - return ` - Today is International Day Against Homophobia, Biphobia and Transphobia - `; - break; - case "Agender Pride Day": - return ` - Today is Agender Pride Day - `; - break; - case "Pansexual and Panromantic Awareness & Visibility Day": - return ` - Today is Pansexual and Panromantic Visibility Day - `; - break; - case "Pride Month": - return ` - Happy Pride Month! - `; - break; - case "Non-Binary People's Day": - return ` - Today is Non-Binary People's Day - `; - 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 Bi Visibility Day - `; - break; - case "International Lesbian Day": - return ` - Today is International Lesbian Day - `; - break; - case "National Coming Out Day": - return ` - Today is National Coming Out Day - `; - break; - case "Genderfluid Visibility Week": - return ` - Today is the start of Genderfluid Visibility Week - `; - break; - case "Ace Week": - return ` - Today is the start of Ace Week - `; - break; - case "Intersex Awareness Day": - return ` - Today is Intersex Awareness Day - `; - break; - default: - return ``; - } + return null; } diff --git a/_site/blog/index.html b/_site/blog/index.html index d303d1d7..666a0d74 100644 --- a/_site/blog/index.html +++ b/_site/blog/index.html @@ -98,14 +98,12 @@ const todayEvent = getTodayEvent(); - if (todayEvent != "No event") { + if (todayEvent) { heroTopBarEl.classList.remove('hidden'); + heroTopBarEl.innerHTML = todayEvent.blurb; - if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); - } else { - headerImgEl.classList.add(getBanner(todayEvent)); - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); + if (todayEvent.class) { + headerImgEl.classList.add(todayEvent.class); } } @@ -114,196 +112,100 @@ const month = date.getMonth() + 1; const day = date.getDate(); - if (month == 3 && day == 1) - return "Zero Discrimination Day"; - else if (month == 3 && day == 8) - return "International Women's Day"; - else if (month == 3 && day == 31) - return "Trans Day of Visibility"; - else if (month == 4 && day == 6) - return "International Asexuality Day"; - else if (month == 4 && day == 26) - return "Lesbian Visibility Day"; - else if (month == 5 && day == 17) - return "IDAHOBIT"; - else if (month == 5 && day == 19) - return "Agender Pride Day"; - else if (month == 5 && day == 25) - return "Pansexual and Panromantic Awareness & Visibility Day"; - else if (month == 6) - return "Pride Month"; - else if (month == 7 && day == 14) - return "Non-Binary People's Day"; - else if (month == 7 && day == 28) - return "Leilukin's Birthday"; - else if (month == 9 && day == 11) - return "Leilukin's Hub Anniversary"; - else if (month == 9 && day == 23) - return "Bi Visibility Day"; - else if (month == 10 && day == 8) - return "International Lesbian Day"; - else if (month == 10 && day == 11) - return "National Coming Out Day"; - else if (month == 10 && day == 17) - return "Genderfluid Visibility Week"; - else if (month == 10 && day == 24) - return "Ace Week"; - else if (month == 10 && day == 26) - return "Intersex Awareness Day"; + const currentYear = date.getFullYear(); + const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear(); + const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate; + + if (month === 3 && day === 1) + return { + blurb: `Today is Zero Discrimination Day`, + class: "flag-progress-intersex", + }; + else if (month === 3 && day === 8) + return { + blurb: `Today is International Women's Day}`, + class: "symbol-venus", + }; + else if (month === 3 && day === 31) + return { + blurb: `Today is Trans Day of Visibility`, + class: "flag-trans", + }; + else if (month === 4 && day === 6) + return { + blurb: `Today is International Asexuality Day`, + class: "flag-ace", + }; + else if (month === 4 && day === 26) + return { + blurb: `Today is Lesbian Visibility Day`, + class: "flag-lesbian", + }; + else if (month === 5 && day === 17) + return { + blurb: `Today is International Day Against Homophobia, Biphobia and Transphobia`, + class: "flag-progress", + }; + else if (month === 5 && day === 19) + return { + blurb: `Today is Agender Pride Day`, + class: "flag-agender", + }; + else if (month === 5 && day === 25) + return { + blurb: `Today is Pansexual and Panromantic Awareness and Visibility Day`, + class: "flag-pan", + }; + else if (month === 6) + return { + blurb: `Happy Pride Month!`, + class: "flag-progress-intersex", + }; + else if (month === 7 && day === 14) + return { + blurb: `Today is Non-Binary People's Day`, + 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 Bi Visibility Day`, + class: "flag-bi", + }; + else if (month === 10 && day === 8) + return { + blurb: `Today is International Lesbian Day`, + class: "flag-lesbian", + }; + else if (month === 10 && day === 11) + return { + blurb: `Today is National Coming Out Day`, + class: "flag-rainbow", + }; + else if (month === 10 && day === 17) + return { + blurb: `Today is the start of Genderfluid Visibility Week`, + class: "flag-genderfluid", + }; + else if (month === 10 && day === 24) + return { + blurb: `Today is the start of Ace Week`, + class: "flag-ace", + }; + else if (month === 10 && day === 26) + return { + blurb: `Today is Intersex Awareness Day`, + class: "flag-intersex", + }; else - return "No event"; - } - - 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 Zero Discrimination Day - `; - break; - case "International Women's Day": - return ` - Today is International Women's Day - `; - break; - case "Trans Day of Visibility": - return ` - Today is Trans Day of Visibility - `; - break; - case "International Asexuality Day": - return ` - Today is International Asexuality Day - `; - break; - case "Lesbian Visibility Day": - return ` - Today is Lesbian Visibility Day - `; - break; - case "IDAHOBIT": - return ` - Today is International Day Against Homophobia, Biphobia and Transphobia - `; - break; - case "Agender Pride Day": - return ` - Today is Agender Pride Day - `; - break; - case "Pansexual and Panromantic Awareness & Visibility Day": - return ` - Today is Pansexual and Panromantic Visibility Day - `; - break; - case "Pride Month": - return ` - Happy Pride Month! - `; - break; - case "Non-Binary People's Day": - return ` - Today is Non-Binary People's Day - `; - 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 Bi Visibility Day - `; - break; - case "International Lesbian Day": - return ` - Today is International Lesbian Day - `; - break; - case "National Coming Out Day": - return ` - Today is National Coming Out Day - `; - break; - case "Genderfluid Visibility Week": - return ` - Today is the start of Genderfluid Visibility Week - `; - break; - case "Ace Week": - return ` - Today is the start of Ace Week - `; - break; - case "Intersex Awareness Day": - return ` - Today is Intersex Awareness Day - `; - break; - default: - return ``; - } + return null; } diff --git a/_site/blog/page/2/index.html b/_site/blog/page/2/index.html index 0e0eb539..c5388e33 100644 --- a/_site/blog/page/2/index.html +++ b/_site/blog/page/2/index.html @@ -98,14 +98,12 @@ const todayEvent = getTodayEvent(); - if (todayEvent != "No event") { + if (todayEvent) { heroTopBarEl.classList.remove('hidden'); + heroTopBarEl.innerHTML = todayEvent.blurb; - if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); - } else { - headerImgEl.classList.add(getBanner(todayEvent)); - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); + if (todayEvent.class) { + headerImgEl.classList.add(todayEvent.class); } } @@ -114,196 +112,100 @@ const month = date.getMonth() + 1; const day = date.getDate(); - if (month == 3 && day == 1) - return "Zero Discrimination Day"; - else if (month == 3 && day == 8) - return "International Women's Day"; - else if (month == 3 && day == 31) - return "Trans Day of Visibility"; - else if (month == 4 && day == 6) - return "International Asexuality Day"; - else if (month == 4 && day == 26) - return "Lesbian Visibility Day"; - else if (month == 5 && day == 17) - return "IDAHOBIT"; - else if (month == 5 && day == 19) - return "Agender Pride Day"; - else if (month == 5 && day == 25) - return "Pansexual and Panromantic Awareness & Visibility Day"; - else if (month == 6) - return "Pride Month"; - else if (month == 7 && day == 14) - return "Non-Binary People's Day"; - else if (month == 7 && day == 28) - return "Leilukin's Birthday"; - else if (month == 9 && day == 11) - return "Leilukin's Hub Anniversary"; - else if (month == 9 && day == 23) - return "Bi Visibility Day"; - else if (month == 10 && day == 8) - return "International Lesbian Day"; - else if (month == 10 && day == 11) - return "National Coming Out Day"; - else if (month == 10 && day == 17) - return "Genderfluid Visibility Week"; - else if (month == 10 && day == 24) - return "Ace Week"; - else if (month == 10 && day == 26) - return "Intersex Awareness Day"; + const currentYear = date.getFullYear(); + const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear(); + const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate; + + if (month === 3 && day === 1) + return { + blurb: `Today is Zero Discrimination Day`, + class: "flag-progress-intersex", + }; + else if (month === 3 && day === 8) + return { + blurb: `Today is International Women's Day}`, + class: "symbol-venus", + }; + else if (month === 3 && day === 31) + return { + blurb: `Today is Trans Day of Visibility`, + class: "flag-trans", + }; + else if (month === 4 && day === 6) + return { + blurb: `Today is International Asexuality Day`, + class: "flag-ace", + }; + else if (month === 4 && day === 26) + return { + blurb: `Today is Lesbian Visibility Day`, + class: "flag-lesbian", + }; + else if (month === 5 && day === 17) + return { + blurb: `Today is International Day Against Homophobia, Biphobia and Transphobia`, + class: "flag-progress", + }; + else if (month === 5 && day === 19) + return { + blurb: `Today is Agender Pride Day`, + class: "flag-agender", + }; + else if (month === 5 && day === 25) + return { + blurb: `Today is Pansexual and Panromantic Awareness and Visibility Day`, + class: "flag-pan", + }; + else if (month === 6) + return { + blurb: `Happy Pride Month!`, + class: "flag-progress-intersex", + }; + else if (month === 7 && day === 14) + return { + blurb: `Today is Non-Binary People's Day`, + 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 Bi Visibility Day`, + class: "flag-bi", + }; + else if (month === 10 && day === 8) + return { + blurb: `Today is International Lesbian Day`, + class: "flag-lesbian", + }; + else if (month === 10 && day === 11) + return { + blurb: `Today is National Coming Out Day`, + class: "flag-rainbow", + }; + else if (month === 10 && day === 17) + return { + blurb: `Today is the start of Genderfluid Visibility Week`, + class: "flag-genderfluid", + }; + else if (month === 10 && day === 24) + return { + blurb: `Today is the start of Ace Week`, + class: "flag-ace", + }; + else if (month === 10 && day === 26) + return { + blurb: `Today is Intersex Awareness Day`, + class: "flag-intersex", + }; else - return "No event"; - } - - 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 Zero Discrimination Day - `; - break; - case "International Women's Day": - return ` - Today is International Women's Day - `; - break; - case "Trans Day of Visibility": - return ` - Today is Trans Day of Visibility - `; - break; - case "International Asexuality Day": - return ` - Today is International Asexuality Day - `; - break; - case "Lesbian Visibility Day": - return ` - Today is Lesbian Visibility Day - `; - break; - case "IDAHOBIT": - return ` - Today is International Day Against Homophobia, Biphobia and Transphobia - `; - break; - case "Agender Pride Day": - return ` - Today is Agender Pride Day - `; - break; - case "Pansexual and Panromantic Awareness & Visibility Day": - return ` - Today is Pansexual and Panromantic Visibility Day - `; - break; - case "Pride Month": - return ` - Happy Pride Month! - `; - break; - case "Non-Binary People's Day": - return ` - Today is Non-Binary People's Day - `; - 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 Bi Visibility Day - `; - break; - case "International Lesbian Day": - return ` - Today is International Lesbian Day - `; - break; - case "National Coming Out Day": - return ` - Today is National Coming Out Day - `; - break; - case "Genderfluid Visibility Week": - return ` - Today is the start of Genderfluid Visibility Week - `; - break; - case "Ace Week": - return ` - Today is the start of Ace Week - `; - break; - case "Intersex Awareness Day": - return ` - Today is Intersex Awareness Day - `; - break; - default: - return ``; - } + return null; } diff --git a/_site/blog/page/3/index.html b/_site/blog/page/3/index.html index f874caa9..a03ad4f8 100644 --- a/_site/blog/page/3/index.html +++ b/_site/blog/page/3/index.html @@ -98,14 +98,12 @@ const todayEvent = getTodayEvent(); - if (todayEvent != "No event") { + if (todayEvent) { heroTopBarEl.classList.remove('hidden'); + heroTopBarEl.innerHTML = todayEvent.blurb; - if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); - } else { - headerImgEl.classList.add(getBanner(todayEvent)); - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); + if (todayEvent.class) { + headerImgEl.classList.add(todayEvent.class); } } @@ -114,196 +112,100 @@ const month = date.getMonth() + 1; const day = date.getDate(); - if (month == 3 && day == 1) - return "Zero Discrimination Day"; - else if (month == 3 && day == 8) - return "International Women's Day"; - else if (month == 3 && day == 31) - return "Trans Day of Visibility"; - else if (month == 4 && day == 6) - return "International Asexuality Day"; - else if (month == 4 && day == 26) - return "Lesbian Visibility Day"; - else if (month == 5 && day == 17) - return "IDAHOBIT"; - else if (month == 5 && day == 19) - return "Agender Pride Day"; - else if (month == 5 && day == 25) - return "Pansexual and Panromantic Awareness & Visibility Day"; - else if (month == 6) - return "Pride Month"; - else if (month == 7 && day == 14) - return "Non-Binary People's Day"; - else if (month == 7 && day == 28) - return "Leilukin's Birthday"; - else if (month == 9 && day == 11) - return "Leilukin's Hub Anniversary"; - else if (month == 9 && day == 23) - return "Bi Visibility Day"; - else if (month == 10 && day == 8) - return "International Lesbian Day"; - else if (month == 10 && day == 11) - return "National Coming Out Day"; - else if (month == 10 && day == 17) - return "Genderfluid Visibility Week"; - else if (month == 10 && day == 24) - return "Ace Week"; - else if (month == 10 && day == 26) - return "Intersex Awareness Day"; + const currentYear = date.getFullYear(); + const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear(); + const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate; + + if (month === 3 && day === 1) + return { + blurb: `Today is Zero Discrimination Day`, + class: "flag-progress-intersex", + }; + else if (month === 3 && day === 8) + return { + blurb: `Today is International Women's Day}`, + class: "symbol-venus", + }; + else if (month === 3 && day === 31) + return { + blurb: `Today is Trans Day of Visibility`, + class: "flag-trans", + }; + else if (month === 4 && day === 6) + return { + blurb: `Today is International Asexuality Day`, + class: "flag-ace", + }; + else if (month === 4 && day === 26) + return { + blurb: `Today is Lesbian Visibility Day`, + class: "flag-lesbian", + }; + else if (month === 5 && day === 17) + return { + blurb: `Today is International Day Against Homophobia, Biphobia and Transphobia`, + class: "flag-progress", + }; + else if (month === 5 && day === 19) + return { + blurb: `Today is Agender Pride Day`, + class: "flag-agender", + }; + else if (month === 5 && day === 25) + return { + blurb: `Today is Pansexual and Panromantic Awareness and Visibility Day`, + class: "flag-pan", + }; + else if (month === 6) + return { + blurb: `Happy Pride Month!`, + class: "flag-progress-intersex", + }; + else if (month === 7 && day === 14) + return { + blurb: `Today is Non-Binary People's Day`, + 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 Bi Visibility Day`, + class: "flag-bi", + }; + else if (month === 10 && day === 8) + return { + blurb: `Today is International Lesbian Day`, + class: "flag-lesbian", + }; + else if (month === 10 && day === 11) + return { + blurb: `Today is National Coming Out Day`, + class: "flag-rainbow", + }; + else if (month === 10 && day === 17) + return { + blurb: `Today is the start of Genderfluid Visibility Week`, + class: "flag-genderfluid", + }; + else if (month === 10 && day === 24) + return { + blurb: `Today is the start of Ace Week`, + class: "flag-ace", + }; + else if (month === 10 && day === 26) + return { + blurb: `Today is Intersex Awareness Day`, + class: "flag-intersex", + }; else - return "No event"; - } - - 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 Zero Discrimination Day - `; - break; - case "International Women's Day": - return ` - Today is International Women's Day - `; - break; - case "Trans Day of Visibility": - return ` - Today is Trans Day of Visibility - `; - break; - case "International Asexuality Day": - return ` - Today is International Asexuality Day - `; - break; - case "Lesbian Visibility Day": - return ` - Today is Lesbian Visibility Day - `; - break; - case "IDAHOBIT": - return ` - Today is International Day Against Homophobia, Biphobia and Transphobia - `; - break; - case "Agender Pride Day": - return ` - Today is Agender Pride Day - `; - break; - case "Pansexual and Panromantic Awareness & Visibility Day": - return ` - Today is Pansexual and Panromantic Visibility Day - `; - break; - case "Pride Month": - return ` - Happy Pride Month! - `; - break; - case "Non-Binary People's Day": - return ` - Today is Non-Binary People's Day - `; - 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 Bi Visibility Day - `; - break; - case "International Lesbian Day": - return ` - Today is International Lesbian Day - `; - break; - case "National Coming Out Day": - return ` - Today is National Coming Out Day - `; - break; - case "Genderfluid Visibility Week": - return ` - Today is the start of Genderfluid Visibility Week - `; - break; - case "Ace Week": - return ` - Today is the start of Ace Week - `; - break; - case "Intersex Awareness Day": - return ` - Today is Intersex Awareness Day - `; - break; - default: - return ``; - } + return null; } diff --git a/_site/blog/posts/2023-01-26-new-year-leilukins-hub-redesign/index.html b/_site/blog/posts/2023-01-26-new-year-leilukins-hub-redesign/index.html index 3b19a629..e8edb4e7 100644 --- a/_site/blog/posts/2023-01-26-new-year-leilukins-hub-redesign/index.html +++ b/_site/blog/posts/2023-01-26-new-year-leilukins-hub-redesign/index.html @@ -98,14 +98,12 @@ const todayEvent = getTodayEvent(); - if (todayEvent != "No event") { + if (todayEvent) { heroTopBarEl.classList.remove('hidden'); + heroTopBarEl.innerHTML = todayEvent.blurb; - if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); - } else { - headerImgEl.classList.add(getBanner(todayEvent)); - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); + if (todayEvent.class) { + headerImgEl.classList.add(todayEvent.class); } } @@ -114,196 +112,100 @@ const month = date.getMonth() + 1; const day = date.getDate(); - if (month == 3 && day == 1) - return "Zero Discrimination Day"; - else if (month == 3 && day == 8) - return "International Women's Day"; - else if (month == 3 && day == 31) - return "Trans Day of Visibility"; - else if (month == 4 && day == 6) - return "International Asexuality Day"; - else if (month == 4 && day == 26) - return "Lesbian Visibility Day"; - else if (month == 5 && day == 17) - return "IDAHOBIT"; - else if (month == 5 && day == 19) - return "Agender Pride Day"; - else if (month == 5 && day == 25) - return "Pansexual and Panromantic Awareness & Visibility Day"; - else if (month == 6) - return "Pride Month"; - else if (month == 7 && day == 14) - return "Non-Binary People's Day"; - else if (month == 7 && day == 28) - return "Leilukin's Birthday"; - else if (month == 9 && day == 11) - return "Leilukin's Hub Anniversary"; - else if (month == 9 && day == 23) - return "Bi Visibility Day"; - else if (month == 10 && day == 8) - return "International Lesbian Day"; - else if (month == 10 && day == 11) - return "National Coming Out Day"; - else if (month == 10 && day == 17) - return "Genderfluid Visibility Week"; - else if (month == 10 && day == 24) - return "Ace Week"; - else if (month == 10 && day == 26) - return "Intersex Awareness Day"; + const currentYear = date.getFullYear(); + const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear(); + const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate; + + if (month === 3 && day === 1) + return { + blurb: `Today is Zero Discrimination Day`, + class: "flag-progress-intersex", + }; + else if (month === 3 && day === 8) + return { + blurb: `Today is International Women's Day}`, + class: "symbol-venus", + }; + else if (month === 3 && day === 31) + return { + blurb: `Today is Trans Day of Visibility`, + class: "flag-trans", + }; + else if (month === 4 && day === 6) + return { + blurb: `Today is International Asexuality Day`, + class: "flag-ace", + }; + else if (month === 4 && day === 26) + return { + blurb: `Today is Lesbian Visibility Day`, + class: "flag-lesbian", + }; + else if (month === 5 && day === 17) + return { + blurb: `Today is International Day Against Homophobia, Biphobia and Transphobia`, + class: "flag-progress", + }; + else if (month === 5 && day === 19) + return { + blurb: `Today is Agender Pride Day`, + class: "flag-agender", + }; + else if (month === 5 && day === 25) + return { + blurb: `Today is Pansexual and Panromantic Awareness and Visibility Day`, + class: "flag-pan", + }; + else if (month === 6) + return { + blurb: `Happy Pride Month!`, + class: "flag-progress-intersex", + }; + else if (month === 7 && day === 14) + return { + blurb: `Today is Non-Binary People's Day`, + 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 Bi Visibility Day`, + class: "flag-bi", + }; + else if (month === 10 && day === 8) + return { + blurb: `Today is International Lesbian Day`, + class: "flag-lesbian", + }; + else if (month === 10 && day === 11) + return { + blurb: `Today is National Coming Out Day`, + class: "flag-rainbow", + }; + else if (month === 10 && day === 17) + return { + blurb: `Today is the start of Genderfluid Visibility Week`, + class: "flag-genderfluid", + }; + else if (month === 10 && day === 24) + return { + blurb: `Today is the start of Ace Week`, + class: "flag-ace", + }; + else if (month === 10 && day === 26) + return { + blurb: `Today is Intersex Awareness Day`, + class: "flag-intersex", + }; else - return "No event"; - } - - 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 Zero Discrimination Day - `; - break; - case "International Women's Day": - return ` - Today is International Women's Day - `; - break; - case "Trans Day of Visibility": - return ` - Today is Trans Day of Visibility - `; - break; - case "International Asexuality Day": - return ` - Today is International Asexuality Day - `; - break; - case "Lesbian Visibility Day": - return ` - Today is Lesbian Visibility Day - `; - break; - case "IDAHOBIT": - return ` - Today is International Day Against Homophobia, Biphobia and Transphobia - `; - break; - case "Agender Pride Day": - return ` - Today is Agender Pride Day - `; - break; - case "Pansexual and Panromantic Awareness & Visibility Day": - return ` - Today is Pansexual and Panromantic Visibility Day - `; - break; - case "Pride Month": - return ` - Happy Pride Month! - `; - break; - case "Non-Binary People's Day": - return ` - Today is Non-Binary People's Day - `; - 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 Bi Visibility Day - `; - break; - case "International Lesbian Day": - return ` - Today is International Lesbian Day - `; - break; - case "National Coming Out Day": - return ` - Today is National Coming Out Day - `; - break; - case "Genderfluid Visibility Week": - return ` - Today is the start of Genderfluid Visibility Week - `; - break; - case "Ace Week": - return ` - Today is the start of Ace Week - `; - break; - case "Intersex Awareness Day": - return ` - Today is Intersex Awareness Day - `; - break; - default: - return ``; - } + return null; } diff --git a/_site/blog/posts/2023-01-28-leilukins-hub-now-has-a-blog/index.html b/_site/blog/posts/2023-01-28-leilukins-hub-now-has-a-blog/index.html index 08aad3a6..1f4a439d 100644 --- a/_site/blog/posts/2023-01-28-leilukins-hub-now-has-a-blog/index.html +++ b/_site/blog/posts/2023-01-28-leilukins-hub-now-has-a-blog/index.html @@ -98,14 +98,12 @@ const todayEvent = getTodayEvent(); - if (todayEvent != "No event") { + if (todayEvent) { heroTopBarEl.classList.remove('hidden'); + heroTopBarEl.innerHTML = todayEvent.blurb; - if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); - } else { - headerImgEl.classList.add(getBanner(todayEvent)); - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); + if (todayEvent.class) { + headerImgEl.classList.add(todayEvent.class); } } @@ -114,196 +112,100 @@ const month = date.getMonth() + 1; const day = date.getDate(); - if (month == 3 && day == 1) - return "Zero Discrimination Day"; - else if (month == 3 && day == 8) - return "International Women's Day"; - else if (month == 3 && day == 31) - return "Trans Day of Visibility"; - else if (month == 4 && day == 6) - return "International Asexuality Day"; - else if (month == 4 && day == 26) - return "Lesbian Visibility Day"; - else if (month == 5 && day == 17) - return "IDAHOBIT"; - else if (month == 5 && day == 19) - return "Agender Pride Day"; - else if (month == 5 && day == 25) - return "Pansexual and Panromantic Awareness & Visibility Day"; - else if (month == 6) - return "Pride Month"; - else if (month == 7 && day == 14) - return "Non-Binary People's Day"; - else if (month == 7 && day == 28) - return "Leilukin's Birthday"; - else if (month == 9 && day == 11) - return "Leilukin's Hub Anniversary"; - else if (month == 9 && day == 23) - return "Bi Visibility Day"; - else if (month == 10 && day == 8) - return "International Lesbian Day"; - else if (month == 10 && day == 11) - return "National Coming Out Day"; - else if (month == 10 && day == 17) - return "Genderfluid Visibility Week"; - else if (month == 10 && day == 24) - return "Ace Week"; - else if (month == 10 && day == 26) - return "Intersex Awareness Day"; + const currentYear = date.getFullYear(); + const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear(); + const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate; + + if (month === 3 && day === 1) + return { + blurb: `Today is Zero Discrimination Day`, + class: "flag-progress-intersex", + }; + else if (month === 3 && day === 8) + return { + blurb: `Today is International Women's Day}`, + class: "symbol-venus", + }; + else if (month === 3 && day === 31) + return { + blurb: `Today is Trans Day of Visibility`, + class: "flag-trans", + }; + else if (month === 4 && day === 6) + return { + blurb: `Today is International Asexuality Day`, + class: "flag-ace", + }; + else if (month === 4 && day === 26) + return { + blurb: `Today is Lesbian Visibility Day`, + class: "flag-lesbian", + }; + else if (month === 5 && day === 17) + return { + blurb: `Today is International Day Against Homophobia, Biphobia and Transphobia`, + class: "flag-progress", + }; + else if (month === 5 && day === 19) + return { + blurb: `Today is Agender Pride Day`, + class: "flag-agender", + }; + else if (month === 5 && day === 25) + return { + blurb: `Today is Pansexual and Panromantic Awareness and Visibility Day`, + class: "flag-pan", + }; + else if (month === 6) + return { + blurb: `Happy Pride Month!`, + class: "flag-progress-intersex", + }; + else if (month === 7 && day === 14) + return { + blurb: `Today is Non-Binary People's Day`, + 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 Bi Visibility Day`, + class: "flag-bi", + }; + else if (month === 10 && day === 8) + return { + blurb: `Today is International Lesbian Day`, + class: "flag-lesbian", + }; + else if (month === 10 && day === 11) + return { + blurb: `Today is National Coming Out Day`, + class: "flag-rainbow", + }; + else if (month === 10 && day === 17) + return { + blurb: `Today is the start of Genderfluid Visibility Week`, + class: "flag-genderfluid", + }; + else if (month === 10 && day === 24) + return { + blurb: `Today is the start of Ace Week`, + class: "flag-ace", + }; + else if (month === 10 && day === 26) + return { + blurb: `Today is Intersex Awareness Day`, + class: "flag-intersex", + }; else - return "No event"; - } - - 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 Zero Discrimination Day - `; - break; - case "International Women's Day": - return ` - Today is International Women's Day - `; - break; - case "Trans Day of Visibility": - return ` - Today is Trans Day of Visibility - `; - break; - case "International Asexuality Day": - return ` - Today is International Asexuality Day - `; - break; - case "Lesbian Visibility Day": - return ` - Today is Lesbian Visibility Day - `; - break; - case "IDAHOBIT": - return ` - Today is International Day Against Homophobia, Biphobia and Transphobia - `; - break; - case "Agender Pride Day": - return ` - Today is Agender Pride Day - `; - break; - case "Pansexual and Panromantic Awareness & Visibility Day": - return ` - Today is Pansexual and Panromantic Visibility Day - `; - break; - case "Pride Month": - return ` - Happy Pride Month! - `; - break; - case "Non-Binary People's Day": - return ` - Today is Non-Binary People's Day - `; - 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 Bi Visibility Day - `; - break; - case "International Lesbian Day": - return ` - Today is International Lesbian Day - `; - break; - case "National Coming Out Day": - return ` - Today is National Coming Out Day - `; - break; - case "Genderfluid Visibility Week": - return ` - Today is the start of Genderfluid Visibility Week - `; - break; - case "Ace Week": - return ` - Today is the start of Ace Week - `; - break; - case "Intersex Awareness Day": - return ` - Today is Intersex Awareness Day - `; - break; - default: - return ``; - } + return null; } diff --git a/_site/blog/posts/2023-05-09-onboard-the-dracula-daily-hype-train/index.html b/_site/blog/posts/2023-05-09-onboard-the-dracula-daily-hype-train/index.html index c38f1957..5c2b8675 100644 --- a/_site/blog/posts/2023-05-09-onboard-the-dracula-daily-hype-train/index.html +++ b/_site/blog/posts/2023-05-09-onboard-the-dracula-daily-hype-train/index.html @@ -98,14 +98,12 @@ const todayEvent = getTodayEvent(); - if (todayEvent != "No event") { + if (todayEvent) { heroTopBarEl.classList.remove('hidden'); + heroTopBarEl.innerHTML = todayEvent.blurb; - if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); - } else { - headerImgEl.classList.add(getBanner(todayEvent)); - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); + if (todayEvent.class) { + headerImgEl.classList.add(todayEvent.class); } } @@ -114,196 +112,100 @@ const month = date.getMonth() + 1; const day = date.getDate(); - if (month == 3 && day == 1) - return "Zero Discrimination Day"; - else if (month == 3 && day == 8) - return "International Women's Day"; - else if (month == 3 && day == 31) - return "Trans Day of Visibility"; - else if (month == 4 && day == 6) - return "International Asexuality Day"; - else if (month == 4 && day == 26) - return "Lesbian Visibility Day"; - else if (month == 5 && day == 17) - return "IDAHOBIT"; - else if (month == 5 && day == 19) - return "Agender Pride Day"; - else if (month == 5 && day == 25) - return "Pansexual and Panromantic Awareness & Visibility Day"; - else if (month == 6) - return "Pride Month"; - else if (month == 7 && day == 14) - return "Non-Binary People's Day"; - else if (month == 7 && day == 28) - return "Leilukin's Birthday"; - else if (month == 9 && day == 11) - return "Leilukin's Hub Anniversary"; - else if (month == 9 && day == 23) - return "Bi Visibility Day"; - else if (month == 10 && day == 8) - return "International Lesbian Day"; - else if (month == 10 && day == 11) - return "National Coming Out Day"; - else if (month == 10 && day == 17) - return "Genderfluid Visibility Week"; - else if (month == 10 && day == 24) - return "Ace Week"; - else if (month == 10 && day == 26) - return "Intersex Awareness Day"; + const currentYear = date.getFullYear(); + const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear(); + const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate; + + if (month === 3 && day === 1) + return { + blurb: `Today is Zero Discrimination Day`, + class: "flag-progress-intersex", + }; + else if (month === 3 && day === 8) + return { + blurb: `Today is International Women's Day}`, + class: "symbol-venus", + }; + else if (month === 3 && day === 31) + return { + blurb: `Today is Trans Day of Visibility`, + class: "flag-trans", + }; + else if (month === 4 && day === 6) + return { + blurb: `Today is International Asexuality Day`, + class: "flag-ace", + }; + else if (month === 4 && day === 26) + return { + blurb: `Today is Lesbian Visibility Day`, + class: "flag-lesbian", + }; + else if (month === 5 && day === 17) + return { + blurb: `Today is International Day Against Homophobia, Biphobia and Transphobia`, + class: "flag-progress", + }; + else if (month === 5 && day === 19) + return { + blurb: `Today is Agender Pride Day`, + class: "flag-agender", + }; + else if (month === 5 && day === 25) + return { + blurb: `Today is Pansexual and Panromantic Awareness and Visibility Day`, + class: "flag-pan", + }; + else if (month === 6) + return { + blurb: `Happy Pride Month!`, + class: "flag-progress-intersex", + }; + else if (month === 7 && day === 14) + return { + blurb: `Today is Non-Binary People's Day`, + 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 Bi Visibility Day`, + class: "flag-bi", + }; + else if (month === 10 && day === 8) + return { + blurb: `Today is International Lesbian Day`, + class: "flag-lesbian", + }; + else if (month === 10 && day === 11) + return { + blurb: `Today is National Coming Out Day`, + class: "flag-rainbow", + }; + else if (month === 10 && day === 17) + return { + blurb: `Today is the start of Genderfluid Visibility Week`, + class: "flag-genderfluid", + }; + else if (month === 10 && day === 24) + return { + blurb: `Today is the start of Ace Week`, + class: "flag-ace", + }; + else if (month === 10 && day === 26) + return { + blurb: `Today is Intersex Awareness Day`, + class: "flag-intersex", + }; else - return "No event"; - } - - 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 Zero Discrimination Day - `; - break; - case "International Women's Day": - return ` - Today is International Women's Day - `; - break; - case "Trans Day of Visibility": - return ` - Today is Trans Day of Visibility - `; - break; - case "International Asexuality Day": - return ` - Today is International Asexuality Day - `; - break; - case "Lesbian Visibility Day": - return ` - Today is Lesbian Visibility Day - `; - break; - case "IDAHOBIT": - return ` - Today is International Day Against Homophobia, Biphobia and Transphobia - `; - break; - case "Agender Pride Day": - return ` - Today is Agender Pride Day - `; - break; - case "Pansexual and Panromantic Awareness & Visibility Day": - return ` - Today is Pansexual and Panromantic Visibility Day - `; - break; - case "Pride Month": - return ` - Happy Pride Month! - `; - break; - case "Non-Binary People's Day": - return ` - Today is Non-Binary People's Day - `; - 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 Bi Visibility Day - `; - break; - case "International Lesbian Day": - return ` - Today is International Lesbian Day - `; - break; - case "National Coming Out Day": - return ` - Today is National Coming Out Day - `; - break; - case "Genderfluid Visibility Week": - return ` - Today is the start of Genderfluid Visibility Week - `; - break; - case "Ace Week": - return ` - Today is the start of Ace Week - `; - break; - case "Intersex Awareness Day": - return ` - Today is Intersex Awareness Day - `; - break; - default: - return ``; - } + return null; } diff --git a/_site/blog/posts/2023-06-23-june-2023-leilukins-hub-layout-rewrite/index.html b/_site/blog/posts/2023-06-23-june-2023-leilukins-hub-layout-rewrite/index.html index 31d7217d..8f1e49b3 100644 --- a/_site/blog/posts/2023-06-23-june-2023-leilukins-hub-layout-rewrite/index.html +++ b/_site/blog/posts/2023-06-23-june-2023-leilukins-hub-layout-rewrite/index.html @@ -98,14 +98,12 @@ const todayEvent = getTodayEvent(); - if (todayEvent != "No event") { + if (todayEvent) { heroTopBarEl.classList.remove('hidden'); + heroTopBarEl.innerHTML = todayEvent.blurb; - if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); - } else { - headerImgEl.classList.add(getBanner(todayEvent)); - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); + if (todayEvent.class) { + headerImgEl.classList.add(todayEvent.class); } } @@ -114,196 +112,100 @@ const month = date.getMonth() + 1; const day = date.getDate(); - if (month == 3 && day == 1) - return "Zero Discrimination Day"; - else if (month == 3 && day == 8) - return "International Women's Day"; - else if (month == 3 && day == 31) - return "Trans Day of Visibility"; - else if (month == 4 && day == 6) - return "International Asexuality Day"; - else if (month == 4 && day == 26) - return "Lesbian Visibility Day"; - else if (month == 5 && day == 17) - return "IDAHOBIT"; - else if (month == 5 && day == 19) - return "Agender Pride Day"; - else if (month == 5 && day == 25) - return "Pansexual and Panromantic Awareness & Visibility Day"; - else if (month == 6) - return "Pride Month"; - else if (month == 7 && day == 14) - return "Non-Binary People's Day"; - else if (month == 7 && day == 28) - return "Leilukin's Birthday"; - else if (month == 9 && day == 11) - return "Leilukin's Hub Anniversary"; - else if (month == 9 && day == 23) - return "Bi Visibility Day"; - else if (month == 10 && day == 8) - return "International Lesbian Day"; - else if (month == 10 && day == 11) - return "National Coming Out Day"; - else if (month == 10 && day == 17) - return "Genderfluid Visibility Week"; - else if (month == 10 && day == 24) - return "Ace Week"; - else if (month == 10 && day == 26) - return "Intersex Awareness Day"; + const currentYear = date.getFullYear(); + const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear(); + const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate; + + if (month === 3 && day === 1) + return { + blurb: `Today is Zero Discrimination Day`, + class: "flag-progress-intersex", + }; + else if (month === 3 && day === 8) + return { + blurb: `Today is International Women's Day}`, + class: "symbol-venus", + }; + else if (month === 3 && day === 31) + return { + blurb: `Today is Trans Day of Visibility`, + class: "flag-trans", + }; + else if (month === 4 && day === 6) + return { + blurb: `Today is International Asexuality Day`, + class: "flag-ace", + }; + else if (month === 4 && day === 26) + return { + blurb: `Today is Lesbian Visibility Day`, + class: "flag-lesbian", + }; + else if (month === 5 && day === 17) + return { + blurb: `Today is International Day Against Homophobia, Biphobia and Transphobia`, + class: "flag-progress", + }; + else if (month === 5 && day === 19) + return { + blurb: `Today is Agender Pride Day`, + class: "flag-agender", + }; + else if (month === 5 && day === 25) + return { + blurb: `Today is Pansexual and Panromantic Awareness and Visibility Day`, + class: "flag-pan", + }; + else if (month === 6) + return { + blurb: `Happy Pride Month!`, + class: "flag-progress-intersex", + }; + else if (month === 7 && day === 14) + return { + blurb: `Today is Non-Binary People's Day`, + 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 Bi Visibility Day`, + class: "flag-bi", + }; + else if (month === 10 && day === 8) + return { + blurb: `Today is International Lesbian Day`, + class: "flag-lesbian", + }; + else if (month === 10 && day === 11) + return { + blurb: `Today is National Coming Out Day`, + class: "flag-rainbow", + }; + else if (month === 10 && day === 17) + return { + blurb: `Today is the start of Genderfluid Visibility Week`, + class: "flag-genderfluid", + }; + else if (month === 10 && day === 24) + return { + blurb: `Today is the start of Ace Week`, + class: "flag-ace", + }; + else if (month === 10 && day === 26) + return { + blurb: `Today is Intersex Awareness Day`, + class: "flag-intersex", + }; else - return "No event"; - } - - 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 Zero Discrimination Day - `; - break; - case "International Women's Day": - return ` - Today is International Women's Day - `; - break; - case "Trans Day of Visibility": - return ` - Today is Trans Day of Visibility - `; - break; - case "International Asexuality Day": - return ` - Today is International Asexuality Day - `; - break; - case "Lesbian Visibility Day": - return ` - Today is Lesbian Visibility Day - `; - break; - case "IDAHOBIT": - return ` - Today is International Day Against Homophobia, Biphobia and Transphobia - `; - break; - case "Agender Pride Day": - return ` - Today is Agender Pride Day - `; - break; - case "Pansexual and Panromantic Awareness & Visibility Day": - return ` - Today is Pansexual and Panromantic Visibility Day - `; - break; - case "Pride Month": - return ` - Happy Pride Month! - `; - break; - case "Non-Binary People's Day": - return ` - Today is Non-Binary People's Day - `; - 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 Bi Visibility Day - `; - break; - case "International Lesbian Day": - return ` - Today is International Lesbian Day - `; - break; - case "National Coming Out Day": - return ` - Today is National Coming Out Day - `; - break; - case "Genderfluid Visibility Week": - return ` - Today is the start of Genderfluid Visibility Week - `; - break; - case "Ace Week": - return ` - Today is the start of Ace Week - `; - break; - case "Intersex Awareness Day": - return ` - Today is Intersex Awareness Day - `; - break; - default: - return ``; - } + return null; } diff --git a/_site/blog/posts/2023-07-28-my-first-birthday-after-the-launch-of-leilukins-hub/index.html b/_site/blog/posts/2023-07-28-my-first-birthday-after-the-launch-of-leilukins-hub/index.html index 725414ba..4f2cef22 100644 --- a/_site/blog/posts/2023-07-28-my-first-birthday-after-the-launch-of-leilukins-hub/index.html +++ b/_site/blog/posts/2023-07-28-my-first-birthday-after-the-launch-of-leilukins-hub/index.html @@ -98,14 +98,12 @@ const todayEvent = getTodayEvent(); - if (todayEvent != "No event") { + if (todayEvent) { heroTopBarEl.classList.remove('hidden'); + heroTopBarEl.innerHTML = todayEvent.blurb; - if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); - } else { - headerImgEl.classList.add(getBanner(todayEvent)); - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); + if (todayEvent.class) { + headerImgEl.classList.add(todayEvent.class); } } @@ -114,196 +112,100 @@ const month = date.getMonth() + 1; const day = date.getDate(); - if (month == 3 && day == 1) - return "Zero Discrimination Day"; - else if (month == 3 && day == 8) - return "International Women's Day"; - else if (month == 3 && day == 31) - return "Trans Day of Visibility"; - else if (month == 4 && day == 6) - return "International Asexuality Day"; - else if (month == 4 && day == 26) - return "Lesbian Visibility Day"; - else if (month == 5 && day == 17) - return "IDAHOBIT"; - else if (month == 5 && day == 19) - return "Agender Pride Day"; - else if (month == 5 && day == 25) - return "Pansexual and Panromantic Awareness & Visibility Day"; - else if (month == 6) - return "Pride Month"; - else if (month == 7 && day == 14) - return "Non-Binary People's Day"; - else if (month == 7 && day == 28) - return "Leilukin's Birthday"; - else if (month == 9 && day == 11) - return "Leilukin's Hub Anniversary"; - else if (month == 9 && day == 23) - return "Bi Visibility Day"; - else if (month == 10 && day == 8) - return "International Lesbian Day"; - else if (month == 10 && day == 11) - return "National Coming Out Day"; - else if (month == 10 && day == 17) - return "Genderfluid Visibility Week"; - else if (month == 10 && day == 24) - return "Ace Week"; - else if (month == 10 && day == 26) - return "Intersex Awareness Day"; + const currentYear = date.getFullYear(); + const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear(); + const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate; + + if (month === 3 && day === 1) + return { + blurb: `Today is Zero Discrimination Day`, + class: "flag-progress-intersex", + }; + else if (month === 3 && day === 8) + return { + blurb: `Today is International Women's Day}`, + class: "symbol-venus", + }; + else if (month === 3 && day === 31) + return { + blurb: `Today is Trans Day of Visibility`, + class: "flag-trans", + }; + else if (month === 4 && day === 6) + return { + blurb: `Today is International Asexuality Day`, + class: "flag-ace", + }; + else if (month === 4 && day === 26) + return { + blurb: `Today is Lesbian Visibility Day`, + class: "flag-lesbian", + }; + else if (month === 5 && day === 17) + return { + blurb: `Today is International Day Against Homophobia, Biphobia and Transphobia`, + class: "flag-progress", + }; + else if (month === 5 && day === 19) + return { + blurb: `Today is Agender Pride Day`, + class: "flag-agender", + }; + else if (month === 5 && day === 25) + return { + blurb: `Today is Pansexual and Panromantic Awareness and Visibility Day`, + class: "flag-pan", + }; + else if (month === 6) + return { + blurb: `Happy Pride Month!`, + class: "flag-progress-intersex", + }; + else if (month === 7 && day === 14) + return { + blurb: `Today is Non-Binary People's Day`, + 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 Bi Visibility Day`, + class: "flag-bi", + }; + else if (month === 10 && day === 8) + return { + blurb: `Today is International Lesbian Day`, + class: "flag-lesbian", + }; + else if (month === 10 && day === 11) + return { + blurb: `Today is National Coming Out Day`, + class: "flag-rainbow", + }; + else if (month === 10 && day === 17) + return { + blurb: `Today is the start of Genderfluid Visibility Week`, + class: "flag-genderfluid", + }; + else if (month === 10 && day === 24) + return { + blurb: `Today is the start of Ace Week`, + class: "flag-ace", + }; + else if (month === 10 && day === 26) + return { + blurb: `Today is Intersex Awareness Day`, + class: "flag-intersex", + }; else - return "No event"; - } - - 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 Zero Discrimination Day - `; - break; - case "International Women's Day": - return ` - Today is International Women's Day - `; - break; - case "Trans Day of Visibility": - return ` - Today is Trans Day of Visibility - `; - break; - case "International Asexuality Day": - return ` - Today is International Asexuality Day - `; - break; - case "Lesbian Visibility Day": - return ` - Today is Lesbian Visibility Day - `; - break; - case "IDAHOBIT": - return ` - Today is International Day Against Homophobia, Biphobia and Transphobia - `; - break; - case "Agender Pride Day": - return ` - Today is Agender Pride Day - `; - break; - case "Pansexual and Panromantic Awareness & Visibility Day": - return ` - Today is Pansexual and Panromantic Visibility Day - `; - break; - case "Pride Month": - return ` - Happy Pride Month! - `; - break; - case "Non-Binary People's Day": - return ` - Today is Non-Binary People's Day - `; - 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 Bi Visibility Day - `; - break; - case "International Lesbian Day": - return ` - Today is International Lesbian Day - `; - break; - case "National Coming Out Day": - return ` - Today is National Coming Out Day - `; - break; - case "Genderfluid Visibility Week": - return ` - Today is the start of Genderfluid Visibility Week - `; - break; - case "Ace Week": - return ` - Today is the start of Ace Week - `; - break; - case "Intersex Awareness Day": - return ` - Today is Intersex Awareness Day - `; - break; - default: - return ``; - } + return null; } diff --git a/_site/blog/posts/2023-09-11-happy-1st-anniversary-to-leilukins-hub/index.html b/_site/blog/posts/2023-09-11-happy-1st-anniversary-to-leilukins-hub/index.html index fd030b58..c6f79140 100644 --- a/_site/blog/posts/2023-09-11-happy-1st-anniversary-to-leilukins-hub/index.html +++ b/_site/blog/posts/2023-09-11-happy-1st-anniversary-to-leilukins-hub/index.html @@ -98,14 +98,12 @@ const todayEvent = getTodayEvent(); - if (todayEvent != "No event") { + if (todayEvent) { heroTopBarEl.classList.remove('hidden'); + heroTopBarEl.innerHTML = todayEvent.blurb; - if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); - } else { - headerImgEl.classList.add(getBanner(todayEvent)); - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); + if (todayEvent.class) { + headerImgEl.classList.add(todayEvent.class); } } @@ -114,196 +112,100 @@ const month = date.getMonth() + 1; const day = date.getDate(); - if (month == 3 && day == 1) - return "Zero Discrimination Day"; - else if (month == 3 && day == 8) - return "International Women's Day"; - else if (month == 3 && day == 31) - return "Trans Day of Visibility"; - else if (month == 4 && day == 6) - return "International Asexuality Day"; - else if (month == 4 && day == 26) - return "Lesbian Visibility Day"; - else if (month == 5 && day == 17) - return "IDAHOBIT"; - else if (month == 5 && day == 19) - return "Agender Pride Day"; - else if (month == 5 && day == 25) - return "Pansexual and Panromantic Awareness & Visibility Day"; - else if (month == 6) - return "Pride Month"; - else if (month == 7 && day == 14) - return "Non-Binary People's Day"; - else if (month == 7 && day == 28) - return "Leilukin's Birthday"; - else if (month == 9 && day == 11) - return "Leilukin's Hub Anniversary"; - else if (month == 9 && day == 23) - return "Bi Visibility Day"; - else if (month == 10 && day == 8) - return "International Lesbian Day"; - else if (month == 10 && day == 11) - return "National Coming Out Day"; - else if (month == 10 && day == 17) - return "Genderfluid Visibility Week"; - else if (month == 10 && day == 24) - return "Ace Week"; - else if (month == 10 && day == 26) - return "Intersex Awareness Day"; + const currentYear = date.getFullYear(); + const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear(); + const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate; + + if (month === 3 && day === 1) + return { + blurb: `Today is Zero Discrimination Day`, + class: "flag-progress-intersex", + }; + else if (month === 3 && day === 8) + return { + blurb: `Today is International Women's Day}`, + class: "symbol-venus", + }; + else if (month === 3 && day === 31) + return { + blurb: `Today is Trans Day of Visibility`, + class: "flag-trans", + }; + else if (month === 4 && day === 6) + return { + blurb: `Today is International Asexuality Day`, + class: "flag-ace", + }; + else if (month === 4 && day === 26) + return { + blurb: `Today is Lesbian Visibility Day`, + class: "flag-lesbian", + }; + else if (month === 5 && day === 17) + return { + blurb: `Today is International Day Against Homophobia, Biphobia and Transphobia`, + class: "flag-progress", + }; + else if (month === 5 && day === 19) + return { + blurb: `Today is Agender Pride Day`, + class: "flag-agender", + }; + else if (month === 5 && day === 25) + return { + blurb: `Today is Pansexual and Panromantic Awareness and Visibility Day`, + class: "flag-pan", + }; + else if (month === 6) + return { + blurb: `Happy Pride Month!`, + class: "flag-progress-intersex", + }; + else if (month === 7 && day === 14) + return { + blurb: `Today is Non-Binary People's Day`, + 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 Bi Visibility Day`, + class: "flag-bi", + }; + else if (month === 10 && day === 8) + return { + blurb: `Today is International Lesbian Day`, + class: "flag-lesbian", + }; + else if (month === 10 && day === 11) + return { + blurb: `Today is National Coming Out Day`, + class: "flag-rainbow", + }; + else if (month === 10 && day === 17) + return { + blurb: `Today is the start of Genderfluid Visibility Week`, + class: "flag-genderfluid", + }; + else if (month === 10 && day === 24) + return { + blurb: `Today is the start of Ace Week`, + class: "flag-ace", + }; + else if (month === 10 && day === 26) + return { + blurb: `Today is Intersex Awareness Day`, + class: "flag-intersex", + }; else - return "No event"; - } - - 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 Zero Discrimination Day - `; - break; - case "International Women's Day": - return ` - Today is International Women's Day - `; - break; - case "Trans Day of Visibility": - return ` - Today is Trans Day of Visibility - `; - break; - case "International Asexuality Day": - return ` - Today is International Asexuality Day - `; - break; - case "Lesbian Visibility Day": - return ` - Today is Lesbian Visibility Day - `; - break; - case "IDAHOBIT": - return ` - Today is International Day Against Homophobia, Biphobia and Transphobia - `; - break; - case "Agender Pride Day": - return ` - Today is Agender Pride Day - `; - break; - case "Pansexual and Panromantic Awareness & Visibility Day": - return ` - Today is Pansexual and Panromantic Visibility Day - `; - break; - case "Pride Month": - return ` - Happy Pride Month! - `; - break; - case "Non-Binary People's Day": - return ` - Today is Non-Binary People's Day - `; - 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 Bi Visibility Day - `; - break; - case "International Lesbian Day": - return ` - Today is International Lesbian Day - `; - break; - case "National Coming Out Day": - return ` - Today is National Coming Out Day - `; - break; - case "Genderfluid Visibility Week": - return ` - Today is the start of Genderfluid Visibility Week - `; - break; - case "Ace Week": - return ` - Today is the start of Ace Week - `; - break; - case "Intersex Awareness Day": - return ` - Today is Intersex Awareness Day - `; - break; - default: - return ``; - } + return null; } diff --git a/_site/blog/posts/2023-10-13-my-cassette-beasts-pombomb-plushie-arrived/index.html b/_site/blog/posts/2023-10-13-my-cassette-beasts-pombomb-plushie-arrived/index.html index b08aeac6..84cef443 100644 --- a/_site/blog/posts/2023-10-13-my-cassette-beasts-pombomb-plushie-arrived/index.html +++ b/_site/blog/posts/2023-10-13-my-cassette-beasts-pombomb-plushie-arrived/index.html @@ -98,14 +98,12 @@ const todayEvent = getTodayEvent(); - if (todayEvent != "No event") { + if (todayEvent) { heroTopBarEl.classList.remove('hidden'); + heroTopBarEl.innerHTML = todayEvent.blurb; - if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); - } else { - headerImgEl.classList.add(getBanner(todayEvent)); - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); + if (todayEvent.class) { + headerImgEl.classList.add(todayEvent.class); } } @@ -114,196 +112,100 @@ const month = date.getMonth() + 1; const day = date.getDate(); - if (month == 3 && day == 1) - return "Zero Discrimination Day"; - else if (month == 3 && day == 8) - return "International Women's Day"; - else if (month == 3 && day == 31) - return "Trans Day of Visibility"; - else if (month == 4 && day == 6) - return "International Asexuality Day"; - else if (month == 4 && day == 26) - return "Lesbian Visibility Day"; - else if (month == 5 && day == 17) - return "IDAHOBIT"; - else if (month == 5 && day == 19) - return "Agender Pride Day"; - else if (month == 5 && day == 25) - return "Pansexual and Panromantic Awareness & Visibility Day"; - else if (month == 6) - return "Pride Month"; - else if (month == 7 && day == 14) - return "Non-Binary People's Day"; - else if (month == 7 && day == 28) - return "Leilukin's Birthday"; - else if (month == 9 && day == 11) - return "Leilukin's Hub Anniversary"; - else if (month == 9 && day == 23) - return "Bi Visibility Day"; - else if (month == 10 && day == 8) - return "International Lesbian Day"; - else if (month == 10 && day == 11) - return "National Coming Out Day"; - else if (month == 10 && day == 17) - return "Genderfluid Visibility Week"; - else if (month == 10 && day == 24) - return "Ace Week"; - else if (month == 10 && day == 26) - return "Intersex Awareness Day"; + const currentYear = date.getFullYear(); + const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear(); + const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate; + + if (month === 3 && day === 1) + return { + blurb: `Today is Zero Discrimination Day`, + class: "flag-progress-intersex", + }; + else if (month === 3 && day === 8) + return { + blurb: `Today is International Women's Day}`, + class: "symbol-venus", + }; + else if (month === 3 && day === 31) + return { + blurb: `Today is Trans Day of Visibility`, + class: "flag-trans", + }; + else if (month === 4 && day === 6) + return { + blurb: `Today is International Asexuality Day`, + class: "flag-ace", + }; + else if (month === 4 && day === 26) + return { + blurb: `Today is Lesbian Visibility Day`, + class: "flag-lesbian", + }; + else if (month === 5 && day === 17) + return { + blurb: `Today is International Day Against Homophobia, Biphobia and Transphobia`, + class: "flag-progress", + }; + else if (month === 5 && day === 19) + return { + blurb: `Today is Agender Pride Day`, + class: "flag-agender", + }; + else if (month === 5 && day === 25) + return { + blurb: `Today is Pansexual and Panromantic Awareness and Visibility Day`, + class: "flag-pan", + }; + else if (month === 6) + return { + blurb: `Happy Pride Month!`, + class: "flag-progress-intersex", + }; + else if (month === 7 && day === 14) + return { + blurb: `Today is Non-Binary People's Day`, + 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 Bi Visibility Day`, + class: "flag-bi", + }; + else if (month === 10 && day === 8) + return { + blurb: `Today is International Lesbian Day`, + class: "flag-lesbian", + }; + else if (month === 10 && day === 11) + return { + blurb: `Today is National Coming Out Day`, + class: "flag-rainbow", + }; + else if (month === 10 && day === 17) + return { + blurb: `Today is the start of Genderfluid Visibility Week`, + class: "flag-genderfluid", + }; + else if (month === 10 && day === 24) + return { + blurb: `Today is the start of Ace Week`, + class: "flag-ace", + }; + else if (month === 10 && day === 26) + return { + blurb: `Today is Intersex Awareness Day`, + class: "flag-intersex", + }; else - return "No event"; - } - - 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 Zero Discrimination Day - `; - break; - case "International Women's Day": - return ` - Today is International Women's Day - `; - break; - case "Trans Day of Visibility": - return ` - Today is Trans Day of Visibility - `; - break; - case "International Asexuality Day": - return ` - Today is International Asexuality Day - `; - break; - case "Lesbian Visibility Day": - return ` - Today is Lesbian Visibility Day - `; - break; - case "IDAHOBIT": - return ` - Today is International Day Against Homophobia, Biphobia and Transphobia - `; - break; - case "Agender Pride Day": - return ` - Today is Agender Pride Day - `; - break; - case "Pansexual and Panromantic Awareness & Visibility Day": - return ` - Today is Pansexual and Panromantic Visibility Day - `; - break; - case "Pride Month": - return ` - Happy Pride Month! - `; - break; - case "Non-Binary People's Day": - return ` - Today is Non-Binary People's Day - `; - 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 Bi Visibility Day - `; - break; - case "International Lesbian Day": - return ` - Today is International Lesbian Day - `; - break; - case "National Coming Out Day": - return ` - Today is National Coming Out Day - `; - break; - case "Genderfluid Visibility Week": - return ` - Today is the start of Genderfluid Visibility Week - `; - break; - case "Ace Week": - return ` - Today is the start of Ace Week - `; - break; - case "Intersex Awareness Day": - return ` - Today is Intersex Awareness Day - `; - break; - default: - return ``; - } + return null; } diff --git a/_site/blog/posts/2023-10-30-support-for-my-steam-review-of-a-summers-end/index.html b/_site/blog/posts/2023-10-30-support-for-my-steam-review-of-a-summers-end/index.html index dc64979d..71a7092d 100644 --- a/_site/blog/posts/2023-10-30-support-for-my-steam-review-of-a-summers-end/index.html +++ b/_site/blog/posts/2023-10-30-support-for-my-steam-review-of-a-summers-end/index.html @@ -98,14 +98,12 @@ const todayEvent = getTodayEvent(); - if (todayEvent != "No event") { + if (todayEvent) { heroTopBarEl.classList.remove('hidden'); + heroTopBarEl.innerHTML = todayEvent.blurb; - if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); - } else { - headerImgEl.classList.add(getBanner(todayEvent)); - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); + if (todayEvent.class) { + headerImgEl.classList.add(todayEvent.class); } } @@ -114,196 +112,100 @@ const month = date.getMonth() + 1; const day = date.getDate(); - if (month == 3 && day == 1) - return "Zero Discrimination Day"; - else if (month == 3 && day == 8) - return "International Women's Day"; - else if (month == 3 && day == 31) - return "Trans Day of Visibility"; - else if (month == 4 && day == 6) - return "International Asexuality Day"; - else if (month == 4 && day == 26) - return "Lesbian Visibility Day"; - else if (month == 5 && day == 17) - return "IDAHOBIT"; - else if (month == 5 && day == 19) - return "Agender Pride Day"; - else if (month == 5 && day == 25) - return "Pansexual and Panromantic Awareness & Visibility Day"; - else if (month == 6) - return "Pride Month"; - else if (month == 7 && day == 14) - return "Non-Binary People's Day"; - else if (month == 7 && day == 28) - return "Leilukin's Birthday"; - else if (month == 9 && day == 11) - return "Leilukin's Hub Anniversary"; - else if (month == 9 && day == 23) - return "Bi Visibility Day"; - else if (month == 10 && day == 8) - return "International Lesbian Day"; - else if (month == 10 && day == 11) - return "National Coming Out Day"; - else if (month == 10 && day == 17) - return "Genderfluid Visibility Week"; - else if (month == 10 && day == 24) - return "Ace Week"; - else if (month == 10 && day == 26) - return "Intersex Awareness Day"; + const currentYear = date.getFullYear(); + const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear(); + const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate; + + if (month === 3 && day === 1) + return { + blurb: `Today is Zero Discrimination Day`, + class: "flag-progress-intersex", + }; + else if (month === 3 && day === 8) + return { + blurb: `Today is International Women's Day}`, + class: "symbol-venus", + }; + else if (month === 3 && day === 31) + return { + blurb: `Today is Trans Day of Visibility`, + class: "flag-trans", + }; + else if (month === 4 && day === 6) + return { + blurb: `Today is International Asexuality Day`, + class: "flag-ace", + }; + else if (month === 4 && day === 26) + return { + blurb: `Today is Lesbian Visibility Day`, + class: "flag-lesbian", + }; + else if (month === 5 && day === 17) + return { + blurb: `Today is International Day Against Homophobia, Biphobia and Transphobia`, + class: "flag-progress", + }; + else if (month === 5 && day === 19) + return { + blurb: `Today is Agender Pride Day`, + class: "flag-agender", + }; + else if (month === 5 && day === 25) + return { + blurb: `Today is Pansexual and Panromantic Awareness and Visibility Day`, + class: "flag-pan", + }; + else if (month === 6) + return { + blurb: `Happy Pride Month!`, + class: "flag-progress-intersex", + }; + else if (month === 7 && day === 14) + return { + blurb: `Today is Non-Binary People's Day`, + 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 Bi Visibility Day`, + class: "flag-bi", + }; + else if (month === 10 && day === 8) + return { + blurb: `Today is International Lesbian Day`, + class: "flag-lesbian", + }; + else if (month === 10 && day === 11) + return { + blurb: `Today is National Coming Out Day`, + class: "flag-rainbow", + }; + else if (month === 10 && day === 17) + return { + blurb: `Today is the start of Genderfluid Visibility Week`, + class: "flag-genderfluid", + }; + else if (month === 10 && day === 24) + return { + blurb: `Today is the start of Ace Week`, + class: "flag-ace", + }; + else if (month === 10 && day === 26) + return { + blurb: `Today is Intersex Awareness Day`, + class: "flag-intersex", + }; else - return "No event"; - } - - 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 Zero Discrimination Day - `; - break; - case "International Women's Day": - return ` - Today is International Women's Day - `; - break; - case "Trans Day of Visibility": - return ` - Today is Trans Day of Visibility - `; - break; - case "International Asexuality Day": - return ` - Today is International Asexuality Day - `; - break; - case "Lesbian Visibility Day": - return ` - Today is Lesbian Visibility Day - `; - break; - case "IDAHOBIT": - return ` - Today is International Day Against Homophobia, Biphobia and Transphobia - `; - break; - case "Agender Pride Day": - return ` - Today is Agender Pride Day - `; - break; - case "Pansexual and Panromantic Awareness & Visibility Day": - return ` - Today is Pansexual and Panromantic Visibility Day - `; - break; - case "Pride Month": - return ` - Happy Pride Month! - `; - break; - case "Non-Binary People's Day": - return ` - Today is Non-Binary People's Day - `; - 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 Bi Visibility Day - `; - break; - case "International Lesbian Day": - return ` - Today is International Lesbian Day - `; - break; - case "National Coming Out Day": - return ` - Today is National Coming Out Day - `; - break; - case "Genderfluid Visibility Week": - return ` - Today is the start of Genderfluid Visibility Week - `; - break; - case "Ace Week": - return ` - Today is the start of Ace Week - `; - break; - case "Intersex Awareness Day": - return ` - Today is Intersex Awareness Day - `; - break; - default: - return ``; - } + return null; } diff --git a/_site/blog/posts/2023-11-19-i-can-finally-game-on-a-solid-state-drive/index.html b/_site/blog/posts/2023-11-19-i-can-finally-game-on-a-solid-state-drive/index.html index 46994448..01d68c01 100644 --- a/_site/blog/posts/2023-11-19-i-can-finally-game-on-a-solid-state-drive/index.html +++ b/_site/blog/posts/2023-11-19-i-can-finally-game-on-a-solid-state-drive/index.html @@ -98,14 +98,12 @@ const todayEvent = getTodayEvent(); - if (todayEvent != "No event") { + if (todayEvent) { heroTopBarEl.classList.remove('hidden'); + heroTopBarEl.innerHTML = todayEvent.blurb; - if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); - } else { - headerImgEl.classList.add(getBanner(todayEvent)); - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); + if (todayEvent.class) { + headerImgEl.classList.add(todayEvent.class); } } @@ -114,196 +112,100 @@ const month = date.getMonth() + 1; const day = date.getDate(); - if (month == 3 && day == 1) - return "Zero Discrimination Day"; - else if (month == 3 && day == 8) - return "International Women's Day"; - else if (month == 3 && day == 31) - return "Trans Day of Visibility"; - else if (month == 4 && day == 6) - return "International Asexuality Day"; - else if (month == 4 && day == 26) - return "Lesbian Visibility Day"; - else if (month == 5 && day == 17) - return "IDAHOBIT"; - else if (month == 5 && day == 19) - return "Agender Pride Day"; - else if (month == 5 && day == 25) - return "Pansexual and Panromantic Awareness & Visibility Day"; - else if (month == 6) - return "Pride Month"; - else if (month == 7 && day == 14) - return "Non-Binary People's Day"; - else if (month == 7 && day == 28) - return "Leilukin's Birthday"; - else if (month == 9 && day == 11) - return "Leilukin's Hub Anniversary"; - else if (month == 9 && day == 23) - return "Bi Visibility Day"; - else if (month == 10 && day == 8) - return "International Lesbian Day"; - else if (month == 10 && day == 11) - return "National Coming Out Day"; - else if (month == 10 && day == 17) - return "Genderfluid Visibility Week"; - else if (month == 10 && day == 24) - return "Ace Week"; - else if (month == 10 && day == 26) - return "Intersex Awareness Day"; + const currentYear = date.getFullYear(); + const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear(); + const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate; + + if (month === 3 && day === 1) + return { + blurb: `Today is Zero Discrimination Day`, + class: "flag-progress-intersex", + }; + else if (month === 3 && day === 8) + return { + blurb: `Today is International Women's Day}`, + class: "symbol-venus", + }; + else if (month === 3 && day === 31) + return { + blurb: `Today is Trans Day of Visibility`, + class: "flag-trans", + }; + else if (month === 4 && day === 6) + return { + blurb: `Today is International Asexuality Day`, + class: "flag-ace", + }; + else if (month === 4 && day === 26) + return { + blurb: `Today is Lesbian Visibility Day`, + class: "flag-lesbian", + }; + else if (month === 5 && day === 17) + return { + blurb: `Today is International Day Against Homophobia, Biphobia and Transphobia`, + class: "flag-progress", + }; + else if (month === 5 && day === 19) + return { + blurb: `Today is Agender Pride Day`, + class: "flag-agender", + }; + else if (month === 5 && day === 25) + return { + blurb: `Today is Pansexual and Panromantic Awareness and Visibility Day`, + class: "flag-pan", + }; + else if (month === 6) + return { + blurb: `Happy Pride Month!`, + class: "flag-progress-intersex", + }; + else if (month === 7 && day === 14) + return { + blurb: `Today is Non-Binary People's Day`, + 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 Bi Visibility Day`, + class: "flag-bi", + }; + else if (month === 10 && day === 8) + return { + blurb: `Today is International Lesbian Day`, + class: "flag-lesbian", + }; + else if (month === 10 && day === 11) + return { + blurb: `Today is National Coming Out Day`, + class: "flag-rainbow", + }; + else if (month === 10 && day === 17) + return { + blurb: `Today is the start of Genderfluid Visibility Week`, + class: "flag-genderfluid", + }; + else if (month === 10 && day === 24) + return { + blurb: `Today is the start of Ace Week`, + class: "flag-ace", + }; + else if (month === 10 && day === 26) + return { + blurb: `Today is Intersex Awareness Day`, + class: "flag-intersex", + }; else - return "No event"; - } - - 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 Zero Discrimination Day - `; - break; - case "International Women's Day": - return ` - Today is International Women's Day - `; - break; - case "Trans Day of Visibility": - return ` - Today is Trans Day of Visibility - `; - break; - case "International Asexuality Day": - return ` - Today is International Asexuality Day - `; - break; - case "Lesbian Visibility Day": - return ` - Today is Lesbian Visibility Day - `; - break; - case "IDAHOBIT": - return ` - Today is International Day Against Homophobia, Biphobia and Transphobia - `; - break; - case "Agender Pride Day": - return ` - Today is Agender Pride Day - `; - break; - case "Pansexual and Panromantic Awareness & Visibility Day": - return ` - Today is Pansexual and Panromantic Visibility Day - `; - break; - case "Pride Month": - return ` - Happy Pride Month! - `; - break; - case "Non-Binary People's Day": - return ` - Today is Non-Binary People's Day - `; - 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 Bi Visibility Day - `; - break; - case "International Lesbian Day": - return ` - Today is International Lesbian Day - `; - break; - case "National Coming Out Day": - return ` - Today is National Coming Out Day - `; - break; - case "Genderfluid Visibility Week": - return ` - Today is the start of Genderfluid Visibility Week - `; - break; - case "Ace Week": - return ` - Today is the start of Ace Week - `; - break; - case "Intersex Awareness Day": - return ` - Today is Intersex Awareness Day - `; - break; - default: - return ``; - } + return null; } diff --git a/_site/blog/posts/2023-11-20-finally-beat-a-bugs-life-video-game-24-years-later/index.html b/_site/blog/posts/2023-11-20-finally-beat-a-bugs-life-video-game-24-years-later/index.html index b17a7f0e..2d55dd78 100644 --- a/_site/blog/posts/2023-11-20-finally-beat-a-bugs-life-video-game-24-years-later/index.html +++ b/_site/blog/posts/2023-11-20-finally-beat-a-bugs-life-video-game-24-years-later/index.html @@ -98,14 +98,12 @@ const todayEvent = getTodayEvent(); - if (todayEvent != "No event") { + if (todayEvent) { heroTopBarEl.classList.remove('hidden'); + heroTopBarEl.innerHTML = todayEvent.blurb; - if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); - } else { - headerImgEl.classList.add(getBanner(todayEvent)); - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); + if (todayEvent.class) { + headerImgEl.classList.add(todayEvent.class); } } @@ -114,196 +112,100 @@ const month = date.getMonth() + 1; const day = date.getDate(); - if (month == 3 && day == 1) - return "Zero Discrimination Day"; - else if (month == 3 && day == 8) - return "International Women's Day"; - else if (month == 3 && day == 31) - return "Trans Day of Visibility"; - else if (month == 4 && day == 6) - return "International Asexuality Day"; - else if (month == 4 && day == 26) - return "Lesbian Visibility Day"; - else if (month == 5 && day == 17) - return "IDAHOBIT"; - else if (month == 5 && day == 19) - return "Agender Pride Day"; - else if (month == 5 && day == 25) - return "Pansexual and Panromantic Awareness & Visibility Day"; - else if (month == 6) - return "Pride Month"; - else if (month == 7 && day == 14) - return "Non-Binary People's Day"; - else if (month == 7 && day == 28) - return "Leilukin's Birthday"; - else if (month == 9 && day == 11) - return "Leilukin's Hub Anniversary"; - else if (month == 9 && day == 23) - return "Bi Visibility Day"; - else if (month == 10 && day == 8) - return "International Lesbian Day"; - else if (month == 10 && day == 11) - return "National Coming Out Day"; - else if (month == 10 && day == 17) - return "Genderfluid Visibility Week"; - else if (month == 10 && day == 24) - return "Ace Week"; - else if (month == 10 && day == 26) - return "Intersex Awareness Day"; + const currentYear = date.getFullYear(); + const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear(); + const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate; + + if (month === 3 && day === 1) + return { + blurb: `Today is Zero Discrimination Day`, + class: "flag-progress-intersex", + }; + else if (month === 3 && day === 8) + return { + blurb: `Today is International Women's Day}`, + class: "symbol-venus", + }; + else if (month === 3 && day === 31) + return { + blurb: `Today is Trans Day of Visibility`, + class: "flag-trans", + }; + else if (month === 4 && day === 6) + return { + blurb: `Today is International Asexuality Day`, + class: "flag-ace", + }; + else if (month === 4 && day === 26) + return { + blurb: `Today is Lesbian Visibility Day`, + class: "flag-lesbian", + }; + else if (month === 5 && day === 17) + return { + blurb: `Today is International Day Against Homophobia, Biphobia and Transphobia`, + class: "flag-progress", + }; + else if (month === 5 && day === 19) + return { + blurb: `Today is Agender Pride Day`, + class: "flag-agender", + }; + else if (month === 5 && day === 25) + return { + blurb: `Today is Pansexual and Panromantic Awareness and Visibility Day`, + class: "flag-pan", + }; + else if (month === 6) + return { + blurb: `Happy Pride Month!`, + class: "flag-progress-intersex", + }; + else if (month === 7 && day === 14) + return { + blurb: `Today is Non-Binary People's Day`, + 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 Bi Visibility Day`, + class: "flag-bi", + }; + else if (month === 10 && day === 8) + return { + blurb: `Today is International Lesbian Day`, + class: "flag-lesbian", + }; + else if (month === 10 && day === 11) + return { + blurb: `Today is National Coming Out Day`, + class: "flag-rainbow", + }; + else if (month === 10 && day === 17) + return { + blurb: `Today is the start of Genderfluid Visibility Week`, + class: "flag-genderfluid", + }; + else if (month === 10 && day === 24) + return { + blurb: `Today is the start of Ace Week`, + class: "flag-ace", + }; + else if (month === 10 && day === 26) + return { + blurb: `Today is Intersex Awareness Day`, + class: "flag-intersex", + }; else - return "No event"; - } - - 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 Zero Discrimination Day - `; - break; - case "International Women's Day": - return ` - Today is International Women's Day - `; - break; - case "Trans Day of Visibility": - return ` - Today is Trans Day of Visibility - `; - break; - case "International Asexuality Day": - return ` - Today is International Asexuality Day - `; - break; - case "Lesbian Visibility Day": - return ` - Today is Lesbian Visibility Day - `; - break; - case "IDAHOBIT": - return ` - Today is International Day Against Homophobia, Biphobia and Transphobia - `; - break; - case "Agender Pride Day": - return ` - Today is Agender Pride Day - `; - break; - case "Pansexual and Panromantic Awareness & Visibility Day": - return ` - Today is Pansexual and Panromantic Visibility Day - `; - break; - case "Pride Month": - return ` - Happy Pride Month! - `; - break; - case "Non-Binary People's Day": - return ` - Today is Non-Binary People's Day - `; - 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 Bi Visibility Day - `; - break; - case "International Lesbian Day": - return ` - Today is International Lesbian Day - `; - break; - case "National Coming Out Day": - return ` - Today is National Coming Out Day - `; - break; - case "Genderfluid Visibility Week": - return ` - Today is the start of Genderfluid Visibility Week - `; - break; - case "Ace Week": - return ` - Today is the start of Ace Week - `; - break; - case "Intersex Awareness Day": - return ` - Today is Intersex Awareness Day - `; - break; - default: - return ``; - } + return null; } diff --git a/_site/blog/posts/2024-03-06-i-received-a-lifetime-premium-membership-on-nexus-mods-for-free/index.html b/_site/blog/posts/2024-03-06-i-received-a-lifetime-premium-membership-on-nexus-mods-for-free/index.html index a6742a9b..f0a2fd8f 100644 --- a/_site/blog/posts/2024-03-06-i-received-a-lifetime-premium-membership-on-nexus-mods-for-free/index.html +++ b/_site/blog/posts/2024-03-06-i-received-a-lifetime-premium-membership-on-nexus-mods-for-free/index.html @@ -98,14 +98,12 @@ const todayEvent = getTodayEvent(); - if (todayEvent != "No event") { + if (todayEvent) { heroTopBarEl.classList.remove('hidden'); + heroTopBarEl.innerHTML = todayEvent.blurb; - if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); - } else { - headerImgEl.classList.add(getBanner(todayEvent)); - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); + if (todayEvent.class) { + headerImgEl.classList.add(todayEvent.class); } } @@ -114,196 +112,100 @@ const month = date.getMonth() + 1; const day = date.getDate(); - if (month == 3 && day == 1) - return "Zero Discrimination Day"; - else if (month == 3 && day == 8) - return "International Women's Day"; - else if (month == 3 && day == 31) - return "Trans Day of Visibility"; - else if (month == 4 && day == 6) - return "International Asexuality Day"; - else if (month == 4 && day == 26) - return "Lesbian Visibility Day"; - else if (month == 5 && day == 17) - return "IDAHOBIT"; - else if (month == 5 && day == 19) - return "Agender Pride Day"; - else if (month == 5 && day == 25) - return "Pansexual and Panromantic Awareness & Visibility Day"; - else if (month == 6) - return "Pride Month"; - else if (month == 7 && day == 14) - return "Non-Binary People's Day"; - else if (month == 7 && day == 28) - return "Leilukin's Birthday"; - else if (month == 9 && day == 11) - return "Leilukin's Hub Anniversary"; - else if (month == 9 && day == 23) - return "Bi Visibility Day"; - else if (month == 10 && day == 8) - return "International Lesbian Day"; - else if (month == 10 && day == 11) - return "National Coming Out Day"; - else if (month == 10 && day == 17) - return "Genderfluid Visibility Week"; - else if (month == 10 && day == 24) - return "Ace Week"; - else if (month == 10 && day == 26) - return "Intersex Awareness Day"; + const currentYear = date.getFullYear(); + const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear(); + const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate; + + if (month === 3 && day === 1) + return { + blurb: `Today is Zero Discrimination Day`, + class: "flag-progress-intersex", + }; + else if (month === 3 && day === 8) + return { + blurb: `Today is International Women's Day}`, + class: "symbol-venus", + }; + else if (month === 3 && day === 31) + return { + blurb: `Today is Trans Day of Visibility`, + class: "flag-trans", + }; + else if (month === 4 && day === 6) + return { + blurb: `Today is International Asexuality Day`, + class: "flag-ace", + }; + else if (month === 4 && day === 26) + return { + blurb: `Today is Lesbian Visibility Day`, + class: "flag-lesbian", + }; + else if (month === 5 && day === 17) + return { + blurb: `Today is International Day Against Homophobia, Biphobia and Transphobia`, + class: "flag-progress", + }; + else if (month === 5 && day === 19) + return { + blurb: `Today is Agender Pride Day`, + class: "flag-agender", + }; + else if (month === 5 && day === 25) + return { + blurb: `Today is Pansexual and Panromantic Awareness and Visibility Day`, + class: "flag-pan", + }; + else if (month === 6) + return { + blurb: `Happy Pride Month!`, + class: "flag-progress-intersex", + }; + else if (month === 7 && day === 14) + return { + blurb: `Today is Non-Binary People's Day`, + 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 Bi Visibility Day`, + class: "flag-bi", + }; + else if (month === 10 && day === 8) + return { + blurb: `Today is International Lesbian Day`, + class: "flag-lesbian", + }; + else if (month === 10 && day === 11) + return { + blurb: `Today is National Coming Out Day`, + class: "flag-rainbow", + }; + else if (month === 10 && day === 17) + return { + blurb: `Today is the start of Genderfluid Visibility Week`, + class: "flag-genderfluid", + }; + else if (month === 10 && day === 24) + return { + blurb: `Today is the start of Ace Week`, + class: "flag-ace", + }; + else if (month === 10 && day === 26) + return { + blurb: `Today is Intersex Awareness Day`, + class: "flag-intersex", + }; else - return "No event"; - } - - 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 Zero Discrimination Day - `; - break; - case "International Women's Day": - return ` - Today is International Women's Day - `; - break; - case "Trans Day of Visibility": - return ` - Today is Trans Day of Visibility - `; - break; - case "International Asexuality Day": - return ` - Today is International Asexuality Day - `; - break; - case "Lesbian Visibility Day": - return ` - Today is Lesbian Visibility Day - `; - break; - case "IDAHOBIT": - return ` - Today is International Day Against Homophobia, Biphobia and Transphobia - `; - break; - case "Agender Pride Day": - return ` - Today is Agender Pride Day - `; - break; - case "Pansexual and Panromantic Awareness & Visibility Day": - return ` - Today is Pansexual and Panromantic Visibility Day - `; - break; - case "Pride Month": - return ` - Happy Pride Month! - `; - break; - case "Non-Binary People's Day": - return ` - Today is Non-Binary People's Day - `; - 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 Bi Visibility Day - `; - break; - case "International Lesbian Day": - return ` - Today is International Lesbian Day - `; - break; - case "National Coming Out Day": - return ` - Today is National Coming Out Day - `; - break; - case "Genderfluid Visibility Week": - return ` - Today is the start of Genderfluid Visibility Week - `; - break; - case "Ace Week": - return ` - Today is the start of Ace Week - `; - break; - case "Intersex Awareness Day": - return ` - Today is Intersex Awareness Day - `; - break; - default: - return ``; - } + return null; } diff --git a/_site/blog/posts/2024-04-21-april-2024-leilukins-hub-overhaul-with-eleventy/index.html b/_site/blog/posts/2024-04-21-april-2024-leilukins-hub-overhaul-with-eleventy/index.html index eb6e4e8a..fafde338 100644 --- a/_site/blog/posts/2024-04-21-april-2024-leilukins-hub-overhaul-with-eleventy/index.html +++ b/_site/blog/posts/2024-04-21-april-2024-leilukins-hub-overhaul-with-eleventy/index.html @@ -98,14 +98,12 @@ const todayEvent = getTodayEvent(); - if (todayEvent != "No event") { + if (todayEvent) { heroTopBarEl.classList.remove('hidden'); + heroTopBarEl.innerHTML = todayEvent.blurb; - if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); - } else { - headerImgEl.classList.add(getBanner(todayEvent)); - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); + if (todayEvent.class) { + headerImgEl.classList.add(todayEvent.class); } } @@ -114,196 +112,100 @@ const month = date.getMonth() + 1; const day = date.getDate(); - if (month == 3 && day == 1) - return "Zero Discrimination Day"; - else if (month == 3 && day == 8) - return "International Women's Day"; - else if (month == 3 && day == 31) - return "Trans Day of Visibility"; - else if (month == 4 && day == 6) - return "International Asexuality Day"; - else if (month == 4 && day == 26) - return "Lesbian Visibility Day"; - else if (month == 5 && day == 17) - return "IDAHOBIT"; - else if (month == 5 && day == 19) - return "Agender Pride Day"; - else if (month == 5 && day == 25) - return "Pansexual and Panromantic Awareness & Visibility Day"; - else if (month == 6) - return "Pride Month"; - else if (month == 7 && day == 14) - return "Non-Binary People's Day"; - else if (month == 7 && day == 28) - return "Leilukin's Birthday"; - else if (month == 9 && day == 11) - return "Leilukin's Hub Anniversary"; - else if (month == 9 && day == 23) - return "Bi Visibility Day"; - else if (month == 10 && day == 8) - return "International Lesbian Day"; - else if (month == 10 && day == 11) - return "National Coming Out Day"; - else if (month == 10 && day == 17) - return "Genderfluid Visibility Week"; - else if (month == 10 && day == 24) - return "Ace Week"; - else if (month == 10 && day == 26) - return "Intersex Awareness Day"; + const currentYear = date.getFullYear(); + const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear(); + const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate; + + if (month === 3 && day === 1) + return { + blurb: `Today is Zero Discrimination Day`, + class: "flag-progress-intersex", + }; + else if (month === 3 && day === 8) + return { + blurb: `Today is International Women's Day}`, + class: "symbol-venus", + }; + else if (month === 3 && day === 31) + return { + blurb: `Today is Trans Day of Visibility`, + class: "flag-trans", + }; + else if (month === 4 && day === 6) + return { + blurb: `Today is International Asexuality Day`, + class: "flag-ace", + }; + else if (month === 4 && day === 26) + return { + blurb: `Today is Lesbian Visibility Day`, + class: "flag-lesbian", + }; + else if (month === 5 && day === 17) + return { + blurb: `Today is International Day Against Homophobia, Biphobia and Transphobia`, + class: "flag-progress", + }; + else if (month === 5 && day === 19) + return { + blurb: `Today is Agender Pride Day`, + class: "flag-agender", + }; + else if (month === 5 && day === 25) + return { + blurb: `Today is Pansexual and Panromantic Awareness and Visibility Day`, + class: "flag-pan", + }; + else if (month === 6) + return { + blurb: `Happy Pride Month!`, + class: "flag-progress-intersex", + }; + else if (month === 7 && day === 14) + return { + blurb: `Today is Non-Binary People's Day`, + 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 Bi Visibility Day`, + class: "flag-bi", + }; + else if (month === 10 && day === 8) + return { + blurb: `Today is International Lesbian Day`, + class: "flag-lesbian", + }; + else if (month === 10 && day === 11) + return { + blurb: `Today is National Coming Out Day`, + class: "flag-rainbow", + }; + else if (month === 10 && day === 17) + return { + blurb: `Today is the start of Genderfluid Visibility Week`, + class: "flag-genderfluid", + }; + else if (month === 10 && day === 24) + return { + blurb: `Today is the start of Ace Week`, + class: "flag-ace", + }; + else if (month === 10 && day === 26) + return { + blurb: `Today is Intersex Awareness Day`, + class: "flag-intersex", + }; else - return "No event"; - } - - 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 Zero Discrimination Day - `; - break; - case "International Women's Day": - return ` - Today is International Women's Day - `; - break; - case "Trans Day of Visibility": - return ` - Today is Trans Day of Visibility - `; - break; - case "International Asexuality Day": - return ` - Today is International Asexuality Day - `; - break; - case "Lesbian Visibility Day": - return ` - Today is Lesbian Visibility Day - `; - break; - case "IDAHOBIT": - return ` - Today is International Day Against Homophobia, Biphobia and Transphobia - `; - break; - case "Agender Pride Day": - return ` - Today is Agender Pride Day - `; - break; - case "Pansexual and Panromantic Awareness & Visibility Day": - return ` - Today is Pansexual and Panromantic Visibility Day - `; - break; - case "Pride Month": - return ` - Happy Pride Month! - `; - break; - case "Non-Binary People's Day": - return ` - Today is Non-Binary People's Day - `; - 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 Bi Visibility Day - `; - break; - case "International Lesbian Day": - return ` - Today is International Lesbian Day - `; - break; - case "National Coming Out Day": - return ` - Today is National Coming Out Day - `; - break; - case "Genderfluid Visibility Week": - return ` - Today is the start of Genderfluid Visibility Week - `; - break; - case "Ace Week": - return ` - Today is the start of Ace Week - `; - break; - case "Intersex Awareness Day": - return ` - Today is Intersex Awareness Day - `; - break; - default: - return ``; - } + return null; } diff --git a/_site/blog/posts/2024-04-27-lesbian-visibility-day1-year-anniversary-of-cassette-beasts/index.html b/_site/blog/posts/2024-04-27-lesbian-visibility-day1-year-anniversary-of-cassette-beasts/index.html index 206198f3..192cfb2a 100644 --- a/_site/blog/posts/2024-04-27-lesbian-visibility-day1-year-anniversary-of-cassette-beasts/index.html +++ b/_site/blog/posts/2024-04-27-lesbian-visibility-day1-year-anniversary-of-cassette-beasts/index.html @@ -98,14 +98,12 @@ const todayEvent = getTodayEvent(); - if (todayEvent != "No event") { + if (todayEvent) { heroTopBarEl.classList.remove('hidden'); + heroTopBarEl.innerHTML = todayEvent.blurb; - if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); - } else { - headerImgEl.classList.add(getBanner(todayEvent)); - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); + if (todayEvent.class) { + headerImgEl.classList.add(todayEvent.class); } } @@ -114,196 +112,100 @@ const month = date.getMonth() + 1; const day = date.getDate(); - if (month == 3 && day == 1) - return "Zero Discrimination Day"; - else if (month == 3 && day == 8) - return "International Women's Day"; - else if (month == 3 && day == 31) - return "Trans Day of Visibility"; - else if (month == 4 && day == 6) - return "International Asexuality Day"; - else if (month == 4 && day == 26) - return "Lesbian Visibility Day"; - else if (month == 5 && day == 17) - return "IDAHOBIT"; - else if (month == 5 && day == 19) - return "Agender Pride Day"; - else if (month == 5 && day == 25) - return "Pansexual and Panromantic Awareness & Visibility Day"; - else if (month == 6) - return "Pride Month"; - else if (month == 7 && day == 14) - return "Non-Binary People's Day"; - else if (month == 7 && day == 28) - return "Leilukin's Birthday"; - else if (month == 9 && day == 11) - return "Leilukin's Hub Anniversary"; - else if (month == 9 && day == 23) - return "Bi Visibility Day"; - else if (month == 10 && day == 8) - return "International Lesbian Day"; - else if (month == 10 && day == 11) - return "National Coming Out Day"; - else if (month == 10 && day == 17) - return "Genderfluid Visibility Week"; - else if (month == 10 && day == 24) - return "Ace Week"; - else if (month == 10 && day == 26) - return "Intersex Awareness Day"; + const currentYear = date.getFullYear(); + const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear(); + const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate; + + if (month === 3 && day === 1) + return { + blurb: `Today is Zero Discrimination Day`, + class: "flag-progress-intersex", + }; + else if (month === 3 && day === 8) + return { + blurb: `Today is International Women's Day}`, + class: "symbol-venus", + }; + else if (month === 3 && day === 31) + return { + blurb: `Today is Trans Day of Visibility`, + class: "flag-trans", + }; + else if (month === 4 && day === 6) + return { + blurb: `Today is International Asexuality Day`, + class: "flag-ace", + }; + else if (month === 4 && day === 26) + return { + blurb: `Today is Lesbian Visibility Day`, + class: "flag-lesbian", + }; + else if (month === 5 && day === 17) + return { + blurb: `Today is International Day Against Homophobia, Biphobia and Transphobia`, + class: "flag-progress", + }; + else if (month === 5 && day === 19) + return { + blurb: `Today is Agender Pride Day`, + class: "flag-agender", + }; + else if (month === 5 && day === 25) + return { + blurb: `Today is Pansexual and Panromantic Awareness and Visibility Day`, + class: "flag-pan", + }; + else if (month === 6) + return { + blurb: `Happy Pride Month!`, + class: "flag-progress-intersex", + }; + else if (month === 7 && day === 14) + return { + blurb: `Today is Non-Binary People's Day`, + 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 Bi Visibility Day`, + class: "flag-bi", + }; + else if (month === 10 && day === 8) + return { + blurb: `Today is International Lesbian Day`, + class: "flag-lesbian", + }; + else if (month === 10 && day === 11) + return { + blurb: `Today is National Coming Out Day`, + class: "flag-rainbow", + }; + else if (month === 10 && day === 17) + return { + blurb: `Today is the start of Genderfluid Visibility Week`, + class: "flag-genderfluid", + }; + else if (month === 10 && day === 24) + return { + blurb: `Today is the start of Ace Week`, + class: "flag-ace", + }; + else if (month === 10 && day === 26) + return { + blurb: `Today is Intersex Awareness Day`, + class: "flag-intersex", + }; else - return "No event"; - } - - 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 Zero Discrimination Day - `; - break; - case "International Women's Day": - return ` - Today is International Women's Day - `; - break; - case "Trans Day of Visibility": - return ` - Today is Trans Day of Visibility - `; - break; - case "International Asexuality Day": - return ` - Today is International Asexuality Day - `; - break; - case "Lesbian Visibility Day": - return ` - Today is Lesbian Visibility Day - `; - break; - case "IDAHOBIT": - return ` - Today is International Day Against Homophobia, Biphobia and Transphobia - `; - break; - case "Agender Pride Day": - return ` - Today is Agender Pride Day - `; - break; - case "Pansexual and Panromantic Awareness & Visibility Day": - return ` - Today is Pansexual and Panromantic Visibility Day - `; - break; - case "Pride Month": - return ` - Happy Pride Month! - `; - break; - case "Non-Binary People's Day": - return ` - Today is Non-Binary People's Day - `; - 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 Bi Visibility Day - `; - break; - case "International Lesbian Day": - return ` - Today is International Lesbian Day - `; - break; - case "National Coming Out Day": - return ` - Today is National Coming Out Day - `; - break; - case "Genderfluid Visibility Week": - return ` - Today is the start of Genderfluid Visibility Week - `; - break; - case "Ace Week": - return ` - Today is the start of Ace Week - `; - break; - case "Intersex Awareness Day": - return ` - Today is Intersex Awareness Day - `; - break; - default: - return ``; - } + return null; } diff --git a/_site/blog/posts/index.html b/_site/blog/posts/index.html index 06002b6b..a0331a2c 100644 --- a/_site/blog/posts/index.html +++ b/_site/blog/posts/index.html @@ -98,14 +98,12 @@ const todayEvent = getTodayEvent(); - if (todayEvent != "No event") { + if (todayEvent) { heroTopBarEl.classList.remove('hidden'); + heroTopBarEl.innerHTML = todayEvent.blurb; - if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); - } else { - headerImgEl.classList.add(getBanner(todayEvent)); - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); + if (todayEvent.class) { + headerImgEl.classList.add(todayEvent.class); } } @@ -114,196 +112,100 @@ const month = date.getMonth() + 1; const day = date.getDate(); - if (month == 3 && day == 1) - return "Zero Discrimination Day"; - else if (month == 3 && day == 8) - return "International Women's Day"; - else if (month == 3 && day == 31) - return "Trans Day of Visibility"; - else if (month == 4 && day == 6) - return "International Asexuality Day"; - else if (month == 4 && day == 26) - return "Lesbian Visibility Day"; - else if (month == 5 && day == 17) - return "IDAHOBIT"; - else if (month == 5 && day == 19) - return "Agender Pride Day"; - else if (month == 5 && day == 25) - return "Pansexual and Panromantic Awareness & Visibility Day"; - else if (month == 6) - return "Pride Month"; - else if (month == 7 && day == 14) - return "Non-Binary People's Day"; - else if (month == 7 && day == 28) - return "Leilukin's Birthday"; - else if (month == 9 && day == 11) - return "Leilukin's Hub Anniversary"; - else if (month == 9 && day == 23) - return "Bi Visibility Day"; - else if (month == 10 && day == 8) - return "International Lesbian Day"; - else if (month == 10 && day == 11) - return "National Coming Out Day"; - else if (month == 10 && day == 17) - return "Genderfluid Visibility Week"; - else if (month == 10 && day == 24) - return "Ace Week"; - else if (month == 10 && day == 26) - return "Intersex Awareness Day"; + const currentYear = date.getFullYear(); + const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear(); + const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate; + + if (month === 3 && day === 1) + return { + blurb: `Today is Zero Discrimination Day`, + class: "flag-progress-intersex", + }; + else if (month === 3 && day === 8) + return { + blurb: `Today is International Women's Day}`, + class: "symbol-venus", + }; + else if (month === 3 && day === 31) + return { + blurb: `Today is Trans Day of Visibility`, + class: "flag-trans", + }; + else if (month === 4 && day === 6) + return { + blurb: `Today is International Asexuality Day`, + class: "flag-ace", + }; + else if (month === 4 && day === 26) + return { + blurb: `Today is Lesbian Visibility Day`, + class: "flag-lesbian", + }; + else if (month === 5 && day === 17) + return { + blurb: `Today is International Day Against Homophobia, Biphobia and Transphobia`, + class: "flag-progress", + }; + else if (month === 5 && day === 19) + return { + blurb: `Today is Agender Pride Day`, + class: "flag-agender", + }; + else if (month === 5 && day === 25) + return { + blurb: `Today is Pansexual and Panromantic Awareness and Visibility Day`, + class: "flag-pan", + }; + else if (month === 6) + return { + blurb: `Happy Pride Month!`, + class: "flag-progress-intersex", + }; + else if (month === 7 && day === 14) + return { + blurb: `Today is Non-Binary People's Day`, + 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 Bi Visibility Day`, + class: "flag-bi", + }; + else if (month === 10 && day === 8) + return { + blurb: `Today is International Lesbian Day`, + class: "flag-lesbian", + }; + else if (month === 10 && day === 11) + return { + blurb: `Today is National Coming Out Day`, + class: "flag-rainbow", + }; + else if (month === 10 && day === 17) + return { + blurb: `Today is the start of Genderfluid Visibility Week`, + class: "flag-genderfluid", + }; + else if (month === 10 && day === 24) + return { + blurb: `Today is the start of Ace Week`, + class: "flag-ace", + }; + else if (month === 10 && day === 26) + return { + blurb: `Today is Intersex Awareness Day`, + class: "flag-intersex", + }; else - return "No event"; - } - - 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 Zero Discrimination Day - `; - break; - case "International Women's Day": - return ` - Today is International Women's Day - `; - break; - case "Trans Day of Visibility": - return ` - Today is Trans Day of Visibility - `; - break; - case "International Asexuality Day": - return ` - Today is International Asexuality Day - `; - break; - case "Lesbian Visibility Day": - return ` - Today is Lesbian Visibility Day - `; - break; - case "IDAHOBIT": - return ` - Today is International Day Against Homophobia, Biphobia and Transphobia - `; - break; - case "Agender Pride Day": - return ` - Today is Agender Pride Day - `; - break; - case "Pansexual and Panromantic Awareness & Visibility Day": - return ` - Today is Pansexual and Panromantic Visibility Day - `; - break; - case "Pride Month": - return ` - Happy Pride Month! - `; - break; - case "Non-Binary People's Day": - return ` - Today is Non-Binary People's Day - `; - 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 Bi Visibility Day - `; - break; - case "International Lesbian Day": - return ` - Today is International Lesbian Day - `; - break; - case "National Coming Out Day": - return ` - Today is National Coming Out Day - `; - break; - case "Genderfluid Visibility Week": - return ` - Today is the start of Genderfluid Visibility Week - `; - break; - case "Ace Week": - return ` - Today is the start of Ace Week - `; - break; - case "Intersex Awareness Day": - return ` - Today is Intersex Awareness Day - `; - break; - default: - return ``; - } + return null; } diff --git a/_site/categories/a-summers-end/index.html b/_site/categories/a-summers-end/index.html index 0ec219a7..a281b4d7 100644 --- a/_site/categories/a-summers-end/index.html +++ b/_site/categories/a-summers-end/index.html @@ -98,14 +98,12 @@ const todayEvent = getTodayEvent(); - if (todayEvent != "No event") { + if (todayEvent) { heroTopBarEl.classList.remove('hidden'); + heroTopBarEl.innerHTML = todayEvent.blurb; - if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); - } else { - headerImgEl.classList.add(getBanner(todayEvent)); - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); + if (todayEvent.class) { + headerImgEl.classList.add(todayEvent.class); } } @@ -114,196 +112,100 @@ const month = date.getMonth() + 1; const day = date.getDate(); - if (month == 3 && day == 1) - return "Zero Discrimination Day"; - else if (month == 3 && day == 8) - return "International Women's Day"; - else if (month == 3 && day == 31) - return "Trans Day of Visibility"; - else if (month == 4 && day == 6) - return "International Asexuality Day"; - else if (month == 4 && day == 26) - return "Lesbian Visibility Day"; - else if (month == 5 && day == 17) - return "IDAHOBIT"; - else if (month == 5 && day == 19) - return "Agender Pride Day"; - else if (month == 5 && day == 25) - return "Pansexual and Panromantic Awareness & Visibility Day"; - else if (month == 6) - return "Pride Month"; - else if (month == 7 && day == 14) - return "Non-Binary People's Day"; - else if (month == 7 && day == 28) - return "Leilukin's Birthday"; - else if (month == 9 && day == 11) - return "Leilukin's Hub Anniversary"; - else if (month == 9 && day == 23) - return "Bi Visibility Day"; - else if (month == 10 && day == 8) - return "International Lesbian Day"; - else if (month == 10 && day == 11) - return "National Coming Out Day"; - else if (month == 10 && day == 17) - return "Genderfluid Visibility Week"; - else if (month == 10 && day == 24) - return "Ace Week"; - else if (month == 10 && day == 26) - return "Intersex Awareness Day"; + const currentYear = date.getFullYear(); + const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear(); + const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate; + + if (month === 3 && day === 1) + return { + blurb: `Today is Zero Discrimination Day`, + class: "flag-progress-intersex", + }; + else if (month === 3 && day === 8) + return { + blurb: `Today is International Women's Day}`, + class: "symbol-venus", + }; + else if (month === 3 && day === 31) + return { + blurb: `Today is Trans Day of Visibility`, + class: "flag-trans", + }; + else if (month === 4 && day === 6) + return { + blurb: `Today is International Asexuality Day`, + class: "flag-ace", + }; + else if (month === 4 && day === 26) + return { + blurb: `Today is Lesbian Visibility Day`, + class: "flag-lesbian", + }; + else if (month === 5 && day === 17) + return { + blurb: `Today is International Day Against Homophobia, Biphobia and Transphobia`, + class: "flag-progress", + }; + else if (month === 5 && day === 19) + return { + blurb: `Today is Agender Pride Day`, + class: "flag-agender", + }; + else if (month === 5 && day === 25) + return { + blurb: `Today is Pansexual and Panromantic Awareness and Visibility Day`, + class: "flag-pan", + }; + else if (month === 6) + return { + blurb: `Happy Pride Month!`, + class: "flag-progress-intersex", + }; + else if (month === 7 && day === 14) + return { + blurb: `Today is Non-Binary People's Day`, + 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 Bi Visibility Day`, + class: "flag-bi", + }; + else if (month === 10 && day === 8) + return { + blurb: `Today is International Lesbian Day`, + class: "flag-lesbian", + }; + else if (month === 10 && day === 11) + return { + blurb: `Today is National Coming Out Day`, + class: "flag-rainbow", + }; + else if (month === 10 && day === 17) + return { + blurb: `Today is the start of Genderfluid Visibility Week`, + class: "flag-genderfluid", + }; + else if (month === 10 && day === 24) + return { + blurb: `Today is the start of Ace Week`, + class: "flag-ace", + }; + else if (month === 10 && day === 26) + return { + blurb: `Today is Intersex Awareness Day`, + class: "flag-intersex", + }; else - return "No event"; - } - - 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 Zero Discrimination Day - `; - break; - case "International Women's Day": - return ` - Today is International Women's Day - `; - break; - case "Trans Day of Visibility": - return ` - Today is Trans Day of Visibility - `; - break; - case "International Asexuality Day": - return ` - Today is International Asexuality Day - `; - break; - case "Lesbian Visibility Day": - return ` - Today is Lesbian Visibility Day - `; - break; - case "IDAHOBIT": - return ` - Today is International Day Against Homophobia, Biphobia and Transphobia - `; - break; - case "Agender Pride Day": - return ` - Today is Agender Pride Day - `; - break; - case "Pansexual and Panromantic Awareness & Visibility Day": - return ` - Today is Pansexual and Panromantic Visibility Day - `; - break; - case "Pride Month": - return ` - Happy Pride Month! - `; - break; - case "Non-Binary People's Day": - return ` - Today is Non-Binary People's Day - `; - 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 Bi Visibility Day - `; - break; - case "International Lesbian Day": - return ` - Today is International Lesbian Day - `; - break; - case "National Coming Out Day": - return ` - Today is National Coming Out Day - `; - break; - case "Genderfluid Visibility Week": - return ` - Today is the start of Genderfluid Visibility Week - `; - break; - case "Ace Week": - return ` - Today is the start of Ace Week - `; - break; - case "Intersex Awareness Day": - return ` - Today is Intersex Awareness Day - `; - break; - default: - return ``; - } + return null; } diff --git a/_site/categories/anti-harry-potter/index.html b/_site/categories/anti-harry-potter/index.html index fb92050b..d0392546 100644 --- a/_site/categories/anti-harry-potter/index.html +++ b/_site/categories/anti-harry-potter/index.html @@ -98,14 +98,12 @@ const todayEvent = getTodayEvent(); - if (todayEvent != "No event") { + if (todayEvent) { heroTopBarEl.classList.remove('hidden'); + heroTopBarEl.innerHTML = todayEvent.blurb; - if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); - } else { - headerImgEl.classList.add(getBanner(todayEvent)); - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); + if (todayEvent.class) { + headerImgEl.classList.add(todayEvent.class); } } @@ -114,196 +112,100 @@ const month = date.getMonth() + 1; const day = date.getDate(); - if (month == 3 && day == 1) - return "Zero Discrimination Day"; - else if (month == 3 && day == 8) - return "International Women's Day"; - else if (month == 3 && day == 31) - return "Trans Day of Visibility"; - else if (month == 4 && day == 6) - return "International Asexuality Day"; - else if (month == 4 && day == 26) - return "Lesbian Visibility Day"; - else if (month == 5 && day == 17) - return "IDAHOBIT"; - else if (month == 5 && day == 19) - return "Agender Pride Day"; - else if (month == 5 && day == 25) - return "Pansexual and Panromantic Awareness & Visibility Day"; - else if (month == 6) - return "Pride Month"; - else if (month == 7 && day == 14) - return "Non-Binary People's Day"; - else if (month == 7 && day == 28) - return "Leilukin's Birthday"; - else if (month == 9 && day == 11) - return "Leilukin's Hub Anniversary"; - else if (month == 9 && day == 23) - return "Bi Visibility Day"; - else if (month == 10 && day == 8) - return "International Lesbian Day"; - else if (month == 10 && day == 11) - return "National Coming Out Day"; - else if (month == 10 && day == 17) - return "Genderfluid Visibility Week"; - else if (month == 10 && day == 24) - return "Ace Week"; - else if (month == 10 && day == 26) - return "Intersex Awareness Day"; + const currentYear = date.getFullYear(); + const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear(); + const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate; + + if (month === 3 && day === 1) + return { + blurb: `Today is Zero Discrimination Day`, + class: "flag-progress-intersex", + }; + else if (month === 3 && day === 8) + return { + blurb: `Today is International Women's Day}`, + class: "symbol-venus", + }; + else if (month === 3 && day === 31) + return { + blurb: `Today is Trans Day of Visibility`, + class: "flag-trans", + }; + else if (month === 4 && day === 6) + return { + blurb: `Today is International Asexuality Day`, + class: "flag-ace", + }; + else if (month === 4 && day === 26) + return { + blurb: `Today is Lesbian Visibility Day`, + class: "flag-lesbian", + }; + else if (month === 5 && day === 17) + return { + blurb: `Today is International Day Against Homophobia, Biphobia and Transphobia`, + class: "flag-progress", + }; + else if (month === 5 && day === 19) + return { + blurb: `Today is Agender Pride Day`, + class: "flag-agender", + }; + else if (month === 5 && day === 25) + return { + blurb: `Today is Pansexual and Panromantic Awareness and Visibility Day`, + class: "flag-pan", + }; + else if (month === 6) + return { + blurb: `Happy Pride Month!`, + class: "flag-progress-intersex", + }; + else if (month === 7 && day === 14) + return { + blurb: `Today is Non-Binary People's Day`, + 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 Bi Visibility Day`, + class: "flag-bi", + }; + else if (month === 10 && day === 8) + return { + blurb: `Today is International Lesbian Day`, + class: "flag-lesbian", + }; + else if (month === 10 && day === 11) + return { + blurb: `Today is National Coming Out Day`, + class: "flag-rainbow", + }; + else if (month === 10 && day === 17) + return { + blurb: `Today is the start of Genderfluid Visibility Week`, + class: "flag-genderfluid", + }; + else if (month === 10 && day === 24) + return { + blurb: `Today is the start of Ace Week`, + class: "flag-ace", + }; + else if (month === 10 && day === 26) + return { + blurb: `Today is Intersex Awareness Day`, + class: "flag-intersex", + }; else - return "No event"; - } - - 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 Zero Discrimination Day - `; - break; - case "International Women's Day": - return ` - Today is International Women's Day - `; - break; - case "Trans Day of Visibility": - return ` - Today is Trans Day of Visibility - `; - break; - case "International Asexuality Day": - return ` - Today is International Asexuality Day - `; - break; - case "Lesbian Visibility Day": - return ` - Today is Lesbian Visibility Day - `; - break; - case "IDAHOBIT": - return ` - Today is International Day Against Homophobia, Biphobia and Transphobia - `; - break; - case "Agender Pride Day": - return ` - Today is Agender Pride Day - `; - break; - case "Pansexual and Panromantic Awareness & Visibility Day": - return ` - Today is Pansexual and Panromantic Visibility Day - `; - break; - case "Pride Month": - return ` - Happy Pride Month! - `; - break; - case "Non-Binary People's Day": - return ` - Today is Non-Binary People's Day - `; - 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 Bi Visibility Day - `; - break; - case "International Lesbian Day": - return ` - Today is International Lesbian Day - `; - break; - case "National Coming Out Day": - return ` - Today is National Coming Out Day - `; - break; - case "Genderfluid Visibility Week": - return ` - Today is the start of Genderfluid Visibility Week - `; - break; - case "Ace Week": - return ` - Today is the start of Ace Week - `; - break; - case "Intersex Awareness Day": - return ` - Today is Intersex Awareness Day - `; - break; - default: - return ``; - } + return null; } diff --git a/_site/categories/anti-jk-rowling/index.html b/_site/categories/anti-jk-rowling/index.html index 7a37744d..696877a9 100644 --- a/_site/categories/anti-jk-rowling/index.html +++ b/_site/categories/anti-jk-rowling/index.html @@ -98,14 +98,12 @@ const todayEvent = getTodayEvent(); - if (todayEvent != "No event") { + if (todayEvent) { heroTopBarEl.classList.remove('hidden'); + heroTopBarEl.innerHTML = todayEvent.blurb; - if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); - } else { - headerImgEl.classList.add(getBanner(todayEvent)); - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); + if (todayEvent.class) { + headerImgEl.classList.add(todayEvent.class); } } @@ -114,196 +112,100 @@ const month = date.getMonth() + 1; const day = date.getDate(); - if (month == 3 && day == 1) - return "Zero Discrimination Day"; - else if (month == 3 && day == 8) - return "International Women's Day"; - else if (month == 3 && day == 31) - return "Trans Day of Visibility"; - else if (month == 4 && day == 6) - return "International Asexuality Day"; - else if (month == 4 && day == 26) - return "Lesbian Visibility Day"; - else if (month == 5 && day == 17) - return "IDAHOBIT"; - else if (month == 5 && day == 19) - return "Agender Pride Day"; - else if (month == 5 && day == 25) - return "Pansexual and Panromantic Awareness & Visibility Day"; - else if (month == 6) - return "Pride Month"; - else if (month == 7 && day == 14) - return "Non-Binary People's Day"; - else if (month == 7 && day == 28) - return "Leilukin's Birthday"; - else if (month == 9 && day == 11) - return "Leilukin's Hub Anniversary"; - else if (month == 9 && day == 23) - return "Bi Visibility Day"; - else if (month == 10 && day == 8) - return "International Lesbian Day"; - else if (month == 10 && day == 11) - return "National Coming Out Day"; - else if (month == 10 && day == 17) - return "Genderfluid Visibility Week"; - else if (month == 10 && day == 24) - return "Ace Week"; - else if (month == 10 && day == 26) - return "Intersex Awareness Day"; + const currentYear = date.getFullYear(); + const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear(); + const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate; + + if (month === 3 && day === 1) + return { + blurb: `Today is Zero Discrimination Day`, + class: "flag-progress-intersex", + }; + else if (month === 3 && day === 8) + return { + blurb: `Today is International Women's Day}`, + class: "symbol-venus", + }; + else if (month === 3 && day === 31) + return { + blurb: `Today is Trans Day of Visibility`, + class: "flag-trans", + }; + else if (month === 4 && day === 6) + return { + blurb: `Today is International Asexuality Day`, + class: "flag-ace", + }; + else if (month === 4 && day === 26) + return { + blurb: `Today is Lesbian Visibility Day`, + class: "flag-lesbian", + }; + else if (month === 5 && day === 17) + return { + blurb: `Today is International Day Against Homophobia, Biphobia and Transphobia`, + class: "flag-progress", + }; + else if (month === 5 && day === 19) + return { + blurb: `Today is Agender Pride Day`, + class: "flag-agender", + }; + else if (month === 5 && day === 25) + return { + blurb: `Today is Pansexual and Panromantic Awareness and Visibility Day`, + class: "flag-pan", + }; + else if (month === 6) + return { + blurb: `Happy Pride Month!`, + class: "flag-progress-intersex", + }; + else if (month === 7 && day === 14) + return { + blurb: `Today is Non-Binary People's Day`, + 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 Bi Visibility Day`, + class: "flag-bi", + }; + else if (month === 10 && day === 8) + return { + blurb: `Today is International Lesbian Day`, + class: "flag-lesbian", + }; + else if (month === 10 && day === 11) + return { + blurb: `Today is National Coming Out Day`, + class: "flag-rainbow", + }; + else if (month === 10 && day === 17) + return { + blurb: `Today is the start of Genderfluid Visibility Week`, + class: "flag-genderfluid", + }; + else if (month === 10 && day === 24) + return { + blurb: `Today is the start of Ace Week`, + class: "flag-ace", + }; + else if (month === 10 && day === 26) + return { + blurb: `Today is Intersex Awareness Day`, + class: "flag-intersex", + }; else - return "No event"; - } - - 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 Zero Discrimination Day - `; - break; - case "International Women's Day": - return ` - Today is International Women's Day - `; - break; - case "Trans Day of Visibility": - return ` - Today is Trans Day of Visibility - `; - break; - case "International Asexuality Day": - return ` - Today is International Asexuality Day - `; - break; - case "Lesbian Visibility Day": - return ` - Today is Lesbian Visibility Day - `; - break; - case "IDAHOBIT": - return ` - Today is International Day Against Homophobia, Biphobia and Transphobia - `; - break; - case "Agender Pride Day": - return ` - Today is Agender Pride Day - `; - break; - case "Pansexual and Panromantic Awareness & Visibility Day": - return ` - Today is Pansexual and Panromantic Visibility Day - `; - break; - case "Pride Month": - return ` - Happy Pride Month! - `; - break; - case "Non-Binary People's Day": - return ` - Today is Non-Binary People's Day - `; - 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 Bi Visibility Day - `; - break; - case "International Lesbian Day": - return ` - Today is International Lesbian Day - `; - break; - case "National Coming Out Day": - return ` - Today is National Coming Out Day - `; - break; - case "Genderfluid Visibility Week": - return ` - Today is the start of Genderfluid Visibility Week - `; - break; - case "Ace Week": - return ` - Today is the start of Ace Week - `; - break; - case "Intersex Awareness Day": - return ` - Today is Intersex Awareness Day - `; - break; - default: - return ``; - } + return null; } diff --git a/_site/categories/cassette-beasts/index.html b/_site/categories/cassette-beasts/index.html index 19c082af..537f5aa9 100644 --- a/_site/categories/cassette-beasts/index.html +++ b/_site/categories/cassette-beasts/index.html @@ -98,14 +98,12 @@ const todayEvent = getTodayEvent(); - if (todayEvent != "No event") { + if (todayEvent) { heroTopBarEl.classList.remove('hidden'); + heroTopBarEl.innerHTML = todayEvent.blurb; - if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); - } else { - headerImgEl.classList.add(getBanner(todayEvent)); - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); + if (todayEvent.class) { + headerImgEl.classList.add(todayEvent.class); } } @@ -114,196 +112,100 @@ const month = date.getMonth() + 1; const day = date.getDate(); - if (month == 3 && day == 1) - return "Zero Discrimination Day"; - else if (month == 3 && day == 8) - return "International Women's Day"; - else if (month == 3 && day == 31) - return "Trans Day of Visibility"; - else if (month == 4 && day == 6) - return "International Asexuality Day"; - else if (month == 4 && day == 26) - return "Lesbian Visibility Day"; - else if (month == 5 && day == 17) - return "IDAHOBIT"; - else if (month == 5 && day == 19) - return "Agender Pride Day"; - else if (month == 5 && day == 25) - return "Pansexual and Panromantic Awareness & Visibility Day"; - else if (month == 6) - return "Pride Month"; - else if (month == 7 && day == 14) - return "Non-Binary People's Day"; - else if (month == 7 && day == 28) - return "Leilukin's Birthday"; - else if (month == 9 && day == 11) - return "Leilukin's Hub Anniversary"; - else if (month == 9 && day == 23) - return "Bi Visibility Day"; - else if (month == 10 && day == 8) - return "International Lesbian Day"; - else if (month == 10 && day == 11) - return "National Coming Out Day"; - else if (month == 10 && day == 17) - return "Genderfluid Visibility Week"; - else if (month == 10 && day == 24) - return "Ace Week"; - else if (month == 10 && day == 26) - return "Intersex Awareness Day"; + const currentYear = date.getFullYear(); + const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear(); + const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate; + + if (month === 3 && day === 1) + return { + blurb: `Today is Zero Discrimination Day`, + class: "flag-progress-intersex", + }; + else if (month === 3 && day === 8) + return { + blurb: `Today is International Women's Day}`, + class: "symbol-venus", + }; + else if (month === 3 && day === 31) + return { + blurb: `Today is Trans Day of Visibility`, + class: "flag-trans", + }; + else if (month === 4 && day === 6) + return { + blurb: `Today is International Asexuality Day`, + class: "flag-ace", + }; + else if (month === 4 && day === 26) + return { + blurb: `Today is Lesbian Visibility Day`, + class: "flag-lesbian", + }; + else if (month === 5 && day === 17) + return { + blurb: `Today is International Day Against Homophobia, Biphobia and Transphobia`, + class: "flag-progress", + }; + else if (month === 5 && day === 19) + return { + blurb: `Today is Agender Pride Day`, + class: "flag-agender", + }; + else if (month === 5 && day === 25) + return { + blurb: `Today is Pansexual and Panromantic Awareness and Visibility Day`, + class: "flag-pan", + }; + else if (month === 6) + return { + blurb: `Happy Pride Month!`, + class: "flag-progress-intersex", + }; + else if (month === 7 && day === 14) + return { + blurb: `Today is Non-Binary People's Day`, + 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 Bi Visibility Day`, + class: "flag-bi", + }; + else if (month === 10 && day === 8) + return { + blurb: `Today is International Lesbian Day`, + class: "flag-lesbian", + }; + else if (month === 10 && day === 11) + return { + blurb: `Today is National Coming Out Day`, + class: "flag-rainbow", + }; + else if (month === 10 && day === 17) + return { + blurb: `Today is the start of Genderfluid Visibility Week`, + class: "flag-genderfluid", + }; + else if (month === 10 && day === 24) + return { + blurb: `Today is the start of Ace Week`, + class: "flag-ace", + }; + else if (month === 10 && day === 26) + return { + blurb: `Today is Intersex Awareness Day`, + class: "flag-intersex", + }; else - return "No event"; - } - - 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 Zero Discrimination Day - `; - break; - case "International Women's Day": - return ` - Today is International Women's Day - `; - break; - case "Trans Day of Visibility": - return ` - Today is Trans Day of Visibility - `; - break; - case "International Asexuality Day": - return ` - Today is International Asexuality Day - `; - break; - case "Lesbian Visibility Day": - return ` - Today is Lesbian Visibility Day - `; - break; - case "IDAHOBIT": - return ` - Today is International Day Against Homophobia, Biphobia and Transphobia - `; - break; - case "Agender Pride Day": - return ` - Today is Agender Pride Day - `; - break; - case "Pansexual and Panromantic Awareness & Visibility Day": - return ` - Today is Pansexual and Panromantic Visibility Day - `; - break; - case "Pride Month": - return ` - Happy Pride Month! - `; - break; - case "Non-Binary People's Day": - return ` - Today is Non-Binary People's Day - `; - 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 Bi Visibility Day - `; - break; - case "International Lesbian Day": - return ` - Today is International Lesbian Day - `; - break; - case "National Coming Out Day": - return ` - Today is National Coming Out Day - `; - break; - case "Genderfluid Visibility Week": - return ` - Today is the start of Genderfluid Visibility Week - `; - break; - case "Ace Week": - return ` - Today is the start of Ace Week - `; - break; - case "Intersex Awareness Day": - return ` - Today is Intersex Awareness Day - `; - break; - default: - return ``; - } + return null; } diff --git a/_site/categories/dracula-daily/index.html b/_site/categories/dracula-daily/index.html index 9aaa96d8..c72536fa 100644 --- a/_site/categories/dracula-daily/index.html +++ b/_site/categories/dracula-daily/index.html @@ -98,14 +98,12 @@ const todayEvent = getTodayEvent(); - if (todayEvent != "No event") { + if (todayEvent) { heroTopBarEl.classList.remove('hidden'); + heroTopBarEl.innerHTML = todayEvent.blurb; - if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); - } else { - headerImgEl.classList.add(getBanner(todayEvent)); - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); + if (todayEvent.class) { + headerImgEl.classList.add(todayEvent.class); } } @@ -114,196 +112,100 @@ const month = date.getMonth() + 1; const day = date.getDate(); - if (month == 3 && day == 1) - return "Zero Discrimination Day"; - else if (month == 3 && day == 8) - return "International Women's Day"; - else if (month == 3 && day == 31) - return "Trans Day of Visibility"; - else if (month == 4 && day == 6) - return "International Asexuality Day"; - else if (month == 4 && day == 26) - return "Lesbian Visibility Day"; - else if (month == 5 && day == 17) - return "IDAHOBIT"; - else if (month == 5 && day == 19) - return "Agender Pride Day"; - else if (month == 5 && day == 25) - return "Pansexual and Panromantic Awareness & Visibility Day"; - else if (month == 6) - return "Pride Month"; - else if (month == 7 && day == 14) - return "Non-Binary People's Day"; - else if (month == 7 && day == 28) - return "Leilukin's Birthday"; - else if (month == 9 && day == 11) - return "Leilukin's Hub Anniversary"; - else if (month == 9 && day == 23) - return "Bi Visibility Day"; - else if (month == 10 && day == 8) - return "International Lesbian Day"; - else if (month == 10 && day == 11) - return "National Coming Out Day"; - else if (month == 10 && day == 17) - return "Genderfluid Visibility Week"; - else if (month == 10 && day == 24) - return "Ace Week"; - else if (month == 10 && day == 26) - return "Intersex Awareness Day"; + const currentYear = date.getFullYear(); + const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear(); + const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate; + + if (month === 3 && day === 1) + return { + blurb: `Today is Zero Discrimination Day`, + class: "flag-progress-intersex", + }; + else if (month === 3 && day === 8) + return { + blurb: `Today is International Women's Day}`, + class: "symbol-venus", + }; + else if (month === 3 && day === 31) + return { + blurb: `Today is Trans Day of Visibility`, + class: "flag-trans", + }; + else if (month === 4 && day === 6) + return { + blurb: `Today is International Asexuality Day`, + class: "flag-ace", + }; + else if (month === 4 && day === 26) + return { + blurb: `Today is Lesbian Visibility Day`, + class: "flag-lesbian", + }; + else if (month === 5 && day === 17) + return { + blurb: `Today is International Day Against Homophobia, Biphobia and Transphobia`, + class: "flag-progress", + }; + else if (month === 5 && day === 19) + return { + blurb: `Today is Agender Pride Day`, + class: "flag-agender", + }; + else if (month === 5 && day === 25) + return { + blurb: `Today is Pansexual and Panromantic Awareness and Visibility Day`, + class: "flag-pan", + }; + else if (month === 6) + return { + blurb: `Happy Pride Month!`, + class: "flag-progress-intersex", + }; + else if (month === 7 && day === 14) + return { + blurb: `Today is Non-Binary People's Day`, + 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 Bi Visibility Day`, + class: "flag-bi", + }; + else if (month === 10 && day === 8) + return { + blurb: `Today is International Lesbian Day`, + class: "flag-lesbian", + }; + else if (month === 10 && day === 11) + return { + blurb: `Today is National Coming Out Day`, + class: "flag-rainbow", + }; + else if (month === 10 && day === 17) + return { + blurb: `Today is the start of Genderfluid Visibility Week`, + class: "flag-genderfluid", + }; + else if (month === 10 && day === 24) + return { + blurb: `Today is the start of Ace Week`, + class: "flag-ace", + }; + else if (month === 10 && day === 26) + return { + blurb: `Today is Intersex Awareness Day`, + class: "flag-intersex", + }; else - return "No event"; - } - - 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 Zero Discrimination Day - `; - break; - case "International Women's Day": - return ` - Today is International Women's Day - `; - break; - case "Trans Day of Visibility": - return ` - Today is Trans Day of Visibility - `; - break; - case "International Asexuality Day": - return ` - Today is International Asexuality Day - `; - break; - case "Lesbian Visibility Day": - return ` - Today is Lesbian Visibility Day - `; - break; - case "IDAHOBIT": - return ` - Today is International Day Against Homophobia, Biphobia and Transphobia - `; - break; - case "Agender Pride Day": - return ` - Today is Agender Pride Day - `; - break; - case "Pansexual and Panromantic Awareness & Visibility Day": - return ` - Today is Pansexual and Panromantic Visibility Day - `; - break; - case "Pride Month": - return ` - Happy Pride Month! - `; - break; - case "Non-Binary People's Day": - return ` - Today is Non-Binary People's Day - `; - 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 Bi Visibility Day - `; - break; - case "International Lesbian Day": - return ` - Today is International Lesbian Day - `; - break; - case "National Coming Out Day": - return ` - Today is National Coming Out Day - `; - break; - case "Genderfluid Visibility Week": - return ` - Today is the start of Genderfluid Visibility Week - `; - break; - case "Ace Week": - return ` - Today is the start of Ace Week - `; - break; - case "Intersex Awareness Day": - return ` - Today is Intersex Awareness Day - `; - break; - default: - return ``; - } + return null; } diff --git a/_site/categories/fandom-culture/index.html b/_site/categories/fandom-culture/index.html index 8b049602..4050f442 100644 --- a/_site/categories/fandom-culture/index.html +++ b/_site/categories/fandom-culture/index.html @@ -98,14 +98,12 @@ const todayEvent = getTodayEvent(); - if (todayEvent != "No event") { + if (todayEvent) { heroTopBarEl.classList.remove('hidden'); + heroTopBarEl.innerHTML = todayEvent.blurb; - if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); - } else { - headerImgEl.classList.add(getBanner(todayEvent)); - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); + if (todayEvent.class) { + headerImgEl.classList.add(todayEvent.class); } } @@ -114,196 +112,100 @@ const month = date.getMonth() + 1; const day = date.getDate(); - if (month == 3 && day == 1) - return "Zero Discrimination Day"; - else if (month == 3 && day == 8) - return "International Women's Day"; - else if (month == 3 && day == 31) - return "Trans Day of Visibility"; - else if (month == 4 && day == 6) - return "International Asexuality Day"; - else if (month == 4 && day == 26) - return "Lesbian Visibility Day"; - else if (month == 5 && day == 17) - return "IDAHOBIT"; - else if (month == 5 && day == 19) - return "Agender Pride Day"; - else if (month == 5 && day == 25) - return "Pansexual and Panromantic Awareness & Visibility Day"; - else if (month == 6) - return "Pride Month"; - else if (month == 7 && day == 14) - return "Non-Binary People's Day"; - else if (month == 7 && day == 28) - return "Leilukin's Birthday"; - else if (month == 9 && day == 11) - return "Leilukin's Hub Anniversary"; - else if (month == 9 && day == 23) - return "Bi Visibility Day"; - else if (month == 10 && day == 8) - return "International Lesbian Day"; - else if (month == 10 && day == 11) - return "National Coming Out Day"; - else if (month == 10 && day == 17) - return "Genderfluid Visibility Week"; - else if (month == 10 && day == 24) - return "Ace Week"; - else if (month == 10 && day == 26) - return "Intersex Awareness Day"; + const currentYear = date.getFullYear(); + const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear(); + const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate; + + if (month === 3 && day === 1) + return { + blurb: `Today is Zero Discrimination Day`, + class: "flag-progress-intersex", + }; + else if (month === 3 && day === 8) + return { + blurb: `Today is International Women's Day}`, + class: "symbol-venus", + }; + else if (month === 3 && day === 31) + return { + blurb: `Today is Trans Day of Visibility`, + class: "flag-trans", + }; + else if (month === 4 && day === 6) + return { + blurb: `Today is International Asexuality Day`, + class: "flag-ace", + }; + else if (month === 4 && day === 26) + return { + blurb: `Today is Lesbian Visibility Day`, + class: "flag-lesbian", + }; + else if (month === 5 && day === 17) + return { + blurb: `Today is International Day Against Homophobia, Biphobia and Transphobia`, + class: "flag-progress", + }; + else if (month === 5 && day === 19) + return { + blurb: `Today is Agender Pride Day`, + class: "flag-agender", + }; + else if (month === 5 && day === 25) + return { + blurb: `Today is Pansexual and Panromantic Awareness and Visibility Day`, + class: "flag-pan", + }; + else if (month === 6) + return { + blurb: `Happy Pride Month!`, + class: "flag-progress-intersex", + }; + else if (month === 7 && day === 14) + return { + blurb: `Today is Non-Binary People's Day`, + 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 Bi Visibility Day`, + class: "flag-bi", + }; + else if (month === 10 && day === 8) + return { + blurb: `Today is International Lesbian Day`, + class: "flag-lesbian", + }; + else if (month === 10 && day === 11) + return { + blurb: `Today is National Coming Out Day`, + class: "flag-rainbow", + }; + else if (month === 10 && day === 17) + return { + blurb: `Today is the start of Genderfluid Visibility Week`, + class: "flag-genderfluid", + }; + else if (month === 10 && day === 24) + return { + blurb: `Today is the start of Ace Week`, + class: "flag-ace", + }; + else if (month === 10 && day === 26) + return { + blurb: `Today is Intersex Awareness Day`, + class: "flag-intersex", + }; else - return "No event"; - } - - 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 Zero Discrimination Day - `; - break; - case "International Women's Day": - return ` - Today is International Women's Day - `; - break; - case "Trans Day of Visibility": - return ` - Today is Trans Day of Visibility - `; - break; - case "International Asexuality Day": - return ` - Today is International Asexuality Day - `; - break; - case "Lesbian Visibility Day": - return ` - Today is Lesbian Visibility Day - `; - break; - case "IDAHOBIT": - return ` - Today is International Day Against Homophobia, Biphobia and Transphobia - `; - break; - case "Agender Pride Day": - return ` - Today is Agender Pride Day - `; - break; - case "Pansexual and Panromantic Awareness & Visibility Day": - return ` - Today is Pansexual and Panromantic Visibility Day - `; - break; - case "Pride Month": - return ` - Happy Pride Month! - `; - break; - case "Non-Binary People's Day": - return ` - Today is Non-Binary People's Day - `; - 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 Bi Visibility Day - `; - break; - case "International Lesbian Day": - return ` - Today is International Lesbian Day - `; - break; - case "National Coming Out Day": - return ` - Today is National Coming Out Day - `; - break; - case "Genderfluid Visibility Week": - return ` - Today is the start of Genderfluid Visibility Week - `; - break; - case "Ace Week": - return ` - Today is the start of Ace Week - `; - break; - case "Intersex Awareness Day": - return ` - Today is Intersex Awareness Day - `; - break; - default: - return ``; - } + return null; } diff --git a/_site/categories/index.html b/_site/categories/index.html index 0104be11..3299ec23 100644 --- a/_site/categories/index.html +++ b/_site/categories/index.html @@ -98,14 +98,12 @@ const todayEvent = getTodayEvent(); - if (todayEvent != "No event") { + if (todayEvent) { heroTopBarEl.classList.remove('hidden'); + heroTopBarEl.innerHTML = todayEvent.blurb; - if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); - } else { - headerImgEl.classList.add(getBanner(todayEvent)); - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); + if (todayEvent.class) { + headerImgEl.classList.add(todayEvent.class); } } @@ -114,196 +112,100 @@ const month = date.getMonth() + 1; const day = date.getDate(); - if (month == 3 && day == 1) - return "Zero Discrimination Day"; - else if (month == 3 && day == 8) - return "International Women's Day"; - else if (month == 3 && day == 31) - return "Trans Day of Visibility"; - else if (month == 4 && day == 6) - return "International Asexuality Day"; - else if (month == 4 && day == 26) - return "Lesbian Visibility Day"; - else if (month == 5 && day == 17) - return "IDAHOBIT"; - else if (month == 5 && day == 19) - return "Agender Pride Day"; - else if (month == 5 && day == 25) - return "Pansexual and Panromantic Awareness & Visibility Day"; - else if (month == 6) - return "Pride Month"; - else if (month == 7 && day == 14) - return "Non-Binary People's Day"; - else if (month == 7 && day == 28) - return "Leilukin's Birthday"; - else if (month == 9 && day == 11) - return "Leilukin's Hub Anniversary"; - else if (month == 9 && day == 23) - return "Bi Visibility Day"; - else if (month == 10 && day == 8) - return "International Lesbian Day"; - else if (month == 10 && day == 11) - return "National Coming Out Day"; - else if (month == 10 && day == 17) - return "Genderfluid Visibility Week"; - else if (month == 10 && day == 24) - return "Ace Week"; - else if (month == 10 && day == 26) - return "Intersex Awareness Day"; + const currentYear = date.getFullYear(); + const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear(); + const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate; + + if (month === 3 && day === 1) + return { + blurb: `Today is Zero Discrimination Day`, + class: "flag-progress-intersex", + }; + else if (month === 3 && day === 8) + return { + blurb: `Today is International Women's Day}`, + class: "symbol-venus", + }; + else if (month === 3 && day === 31) + return { + blurb: `Today is Trans Day of Visibility`, + class: "flag-trans", + }; + else if (month === 4 && day === 6) + return { + blurb: `Today is International Asexuality Day`, + class: "flag-ace", + }; + else if (month === 4 && day === 26) + return { + blurb: `Today is Lesbian Visibility Day`, + class: "flag-lesbian", + }; + else if (month === 5 && day === 17) + return { + blurb: `Today is International Day Against Homophobia, Biphobia and Transphobia`, + class: "flag-progress", + }; + else if (month === 5 && day === 19) + return { + blurb: `Today is Agender Pride Day`, + class: "flag-agender", + }; + else if (month === 5 && day === 25) + return { + blurb: `Today is Pansexual and Panromantic Awareness and Visibility Day`, + class: "flag-pan", + }; + else if (month === 6) + return { + blurb: `Happy Pride Month!`, + class: "flag-progress-intersex", + }; + else if (month === 7 && day === 14) + return { + blurb: `Today is Non-Binary People's Day`, + 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 Bi Visibility Day`, + class: "flag-bi", + }; + else if (month === 10 && day === 8) + return { + blurb: `Today is International Lesbian Day`, + class: "flag-lesbian", + }; + else if (month === 10 && day === 11) + return { + blurb: `Today is National Coming Out Day`, + class: "flag-rainbow", + }; + else if (month === 10 && day === 17) + return { + blurb: `Today is the start of Genderfluid Visibility Week`, + class: "flag-genderfluid", + }; + else if (month === 10 && day === 24) + return { + blurb: `Today is the start of Ace Week`, + class: "flag-ace", + }; + else if (month === 10 && day === 26) + return { + blurb: `Today is Intersex Awareness Day`, + class: "flag-intersex", + }; else - return "No event"; - } - - 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 Zero Discrimination Day - `; - break; - case "International Women's Day": - return ` - Today is International Women's Day - `; - break; - case "Trans Day of Visibility": - return ` - Today is Trans Day of Visibility - `; - break; - case "International Asexuality Day": - return ` - Today is International Asexuality Day - `; - break; - case "Lesbian Visibility Day": - return ` - Today is Lesbian Visibility Day - `; - break; - case "IDAHOBIT": - return ` - Today is International Day Against Homophobia, Biphobia and Transphobia - `; - break; - case "Agender Pride Day": - return ` - Today is Agender Pride Day - `; - break; - case "Pansexual and Panromantic Awareness & Visibility Day": - return ` - Today is Pansexual and Panromantic Visibility Day - `; - break; - case "Pride Month": - return ` - Happy Pride Month! - `; - break; - case "Non-Binary People's Day": - return ` - Today is Non-Binary People's Day - `; - 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 Bi Visibility Day - `; - break; - case "International Lesbian Day": - return ` - Today is International Lesbian Day - `; - break; - case "National Coming Out Day": - return ` - Today is National Coming Out Day - `; - break; - case "Genderfluid Visibility Week": - return ` - Today is the start of Genderfluid Visibility Week - `; - break; - case "Ace Week": - return ` - Today is the start of Ace Week - `; - break; - case "Intersex Awareness Day": - return ` - Today is Intersex Awareness Day - `; - break; - default: - return ``; - } + return null; } diff --git a/_site/categories/lesbian/index.html b/_site/categories/lesbian/index.html index 0548d814..dffda1f5 100644 --- a/_site/categories/lesbian/index.html +++ b/_site/categories/lesbian/index.html @@ -98,14 +98,12 @@ const todayEvent = getTodayEvent(); - if (todayEvent != "No event") { + if (todayEvent) { heroTopBarEl.classList.remove('hidden'); + heroTopBarEl.innerHTML = todayEvent.blurb; - if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); - } else { - headerImgEl.classList.add(getBanner(todayEvent)); - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); + if (todayEvent.class) { + headerImgEl.classList.add(todayEvent.class); } } @@ -114,196 +112,100 @@ const month = date.getMonth() + 1; const day = date.getDate(); - if (month == 3 && day == 1) - return "Zero Discrimination Day"; - else if (month == 3 && day == 8) - return "International Women's Day"; - else if (month == 3 && day == 31) - return "Trans Day of Visibility"; - else if (month == 4 && day == 6) - return "International Asexuality Day"; - else if (month == 4 && day == 26) - return "Lesbian Visibility Day"; - else if (month == 5 && day == 17) - return "IDAHOBIT"; - else if (month == 5 && day == 19) - return "Agender Pride Day"; - else if (month == 5 && day == 25) - return "Pansexual and Panromantic Awareness & Visibility Day"; - else if (month == 6) - return "Pride Month"; - else if (month == 7 && day == 14) - return "Non-Binary People's Day"; - else if (month == 7 && day == 28) - return "Leilukin's Birthday"; - else if (month == 9 && day == 11) - return "Leilukin's Hub Anniversary"; - else if (month == 9 && day == 23) - return "Bi Visibility Day"; - else if (month == 10 && day == 8) - return "International Lesbian Day"; - else if (month == 10 && day == 11) - return "National Coming Out Day"; - else if (month == 10 && day == 17) - return "Genderfluid Visibility Week"; - else if (month == 10 && day == 24) - return "Ace Week"; - else if (month == 10 && day == 26) - return "Intersex Awareness Day"; + const currentYear = date.getFullYear(); + const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear(); + const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate; + + if (month === 3 && day === 1) + return { + blurb: `Today is Zero Discrimination Day`, + class: "flag-progress-intersex", + }; + else if (month === 3 && day === 8) + return { + blurb: `Today is International Women's Day}`, + class: "symbol-venus", + }; + else if (month === 3 && day === 31) + return { + blurb: `Today is Trans Day of Visibility`, + class: "flag-trans", + }; + else if (month === 4 && day === 6) + return { + blurb: `Today is International Asexuality Day`, + class: "flag-ace", + }; + else if (month === 4 && day === 26) + return { + blurb: `Today is Lesbian Visibility Day`, + class: "flag-lesbian", + }; + else if (month === 5 && day === 17) + return { + blurb: `Today is International Day Against Homophobia, Biphobia and Transphobia`, + class: "flag-progress", + }; + else if (month === 5 && day === 19) + return { + blurb: `Today is Agender Pride Day`, + class: "flag-agender", + }; + else if (month === 5 && day === 25) + return { + blurb: `Today is Pansexual and Panromantic Awareness and Visibility Day`, + class: "flag-pan", + }; + else if (month === 6) + return { + blurb: `Happy Pride Month!`, + class: "flag-progress-intersex", + }; + else if (month === 7 && day === 14) + return { + blurb: `Today is Non-Binary People's Day`, + 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 Bi Visibility Day`, + class: "flag-bi", + }; + else if (month === 10 && day === 8) + return { + blurb: `Today is International Lesbian Day`, + class: "flag-lesbian", + }; + else if (month === 10 && day === 11) + return { + blurb: `Today is National Coming Out Day`, + class: "flag-rainbow", + }; + else if (month === 10 && day === 17) + return { + blurb: `Today is the start of Genderfluid Visibility Week`, + class: "flag-genderfluid", + }; + else if (month === 10 && day === 24) + return { + blurb: `Today is the start of Ace Week`, + class: "flag-ace", + }; + else if (month === 10 && day === 26) + return { + blurb: `Today is Intersex Awareness Day`, + class: "flag-intersex", + }; else - return "No event"; - } - - 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 Zero Discrimination Day - `; - break; - case "International Women's Day": - return ` - Today is International Women's Day - `; - break; - case "Trans Day of Visibility": - return ` - Today is Trans Day of Visibility - `; - break; - case "International Asexuality Day": - return ` - Today is International Asexuality Day - `; - break; - case "Lesbian Visibility Day": - return ` - Today is Lesbian Visibility Day - `; - break; - case "IDAHOBIT": - return ` - Today is International Day Against Homophobia, Biphobia and Transphobia - `; - break; - case "Agender Pride Day": - return ` - Today is Agender Pride Day - `; - break; - case "Pansexual and Panromantic Awareness & Visibility Day": - return ` - Today is Pansexual and Panromantic Visibility Day - `; - break; - case "Pride Month": - return ` - Happy Pride Month! - `; - break; - case "Non-Binary People's Day": - return ` - Today is Non-Binary People's Day - `; - 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 Bi Visibility Day - `; - break; - case "International Lesbian Day": - return ` - Today is International Lesbian Day - `; - break; - case "National Coming Out Day": - return ` - Today is National Coming Out Day - `; - break; - case "Genderfluid Visibility Week": - return ` - Today is the start of Genderfluid Visibility Week - `; - break; - case "Ace Week": - return ` - Today is the start of Ace Week - `; - break; - case "Intersex Awareness Day": - return ` - Today is Intersex Awareness Day - `; - break; - default: - return ``; - } + return null; } diff --git a/_site/categories/life-updates/index.html b/_site/categories/life-updates/index.html index 7b216636..0b176b6c 100644 --- a/_site/categories/life-updates/index.html +++ b/_site/categories/life-updates/index.html @@ -98,14 +98,12 @@ const todayEvent = getTodayEvent(); - if (todayEvent != "No event") { + if (todayEvent) { heroTopBarEl.classList.remove('hidden'); + heroTopBarEl.innerHTML = todayEvent.blurb; - if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); - } else { - headerImgEl.classList.add(getBanner(todayEvent)); - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); + if (todayEvent.class) { + headerImgEl.classList.add(todayEvent.class); } } @@ -114,196 +112,100 @@ const month = date.getMonth() + 1; const day = date.getDate(); - if (month == 3 && day == 1) - return "Zero Discrimination Day"; - else if (month == 3 && day == 8) - return "International Women's Day"; - else if (month == 3 && day == 31) - return "Trans Day of Visibility"; - else if (month == 4 && day == 6) - return "International Asexuality Day"; - else if (month == 4 && day == 26) - return "Lesbian Visibility Day"; - else if (month == 5 && day == 17) - return "IDAHOBIT"; - else if (month == 5 && day == 19) - return "Agender Pride Day"; - else if (month == 5 && day == 25) - return "Pansexual and Panromantic Awareness & Visibility Day"; - else if (month == 6) - return "Pride Month"; - else if (month == 7 && day == 14) - return "Non-Binary People's Day"; - else if (month == 7 && day == 28) - return "Leilukin's Birthday"; - else if (month == 9 && day == 11) - return "Leilukin's Hub Anniversary"; - else if (month == 9 && day == 23) - return "Bi Visibility Day"; - else if (month == 10 && day == 8) - return "International Lesbian Day"; - else if (month == 10 && day == 11) - return "National Coming Out Day"; - else if (month == 10 && day == 17) - return "Genderfluid Visibility Week"; - else if (month == 10 && day == 24) - return "Ace Week"; - else if (month == 10 && day == 26) - return "Intersex Awareness Day"; + const currentYear = date.getFullYear(); + const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear(); + const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate; + + if (month === 3 && day === 1) + return { + blurb: `Today is Zero Discrimination Day`, + class: "flag-progress-intersex", + }; + else if (month === 3 && day === 8) + return { + blurb: `Today is International Women's Day}`, + class: "symbol-venus", + }; + else if (month === 3 && day === 31) + return { + blurb: `Today is Trans Day of Visibility`, + class: "flag-trans", + }; + else if (month === 4 && day === 6) + return { + blurb: `Today is International Asexuality Day`, + class: "flag-ace", + }; + else if (month === 4 && day === 26) + return { + blurb: `Today is Lesbian Visibility Day`, + class: "flag-lesbian", + }; + else if (month === 5 && day === 17) + return { + blurb: `Today is International Day Against Homophobia, Biphobia and Transphobia`, + class: "flag-progress", + }; + else if (month === 5 && day === 19) + return { + blurb: `Today is Agender Pride Day`, + class: "flag-agender", + }; + else if (month === 5 && day === 25) + return { + blurb: `Today is Pansexual and Panromantic Awareness and Visibility Day`, + class: "flag-pan", + }; + else if (month === 6) + return { + blurb: `Happy Pride Month!`, + class: "flag-progress-intersex", + }; + else if (month === 7 && day === 14) + return { + blurb: `Today is Non-Binary People's Day`, + 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 Bi Visibility Day`, + class: "flag-bi", + }; + else if (month === 10 && day === 8) + return { + blurb: `Today is International Lesbian Day`, + class: "flag-lesbian", + }; + else if (month === 10 && day === 11) + return { + blurb: `Today is National Coming Out Day`, + class: "flag-rainbow", + }; + else if (month === 10 && day === 17) + return { + blurb: `Today is the start of Genderfluid Visibility Week`, + class: "flag-genderfluid", + }; + else if (month === 10 && day === 24) + return { + blurb: `Today is the start of Ace Week`, + class: "flag-ace", + }; + else if (month === 10 && day === 26) + return { + blurb: `Today is Intersex Awareness Day`, + class: "flag-intersex", + }; else - return "No event"; - } - - 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 Zero Discrimination Day - `; - break; - case "International Women's Day": - return ` - Today is International Women's Day - `; - break; - case "Trans Day of Visibility": - return ` - Today is Trans Day of Visibility - `; - break; - case "International Asexuality Day": - return ` - Today is International Asexuality Day - `; - break; - case "Lesbian Visibility Day": - return ` - Today is Lesbian Visibility Day - `; - break; - case "IDAHOBIT": - return ` - Today is International Day Against Homophobia, Biphobia and Transphobia - `; - break; - case "Agender Pride Day": - return ` - Today is Agender Pride Day - `; - break; - case "Pansexual and Panromantic Awareness & Visibility Day": - return ` - Today is Pansexual and Panromantic Visibility Day - `; - break; - case "Pride Month": - return ` - Happy Pride Month! - `; - break; - case "Non-Binary People's Day": - return ` - Today is Non-Binary People's Day - `; - 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 Bi Visibility Day - `; - break; - case "International Lesbian Day": - return ` - Today is International Lesbian Day - `; - break; - case "National Coming Out Day": - return ` - Today is National Coming Out Day - `; - break; - case "Genderfluid Visibility Week": - return ` - Today is the start of Genderfluid Visibility Week - `; - break; - case "Ace Week": - return ` - Today is the start of Ace Week - `; - break; - case "Intersex Awareness Day": - return ` - Today is Intersex Awareness Day - `; - break; - default: - return ``; - } + return null; } diff --git a/_site/categories/modding/index.html b/_site/categories/modding/index.html index ee363f0b..fa97e3bd 100644 --- a/_site/categories/modding/index.html +++ b/_site/categories/modding/index.html @@ -98,14 +98,12 @@ const todayEvent = getTodayEvent(); - if (todayEvent != "No event") { + if (todayEvent) { heroTopBarEl.classList.remove('hidden'); + heroTopBarEl.innerHTML = todayEvent.blurb; - if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); - } else { - headerImgEl.classList.add(getBanner(todayEvent)); - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); + if (todayEvent.class) { + headerImgEl.classList.add(todayEvent.class); } } @@ -114,196 +112,100 @@ const month = date.getMonth() + 1; const day = date.getDate(); - if (month == 3 && day == 1) - return "Zero Discrimination Day"; - else if (month == 3 && day == 8) - return "International Women's Day"; - else if (month == 3 && day == 31) - return "Trans Day of Visibility"; - else if (month == 4 && day == 6) - return "International Asexuality Day"; - else if (month == 4 && day == 26) - return "Lesbian Visibility Day"; - else if (month == 5 && day == 17) - return "IDAHOBIT"; - else if (month == 5 && day == 19) - return "Agender Pride Day"; - else if (month == 5 && day == 25) - return "Pansexual and Panromantic Awareness & Visibility Day"; - else if (month == 6) - return "Pride Month"; - else if (month == 7 && day == 14) - return "Non-Binary People's Day"; - else if (month == 7 && day == 28) - return "Leilukin's Birthday"; - else if (month == 9 && day == 11) - return "Leilukin's Hub Anniversary"; - else if (month == 9 && day == 23) - return "Bi Visibility Day"; - else if (month == 10 && day == 8) - return "International Lesbian Day"; - else if (month == 10 && day == 11) - return "National Coming Out Day"; - else if (month == 10 && day == 17) - return "Genderfluid Visibility Week"; - else if (month == 10 && day == 24) - return "Ace Week"; - else if (month == 10 && day == 26) - return "Intersex Awareness Day"; + const currentYear = date.getFullYear(); + const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear(); + const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate; + + if (month === 3 && day === 1) + return { + blurb: `Today is Zero Discrimination Day`, + class: "flag-progress-intersex", + }; + else if (month === 3 && day === 8) + return { + blurb: `Today is International Women's Day}`, + class: "symbol-venus", + }; + else if (month === 3 && day === 31) + return { + blurb: `Today is Trans Day of Visibility`, + class: "flag-trans", + }; + else if (month === 4 && day === 6) + return { + blurb: `Today is International Asexuality Day`, + class: "flag-ace", + }; + else if (month === 4 && day === 26) + return { + blurb: `Today is Lesbian Visibility Day`, + class: "flag-lesbian", + }; + else if (month === 5 && day === 17) + return { + blurb: `Today is International Day Against Homophobia, Biphobia and Transphobia`, + class: "flag-progress", + }; + else if (month === 5 && day === 19) + return { + blurb: `Today is Agender Pride Day`, + class: "flag-agender", + }; + else if (month === 5 && day === 25) + return { + blurb: `Today is Pansexual and Panromantic Awareness and Visibility Day`, + class: "flag-pan", + }; + else if (month === 6) + return { + blurb: `Happy Pride Month!`, + class: "flag-progress-intersex", + }; + else if (month === 7 && day === 14) + return { + blurb: `Today is Non-Binary People's Day`, + 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 Bi Visibility Day`, + class: "flag-bi", + }; + else if (month === 10 && day === 8) + return { + blurb: `Today is International Lesbian Day`, + class: "flag-lesbian", + }; + else if (month === 10 && day === 11) + return { + blurb: `Today is National Coming Out Day`, + class: "flag-rainbow", + }; + else if (month === 10 && day === 17) + return { + blurb: `Today is the start of Genderfluid Visibility Week`, + class: "flag-genderfluid", + }; + else if (month === 10 && day === 24) + return { + blurb: `Today is the start of Ace Week`, + class: "flag-ace", + }; + else if (month === 10 && day === 26) + return { + blurb: `Today is Intersex Awareness Day`, + class: "flag-intersex", + }; else - return "No event"; - } - - 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 Zero Discrimination Day - `; - break; - case "International Women's Day": - return ` - Today is International Women's Day - `; - break; - case "Trans Day of Visibility": - return ` - Today is Trans Day of Visibility - `; - break; - case "International Asexuality Day": - return ` - Today is International Asexuality Day - `; - break; - case "Lesbian Visibility Day": - return ` - Today is Lesbian Visibility Day - `; - break; - case "IDAHOBIT": - return ` - Today is International Day Against Homophobia, Biphobia and Transphobia - `; - break; - case "Agender Pride Day": - return ` - Today is Agender Pride Day - `; - break; - case "Pansexual and Panromantic Awareness & Visibility Day": - return ` - Today is Pansexual and Panromantic Visibility Day - `; - break; - case "Pride Month": - return ` - Happy Pride Month! - `; - break; - case "Non-Binary People's Day": - return ` - Today is Non-Binary People's Day - `; - 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 Bi Visibility Day - `; - break; - case "International Lesbian Day": - return ` - Today is International Lesbian Day - `; - break; - case "National Coming Out Day": - return ` - Today is National Coming Out Day - `; - break; - case "Genderfluid Visibility Week": - return ` - Today is the start of Genderfluid Visibility Week - `; - break; - case "Ace Week": - return ` - Today is the start of Ace Week - `; - break; - case "Intersex Awareness Day": - return ` - Today is Intersex Awareness Day - `; - break; - default: - return ``; - } + return null; } diff --git a/_site/categories/my-birthday/index.html b/_site/categories/my-birthday/index.html index 144a3dc0..4ab5bc48 100644 --- a/_site/categories/my-birthday/index.html +++ b/_site/categories/my-birthday/index.html @@ -98,14 +98,12 @@ const todayEvent = getTodayEvent(); - if (todayEvent != "No event") { + if (todayEvent) { heroTopBarEl.classList.remove('hidden'); + heroTopBarEl.innerHTML = todayEvent.blurb; - if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); - } else { - headerImgEl.classList.add(getBanner(todayEvent)); - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); + if (todayEvent.class) { + headerImgEl.classList.add(todayEvent.class); } } @@ -114,196 +112,100 @@ const month = date.getMonth() + 1; const day = date.getDate(); - if (month == 3 && day == 1) - return "Zero Discrimination Day"; - else if (month == 3 && day == 8) - return "International Women's Day"; - else if (month == 3 && day == 31) - return "Trans Day of Visibility"; - else if (month == 4 && day == 6) - return "International Asexuality Day"; - else if (month == 4 && day == 26) - return "Lesbian Visibility Day"; - else if (month == 5 && day == 17) - return "IDAHOBIT"; - else if (month == 5 && day == 19) - return "Agender Pride Day"; - else if (month == 5 && day == 25) - return "Pansexual and Panromantic Awareness & Visibility Day"; - else if (month == 6) - return "Pride Month"; - else if (month == 7 && day == 14) - return "Non-Binary People's Day"; - else if (month == 7 && day == 28) - return "Leilukin's Birthday"; - else if (month == 9 && day == 11) - return "Leilukin's Hub Anniversary"; - else if (month == 9 && day == 23) - return "Bi Visibility Day"; - else if (month == 10 && day == 8) - return "International Lesbian Day"; - else if (month == 10 && day == 11) - return "National Coming Out Day"; - else if (month == 10 && day == 17) - return "Genderfluid Visibility Week"; - else if (month == 10 && day == 24) - return "Ace Week"; - else if (month == 10 && day == 26) - return "Intersex Awareness Day"; + const currentYear = date.getFullYear(); + const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear(); + const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate; + + if (month === 3 && day === 1) + return { + blurb: `Today is Zero Discrimination Day`, + class: "flag-progress-intersex", + }; + else if (month === 3 && day === 8) + return { + blurb: `Today is International Women's Day}`, + class: "symbol-venus", + }; + else if (month === 3 && day === 31) + return { + blurb: `Today is Trans Day of Visibility`, + class: "flag-trans", + }; + else if (month === 4 && day === 6) + return { + blurb: `Today is International Asexuality Day`, + class: "flag-ace", + }; + else if (month === 4 && day === 26) + return { + blurb: `Today is Lesbian Visibility Day`, + class: "flag-lesbian", + }; + else if (month === 5 && day === 17) + return { + blurb: `Today is International Day Against Homophobia, Biphobia and Transphobia`, + class: "flag-progress", + }; + else if (month === 5 && day === 19) + return { + blurb: `Today is Agender Pride Day`, + class: "flag-agender", + }; + else if (month === 5 && day === 25) + return { + blurb: `Today is Pansexual and Panromantic Awareness and Visibility Day`, + class: "flag-pan", + }; + else if (month === 6) + return { + blurb: `Happy Pride Month!`, + class: "flag-progress-intersex", + }; + else if (month === 7 && day === 14) + return { + blurb: `Today is Non-Binary People's Day`, + 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 Bi Visibility Day`, + class: "flag-bi", + }; + else if (month === 10 && day === 8) + return { + blurb: `Today is International Lesbian Day`, + class: "flag-lesbian", + }; + else if (month === 10 && day === 11) + return { + blurb: `Today is National Coming Out Day`, + class: "flag-rainbow", + }; + else if (month === 10 && day === 17) + return { + blurb: `Today is the start of Genderfluid Visibility Week`, + class: "flag-genderfluid", + }; + else if (month === 10 && day === 24) + return { + blurb: `Today is the start of Ace Week`, + class: "flag-ace", + }; + else if (month === 10 && day === 26) + return { + blurb: `Today is Intersex Awareness Day`, + class: "flag-intersex", + }; else - return "No event"; - } - - 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 Zero Discrimination Day - `; - break; - case "International Women's Day": - return ` - Today is International Women's Day - `; - break; - case "Trans Day of Visibility": - return ` - Today is Trans Day of Visibility - `; - break; - case "International Asexuality Day": - return ` - Today is International Asexuality Day - `; - break; - case "Lesbian Visibility Day": - return ` - Today is Lesbian Visibility Day - `; - break; - case "IDAHOBIT": - return ` - Today is International Day Against Homophobia, Biphobia and Transphobia - `; - break; - case "Agender Pride Day": - return ` - Today is Agender Pride Day - `; - break; - case "Pansexual and Panromantic Awareness & Visibility Day": - return ` - Today is Pansexual and Panromantic Visibility Day - `; - break; - case "Pride Month": - return ` - Happy Pride Month! - `; - break; - case "Non-Binary People's Day": - return ` - Today is Non-Binary People's Day - `; - 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 Bi Visibility Day - `; - break; - case "International Lesbian Day": - return ` - Today is International Lesbian Day - `; - break; - case "National Coming Out Day": - return ` - Today is National Coming Out Day - `; - break; - case "Genderfluid Visibility Week": - return ` - Today is the start of Genderfluid Visibility Week - `; - break; - case "Ace Week": - return ` - Today is the start of Ace Week - `; - break; - case "Intersex Awareness Day": - return ` - Today is Intersex Awareness Day - `; - break; - default: - return ``; - } + return null; } diff --git a/_site/categories/my-interviews/index.html b/_site/categories/my-interviews/index.html index 61f381a6..a7a2a2b5 100644 --- a/_site/categories/my-interviews/index.html +++ b/_site/categories/my-interviews/index.html @@ -98,14 +98,12 @@ const todayEvent = getTodayEvent(); - if (todayEvent != "No event") { + if (todayEvent) { heroTopBarEl.classList.remove('hidden'); + heroTopBarEl.innerHTML = todayEvent.blurb; - if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); - } else { - headerImgEl.classList.add(getBanner(todayEvent)); - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); + if (todayEvent.class) { + headerImgEl.classList.add(todayEvent.class); } } @@ -114,196 +112,100 @@ const month = date.getMonth() + 1; const day = date.getDate(); - if (month == 3 && day == 1) - return "Zero Discrimination Day"; - else if (month == 3 && day == 8) - return "International Women's Day"; - else if (month == 3 && day == 31) - return "Trans Day of Visibility"; - else if (month == 4 && day == 6) - return "International Asexuality Day"; - else if (month == 4 && day == 26) - return "Lesbian Visibility Day"; - else if (month == 5 && day == 17) - return "IDAHOBIT"; - else if (month == 5 && day == 19) - return "Agender Pride Day"; - else if (month == 5 && day == 25) - return "Pansexual and Panromantic Awareness & Visibility Day"; - else if (month == 6) - return "Pride Month"; - else if (month == 7 && day == 14) - return "Non-Binary People's Day"; - else if (month == 7 && day == 28) - return "Leilukin's Birthday"; - else if (month == 9 && day == 11) - return "Leilukin's Hub Anniversary"; - else if (month == 9 && day == 23) - return "Bi Visibility Day"; - else if (month == 10 && day == 8) - return "International Lesbian Day"; - else if (month == 10 && day == 11) - return "National Coming Out Day"; - else if (month == 10 && day == 17) - return "Genderfluid Visibility Week"; - else if (month == 10 && day == 24) - return "Ace Week"; - else if (month == 10 && day == 26) - return "Intersex Awareness Day"; + const currentYear = date.getFullYear(); + const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear(); + const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate; + + if (month === 3 && day === 1) + return { + blurb: `Today is Zero Discrimination Day`, + class: "flag-progress-intersex", + }; + else if (month === 3 && day === 8) + return { + blurb: `Today is International Women's Day}`, + class: "symbol-venus", + }; + else if (month === 3 && day === 31) + return { + blurb: `Today is Trans Day of Visibility`, + class: "flag-trans", + }; + else if (month === 4 && day === 6) + return { + blurb: `Today is International Asexuality Day`, + class: "flag-ace", + }; + else if (month === 4 && day === 26) + return { + blurb: `Today is Lesbian Visibility Day`, + class: "flag-lesbian", + }; + else if (month === 5 && day === 17) + return { + blurb: `Today is International Day Against Homophobia, Biphobia and Transphobia`, + class: "flag-progress", + }; + else if (month === 5 && day === 19) + return { + blurb: `Today is Agender Pride Day`, + class: "flag-agender", + }; + else if (month === 5 && day === 25) + return { + blurb: `Today is Pansexual and Panromantic Awareness and Visibility Day`, + class: "flag-pan", + }; + else if (month === 6) + return { + blurb: `Happy Pride Month!`, + class: "flag-progress-intersex", + }; + else if (month === 7 && day === 14) + return { + blurb: `Today is Non-Binary People's Day`, + 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 Bi Visibility Day`, + class: "flag-bi", + }; + else if (month === 10 && day === 8) + return { + blurb: `Today is International Lesbian Day`, + class: "flag-lesbian", + }; + else if (month === 10 && day === 11) + return { + blurb: `Today is National Coming Out Day`, + class: "flag-rainbow", + }; + else if (month === 10 && day === 17) + return { + blurb: `Today is the start of Genderfluid Visibility Week`, + class: "flag-genderfluid", + }; + else if (month === 10 && day === 24) + return { + blurb: `Today is the start of Ace Week`, + class: "flag-ace", + }; + else if (month === 10 && day === 26) + return { + blurb: `Today is Intersex Awareness Day`, + class: "flag-intersex", + }; else - return "No event"; - } - - 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 Zero Discrimination Day - `; - break; - case "International Women's Day": - return ` - Today is International Women's Day - `; - break; - case "Trans Day of Visibility": - return ` - Today is Trans Day of Visibility - `; - break; - case "International Asexuality Day": - return ` - Today is International Asexuality Day - `; - break; - case "Lesbian Visibility Day": - return ` - Today is Lesbian Visibility Day - `; - break; - case "IDAHOBIT": - return ` - Today is International Day Against Homophobia, Biphobia and Transphobia - `; - break; - case "Agender Pride Day": - return ` - Today is Agender Pride Day - `; - break; - case "Pansexual and Panromantic Awareness & Visibility Day": - return ` - Today is Pansexual and Panromantic Visibility Day - `; - break; - case "Pride Month": - return ` - Happy Pride Month! - `; - break; - case "Non-Binary People's Day": - return ` - Today is Non-Binary People's Day - `; - 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 Bi Visibility Day - `; - break; - case "International Lesbian Day": - return ` - Today is International Lesbian Day - `; - break; - case "National Coming Out Day": - return ` - Today is National Coming Out Day - `; - break; - case "Genderfluid Visibility Week": - return ` - Today is the start of Genderfluid Visibility Week - `; - break; - case "Ace Week": - return ` - Today is the start of Ace Week - `; - break; - case "Intersex Awareness Day": - return ` - Today is Intersex Awareness Day - `; - break; - default: - return ``; - } + return null; } diff --git a/_site/categories/site-anniversary/index.html b/_site/categories/site-anniversary/index.html index b64e1542..add854a4 100644 --- a/_site/categories/site-anniversary/index.html +++ b/_site/categories/site-anniversary/index.html @@ -98,14 +98,12 @@ const todayEvent = getTodayEvent(); - if (todayEvent != "No event") { + if (todayEvent) { heroTopBarEl.classList.remove('hidden'); + heroTopBarEl.innerHTML = todayEvent.blurb; - if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); - } else { - headerImgEl.classList.add(getBanner(todayEvent)); - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); + if (todayEvent.class) { + headerImgEl.classList.add(todayEvent.class); } } @@ -114,196 +112,100 @@ const month = date.getMonth() + 1; const day = date.getDate(); - if (month == 3 && day == 1) - return "Zero Discrimination Day"; - else if (month == 3 && day == 8) - return "International Women's Day"; - else if (month == 3 && day == 31) - return "Trans Day of Visibility"; - else if (month == 4 && day == 6) - return "International Asexuality Day"; - else if (month == 4 && day == 26) - return "Lesbian Visibility Day"; - else if (month == 5 && day == 17) - return "IDAHOBIT"; - else if (month == 5 && day == 19) - return "Agender Pride Day"; - else if (month == 5 && day == 25) - return "Pansexual and Panromantic Awareness & Visibility Day"; - else if (month == 6) - return "Pride Month"; - else if (month == 7 && day == 14) - return "Non-Binary People's Day"; - else if (month == 7 && day == 28) - return "Leilukin's Birthday"; - else if (month == 9 && day == 11) - return "Leilukin's Hub Anniversary"; - else if (month == 9 && day == 23) - return "Bi Visibility Day"; - else if (month == 10 && day == 8) - return "International Lesbian Day"; - else if (month == 10 && day == 11) - return "National Coming Out Day"; - else if (month == 10 && day == 17) - return "Genderfluid Visibility Week"; - else if (month == 10 && day == 24) - return "Ace Week"; - else if (month == 10 && day == 26) - return "Intersex Awareness Day"; + const currentYear = date.getFullYear(); + const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear(); + const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate; + + if (month === 3 && day === 1) + return { + blurb: `Today is Zero Discrimination Day`, + class: "flag-progress-intersex", + }; + else if (month === 3 && day === 8) + return { + blurb: `Today is International Women's Day}`, + class: "symbol-venus", + }; + else if (month === 3 && day === 31) + return { + blurb: `Today is Trans Day of Visibility`, + class: "flag-trans", + }; + else if (month === 4 && day === 6) + return { + blurb: `Today is International Asexuality Day`, + class: "flag-ace", + }; + else if (month === 4 && day === 26) + return { + blurb: `Today is Lesbian Visibility Day`, + class: "flag-lesbian", + }; + else if (month === 5 && day === 17) + return { + blurb: `Today is International Day Against Homophobia, Biphobia and Transphobia`, + class: "flag-progress", + }; + else if (month === 5 && day === 19) + return { + blurb: `Today is Agender Pride Day`, + class: "flag-agender", + }; + else if (month === 5 && day === 25) + return { + blurb: `Today is Pansexual and Panromantic Awareness and Visibility Day`, + class: "flag-pan", + }; + else if (month === 6) + return { + blurb: `Happy Pride Month!`, + class: "flag-progress-intersex", + }; + else if (month === 7 && day === 14) + return { + blurb: `Today is Non-Binary People's Day`, + 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 Bi Visibility Day`, + class: "flag-bi", + }; + else if (month === 10 && day === 8) + return { + blurb: `Today is International Lesbian Day`, + class: "flag-lesbian", + }; + else if (month === 10 && day === 11) + return { + blurb: `Today is National Coming Out Day`, + class: "flag-rainbow", + }; + else if (month === 10 && day === 17) + return { + blurb: `Today is the start of Genderfluid Visibility Week`, + class: "flag-genderfluid", + }; + else if (month === 10 && day === 24) + return { + blurb: `Today is the start of Ace Week`, + class: "flag-ace", + }; + else if (month === 10 && day === 26) + return { + blurb: `Today is Intersex Awareness Day`, + class: "flag-intersex", + }; else - return "No event"; - } - - 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 Zero Discrimination Day - `; - break; - case "International Women's Day": - return ` - Today is International Women's Day - `; - break; - case "Trans Day of Visibility": - return ` - Today is Trans Day of Visibility - `; - break; - case "International Asexuality Day": - return ` - Today is International Asexuality Day - `; - break; - case "Lesbian Visibility Day": - return ` - Today is Lesbian Visibility Day - `; - break; - case "IDAHOBIT": - return ` - Today is International Day Against Homophobia, Biphobia and Transphobia - `; - break; - case "Agender Pride Day": - return ` - Today is Agender Pride Day - `; - break; - case "Pansexual and Panromantic Awareness & Visibility Day": - return ` - Today is Pansexual and Panromantic Visibility Day - `; - break; - case "Pride Month": - return ` - Happy Pride Month! - `; - break; - case "Non-Binary People's Day": - return ` - Today is Non-Binary People's Day - `; - 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 Bi Visibility Day - `; - break; - case "International Lesbian Day": - return ` - Today is International Lesbian Day - `; - break; - case "National Coming Out Day": - return ` - Today is National Coming Out Day - `; - break; - case "Genderfluid Visibility Week": - return ` - Today is the start of Genderfluid Visibility Week - `; - break; - case "Ace Week": - return ` - Today is the start of Ace Week - `; - break; - case "Intersex Awareness Day": - return ` - Today is Intersex Awareness Day - `; - break; - default: - return ``; - } + return null; } diff --git a/_site/categories/site-updates/index.html b/_site/categories/site-updates/index.html index c09df728..8a9bef89 100644 --- a/_site/categories/site-updates/index.html +++ b/_site/categories/site-updates/index.html @@ -98,14 +98,12 @@ const todayEvent = getTodayEvent(); - if (todayEvent != "No event") { + if (todayEvent) { heroTopBarEl.classList.remove('hidden'); + heroTopBarEl.innerHTML = todayEvent.blurb; - if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); - } else { - headerImgEl.classList.add(getBanner(todayEvent)); - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); + if (todayEvent.class) { + headerImgEl.classList.add(todayEvent.class); } } @@ -114,196 +112,100 @@ const month = date.getMonth() + 1; const day = date.getDate(); - if (month == 3 && day == 1) - return "Zero Discrimination Day"; - else if (month == 3 && day == 8) - return "International Women's Day"; - else if (month == 3 && day == 31) - return "Trans Day of Visibility"; - else if (month == 4 && day == 6) - return "International Asexuality Day"; - else if (month == 4 && day == 26) - return "Lesbian Visibility Day"; - else if (month == 5 && day == 17) - return "IDAHOBIT"; - else if (month == 5 && day == 19) - return "Agender Pride Day"; - else if (month == 5 && day == 25) - return "Pansexual and Panromantic Awareness & Visibility Day"; - else if (month == 6) - return "Pride Month"; - else if (month == 7 && day == 14) - return "Non-Binary People's Day"; - else if (month == 7 && day == 28) - return "Leilukin's Birthday"; - else if (month == 9 && day == 11) - return "Leilukin's Hub Anniversary"; - else if (month == 9 && day == 23) - return "Bi Visibility Day"; - else if (month == 10 && day == 8) - return "International Lesbian Day"; - else if (month == 10 && day == 11) - return "National Coming Out Day"; - else if (month == 10 && day == 17) - return "Genderfluid Visibility Week"; - else if (month == 10 && day == 24) - return "Ace Week"; - else if (month == 10 && day == 26) - return "Intersex Awareness Day"; + const currentYear = date.getFullYear(); + const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear(); + const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate; + + if (month === 3 && day === 1) + return { + blurb: `Today is Zero Discrimination Day`, + class: "flag-progress-intersex", + }; + else if (month === 3 && day === 8) + return { + blurb: `Today is International Women's Day}`, + class: "symbol-venus", + }; + else if (month === 3 && day === 31) + return { + blurb: `Today is Trans Day of Visibility`, + class: "flag-trans", + }; + else if (month === 4 && day === 6) + return { + blurb: `Today is International Asexuality Day`, + class: "flag-ace", + }; + else if (month === 4 && day === 26) + return { + blurb: `Today is Lesbian Visibility Day`, + class: "flag-lesbian", + }; + else if (month === 5 && day === 17) + return { + blurb: `Today is International Day Against Homophobia, Biphobia and Transphobia`, + class: "flag-progress", + }; + else if (month === 5 && day === 19) + return { + blurb: `Today is Agender Pride Day`, + class: "flag-agender", + }; + else if (month === 5 && day === 25) + return { + blurb: `Today is Pansexual and Panromantic Awareness and Visibility Day`, + class: "flag-pan", + }; + else if (month === 6) + return { + blurb: `Happy Pride Month!`, + class: "flag-progress-intersex", + }; + else if (month === 7 && day === 14) + return { + blurb: `Today is Non-Binary People's Day`, + 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 Bi Visibility Day`, + class: "flag-bi", + }; + else if (month === 10 && day === 8) + return { + blurb: `Today is International Lesbian Day`, + class: "flag-lesbian", + }; + else if (month === 10 && day === 11) + return { + blurb: `Today is National Coming Out Day`, + class: "flag-rainbow", + }; + else if (month === 10 && day === 17) + return { + blurb: `Today is the start of Genderfluid Visibility Week`, + class: "flag-genderfluid", + }; + else if (month === 10 && day === 24) + return { + blurb: `Today is the start of Ace Week`, + class: "flag-ace", + }; + else if (month === 10 && day === 26) + return { + blurb: `Today is Intersex Awareness Day`, + class: "flag-intersex", + }; else - return "No event"; - } - - 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 Zero Discrimination Day - `; - break; - case "International Women's Day": - return ` - Today is International Women's Day - `; - break; - case "Trans Day of Visibility": - return ` - Today is Trans Day of Visibility - `; - break; - case "International Asexuality Day": - return ` - Today is International Asexuality Day - `; - break; - case "Lesbian Visibility Day": - return ` - Today is Lesbian Visibility Day - `; - break; - case "IDAHOBIT": - return ` - Today is International Day Against Homophobia, Biphobia and Transphobia - `; - break; - case "Agender Pride Day": - return ` - Today is Agender Pride Day - `; - break; - case "Pansexual and Panromantic Awareness & Visibility Day": - return ` - Today is Pansexual and Panromantic Visibility Day - `; - break; - case "Pride Month": - return ` - Happy Pride Month! - `; - break; - case "Non-Binary People's Day": - return ` - Today is Non-Binary People's Day - `; - 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 Bi Visibility Day - `; - break; - case "International Lesbian Day": - return ` - Today is International Lesbian Day - `; - break; - case "National Coming Out Day": - return ` - Today is National Coming Out Day - `; - break; - case "Genderfluid Visibility Week": - return ` - Today is the start of Genderfluid Visibility Week - `; - break; - case "Ace Week": - return ` - Today is the start of Ace Week - `; - break; - case "Intersex Awareness Day": - return ` - Today is Intersex Awareness Day - `; - break; - default: - return ``; - } + return null; } diff --git a/_site/categories/star-wars-kotor-2/index.html b/_site/categories/star-wars-kotor-2/index.html index bccf09c6..c08a2ba9 100644 --- a/_site/categories/star-wars-kotor-2/index.html +++ b/_site/categories/star-wars-kotor-2/index.html @@ -98,14 +98,12 @@ const todayEvent = getTodayEvent(); - if (todayEvent != "No event") { + if (todayEvent) { heroTopBarEl.classList.remove('hidden'); + heroTopBarEl.innerHTML = todayEvent.blurb; - if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); - } else { - headerImgEl.classList.add(getBanner(todayEvent)); - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); + if (todayEvent.class) { + headerImgEl.classList.add(todayEvent.class); } } @@ -114,196 +112,100 @@ const month = date.getMonth() + 1; const day = date.getDate(); - if (month == 3 && day == 1) - return "Zero Discrimination Day"; - else if (month == 3 && day == 8) - return "International Women's Day"; - else if (month == 3 && day == 31) - return "Trans Day of Visibility"; - else if (month == 4 && day == 6) - return "International Asexuality Day"; - else if (month == 4 && day == 26) - return "Lesbian Visibility Day"; - else if (month == 5 && day == 17) - return "IDAHOBIT"; - else if (month == 5 && day == 19) - return "Agender Pride Day"; - else if (month == 5 && day == 25) - return "Pansexual and Panromantic Awareness & Visibility Day"; - else if (month == 6) - return "Pride Month"; - else if (month == 7 && day == 14) - return "Non-Binary People's Day"; - else if (month == 7 && day == 28) - return "Leilukin's Birthday"; - else if (month == 9 && day == 11) - return "Leilukin's Hub Anniversary"; - else if (month == 9 && day == 23) - return "Bi Visibility Day"; - else if (month == 10 && day == 8) - return "International Lesbian Day"; - else if (month == 10 && day == 11) - return "National Coming Out Day"; - else if (month == 10 && day == 17) - return "Genderfluid Visibility Week"; - else if (month == 10 && day == 24) - return "Ace Week"; - else if (month == 10 && day == 26) - return "Intersex Awareness Day"; + const currentYear = date.getFullYear(); + const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear(); + const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate; + + if (month === 3 && day === 1) + return { + blurb: `Today is Zero Discrimination Day`, + class: "flag-progress-intersex", + }; + else if (month === 3 && day === 8) + return { + blurb: `Today is International Women's Day}`, + class: "symbol-venus", + }; + else if (month === 3 && day === 31) + return { + blurb: `Today is Trans Day of Visibility`, + class: "flag-trans", + }; + else if (month === 4 && day === 6) + return { + blurb: `Today is International Asexuality Day`, + class: "flag-ace", + }; + else if (month === 4 && day === 26) + return { + blurb: `Today is Lesbian Visibility Day`, + class: "flag-lesbian", + }; + else if (month === 5 && day === 17) + return { + blurb: `Today is International Day Against Homophobia, Biphobia and Transphobia`, + class: "flag-progress", + }; + else if (month === 5 && day === 19) + return { + blurb: `Today is Agender Pride Day`, + class: "flag-agender", + }; + else if (month === 5 && day === 25) + return { + blurb: `Today is Pansexual and Panromantic Awareness and Visibility Day`, + class: "flag-pan", + }; + else if (month === 6) + return { + blurb: `Happy Pride Month!`, + class: "flag-progress-intersex", + }; + else if (month === 7 && day === 14) + return { + blurb: `Today is Non-Binary People's Day`, + 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 Bi Visibility Day`, + class: "flag-bi", + }; + else if (month === 10 && day === 8) + return { + blurb: `Today is International Lesbian Day`, + class: "flag-lesbian", + }; + else if (month === 10 && day === 11) + return { + blurb: `Today is National Coming Out Day`, + class: "flag-rainbow", + }; + else if (month === 10 && day === 17) + return { + blurb: `Today is the start of Genderfluid Visibility Week`, + class: "flag-genderfluid", + }; + else if (month === 10 && day === 24) + return { + blurb: `Today is the start of Ace Week`, + class: "flag-ace", + }; + else if (month === 10 && day === 26) + return { + blurb: `Today is Intersex Awareness Day`, + class: "flag-intersex", + }; else - return "No event"; - } - - 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 Zero Discrimination Day - `; - break; - case "International Women's Day": - return ` - Today is International Women's Day - `; - break; - case "Trans Day of Visibility": - return ` - Today is Trans Day of Visibility - `; - break; - case "International Asexuality Day": - return ` - Today is International Asexuality Day - `; - break; - case "Lesbian Visibility Day": - return ` - Today is Lesbian Visibility Day - `; - break; - case "IDAHOBIT": - return ` - Today is International Day Against Homophobia, Biphobia and Transphobia - `; - break; - case "Agender Pride Day": - return ` - Today is Agender Pride Day - `; - break; - case "Pansexual and Panromantic Awareness & Visibility Day": - return ` - Today is Pansexual and Panromantic Visibility Day - `; - break; - case "Pride Month": - return ` - Happy Pride Month! - `; - break; - case "Non-Binary People's Day": - return ` - Today is Non-Binary People's Day - `; - 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 Bi Visibility Day - `; - break; - case "International Lesbian Day": - return ` - Today is International Lesbian Day - `; - break; - case "National Coming Out Day": - return ` - Today is National Coming Out Day - `; - break; - case "Genderfluid Visibility Week": - return ` - Today is the start of Genderfluid Visibility Week - `; - break; - case "Ace Week": - return ` - Today is the start of Ace Week - `; - break; - case "Intersex Awareness Day": - return ` - Today is Intersex Awareness Day - `; - break; - default: - return ``; - } + return null; } diff --git a/_site/categories/star-wars-kotor/index.html b/_site/categories/star-wars-kotor/index.html index a895332f..309481a0 100644 --- a/_site/categories/star-wars-kotor/index.html +++ b/_site/categories/star-wars-kotor/index.html @@ -98,14 +98,12 @@ const todayEvent = getTodayEvent(); - if (todayEvent != "No event") { + if (todayEvent) { heroTopBarEl.classList.remove('hidden'); + heroTopBarEl.innerHTML = todayEvent.blurb; - if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); - } else { - headerImgEl.classList.add(getBanner(todayEvent)); - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); + if (todayEvent.class) { + headerImgEl.classList.add(todayEvent.class); } } @@ -114,196 +112,100 @@ const month = date.getMonth() + 1; const day = date.getDate(); - if (month == 3 && day == 1) - return "Zero Discrimination Day"; - else if (month == 3 && day == 8) - return "International Women's Day"; - else if (month == 3 && day == 31) - return "Trans Day of Visibility"; - else if (month == 4 && day == 6) - return "International Asexuality Day"; - else if (month == 4 && day == 26) - return "Lesbian Visibility Day"; - else if (month == 5 && day == 17) - return "IDAHOBIT"; - else if (month == 5 && day == 19) - return "Agender Pride Day"; - else if (month == 5 && day == 25) - return "Pansexual and Panromantic Awareness & Visibility Day"; - else if (month == 6) - return "Pride Month"; - else if (month == 7 && day == 14) - return "Non-Binary People's Day"; - else if (month == 7 && day == 28) - return "Leilukin's Birthday"; - else if (month == 9 && day == 11) - return "Leilukin's Hub Anniversary"; - else if (month == 9 && day == 23) - return "Bi Visibility Day"; - else if (month == 10 && day == 8) - return "International Lesbian Day"; - else if (month == 10 && day == 11) - return "National Coming Out Day"; - else if (month == 10 && day == 17) - return "Genderfluid Visibility Week"; - else if (month == 10 && day == 24) - return "Ace Week"; - else if (month == 10 && day == 26) - return "Intersex Awareness Day"; + const currentYear = date.getFullYear(); + const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear(); + const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate; + + if (month === 3 && day === 1) + return { + blurb: `Today is Zero Discrimination Day`, + class: "flag-progress-intersex", + }; + else if (month === 3 && day === 8) + return { + blurb: `Today is International Women's Day}`, + class: "symbol-venus", + }; + else if (month === 3 && day === 31) + return { + blurb: `Today is Trans Day of Visibility`, + class: "flag-trans", + }; + else if (month === 4 && day === 6) + return { + blurb: `Today is International Asexuality Day`, + class: "flag-ace", + }; + else if (month === 4 && day === 26) + return { + blurb: `Today is Lesbian Visibility Day`, + class: "flag-lesbian", + }; + else if (month === 5 && day === 17) + return { + blurb: `Today is International Day Against Homophobia, Biphobia and Transphobia`, + class: "flag-progress", + }; + else if (month === 5 && day === 19) + return { + blurb: `Today is Agender Pride Day`, + class: "flag-agender", + }; + else if (month === 5 && day === 25) + return { + blurb: `Today is Pansexual and Panromantic Awareness and Visibility Day`, + class: "flag-pan", + }; + else if (month === 6) + return { + blurb: `Happy Pride Month!`, + class: "flag-progress-intersex", + }; + else if (month === 7 && day === 14) + return { + blurb: `Today is Non-Binary People's Day`, + 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 Bi Visibility Day`, + class: "flag-bi", + }; + else if (month === 10 && day === 8) + return { + blurb: `Today is International Lesbian Day`, + class: "flag-lesbian", + }; + else if (month === 10 && day === 11) + return { + blurb: `Today is National Coming Out Day`, + class: "flag-rainbow", + }; + else if (month === 10 && day === 17) + return { + blurb: `Today is the start of Genderfluid Visibility Week`, + class: "flag-genderfluid", + }; + else if (month === 10 && day === 24) + return { + blurb: `Today is the start of Ace Week`, + class: "flag-ace", + }; + else if (month === 10 && day === 26) + return { + blurb: `Today is Intersex Awareness Day`, + class: "flag-intersex", + }; else - return "No event"; - } - - 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 Zero Discrimination Day - `; - break; - case "International Women's Day": - return ` - Today is International Women's Day - `; - break; - case "Trans Day of Visibility": - return ` - Today is Trans Day of Visibility - `; - break; - case "International Asexuality Day": - return ` - Today is International Asexuality Day - `; - break; - case "Lesbian Visibility Day": - return ` - Today is Lesbian Visibility Day - `; - break; - case "IDAHOBIT": - return ` - Today is International Day Against Homophobia, Biphobia and Transphobia - `; - break; - case "Agender Pride Day": - return ` - Today is Agender Pride Day - `; - break; - case "Pansexual and Panromantic Awareness & Visibility Day": - return ` - Today is Pansexual and Panromantic Visibility Day - `; - break; - case "Pride Month": - return ` - Happy Pride Month! - `; - break; - case "Non-Binary People's Day": - return ` - Today is Non-Binary People's Day - `; - 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 Bi Visibility Day - `; - break; - case "International Lesbian Day": - return ` - Today is International Lesbian Day - `; - break; - case "National Coming Out Day": - return ` - Today is National Coming Out Day - `; - break; - case "Genderfluid Visibility Week": - return ` - Today is the start of Genderfluid Visibility Week - `; - break; - case "Ace Week": - return ` - Today is the start of Ace Week - `; - break; - case "Intersex Awareness Day": - return ` - Today is Intersex Awareness Day - `; - break; - default: - return ``; - } + return null; } diff --git a/_site/changelogs/2022/index.html b/_site/changelogs/2022/index.html index 903a6b6f..45d4f025 100644 --- a/_site/changelogs/2022/index.html +++ b/_site/changelogs/2022/index.html @@ -98,14 +98,12 @@ const todayEvent = getTodayEvent(); - if (todayEvent != "No event") { + if (todayEvent) { heroTopBarEl.classList.remove('hidden'); + heroTopBarEl.innerHTML = todayEvent.blurb; - if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); - } else { - headerImgEl.classList.add(getBanner(todayEvent)); - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); + if (todayEvent.class) { + headerImgEl.classList.add(todayEvent.class); } } @@ -114,196 +112,100 @@ const month = date.getMonth() + 1; const day = date.getDate(); - if (month == 3 && day == 1) - return "Zero Discrimination Day"; - else if (month == 3 && day == 8) - return "International Women's Day"; - else if (month == 3 && day == 31) - return "Trans Day of Visibility"; - else if (month == 4 && day == 6) - return "International Asexuality Day"; - else if (month == 4 && day == 26) - return "Lesbian Visibility Day"; - else if (month == 5 && day == 17) - return "IDAHOBIT"; - else if (month == 5 && day == 19) - return "Agender Pride Day"; - else if (month == 5 && day == 25) - return "Pansexual and Panromantic Awareness & Visibility Day"; - else if (month == 6) - return "Pride Month"; - else if (month == 7 && day == 14) - return "Non-Binary People's Day"; - else if (month == 7 && day == 28) - return "Leilukin's Birthday"; - else if (month == 9 && day == 11) - return "Leilukin's Hub Anniversary"; - else if (month == 9 && day == 23) - return "Bi Visibility Day"; - else if (month == 10 && day == 8) - return "International Lesbian Day"; - else if (month == 10 && day == 11) - return "National Coming Out Day"; - else if (month == 10 && day == 17) - return "Genderfluid Visibility Week"; - else if (month == 10 && day == 24) - return "Ace Week"; - else if (month == 10 && day == 26) - return "Intersex Awareness Day"; + const currentYear = date.getFullYear(); + const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear(); + const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate; + + if (month === 3 && day === 1) + return { + blurb: `Today is Zero Discrimination Day`, + class: "flag-progress-intersex", + }; + else if (month === 3 && day === 8) + return { + blurb: `Today is International Women's Day}`, + class: "symbol-venus", + }; + else if (month === 3 && day === 31) + return { + blurb: `Today is Trans Day of Visibility`, + class: "flag-trans", + }; + else if (month === 4 && day === 6) + return { + blurb: `Today is International Asexuality Day`, + class: "flag-ace", + }; + else if (month === 4 && day === 26) + return { + blurb: `Today is Lesbian Visibility Day`, + class: "flag-lesbian", + }; + else if (month === 5 && day === 17) + return { + blurb: `Today is International Day Against Homophobia, Biphobia and Transphobia`, + class: "flag-progress", + }; + else if (month === 5 && day === 19) + return { + blurb: `Today is Agender Pride Day`, + class: "flag-agender", + }; + else if (month === 5 && day === 25) + return { + blurb: `Today is Pansexual and Panromantic Awareness and Visibility Day`, + class: "flag-pan", + }; + else if (month === 6) + return { + blurb: `Happy Pride Month!`, + class: "flag-progress-intersex", + }; + else if (month === 7 && day === 14) + return { + blurb: `Today is Non-Binary People's Day`, + 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 Bi Visibility Day`, + class: "flag-bi", + }; + else if (month === 10 && day === 8) + return { + blurb: `Today is International Lesbian Day`, + class: "flag-lesbian", + }; + else if (month === 10 && day === 11) + return { + blurb: `Today is National Coming Out Day`, + class: "flag-rainbow", + }; + else if (month === 10 && day === 17) + return { + blurb: `Today is the start of Genderfluid Visibility Week`, + class: "flag-genderfluid", + }; + else if (month === 10 && day === 24) + return { + blurb: `Today is the start of Ace Week`, + class: "flag-ace", + }; + else if (month === 10 && day === 26) + return { + blurb: `Today is Intersex Awareness Day`, + class: "flag-intersex", + }; else - return "No event"; - } - - 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 Zero Discrimination Day - `; - break; - case "International Women's Day": - return ` - Today is International Women's Day - `; - break; - case "Trans Day of Visibility": - return ` - Today is Trans Day of Visibility - `; - break; - case "International Asexuality Day": - return ` - Today is International Asexuality Day - `; - break; - case "Lesbian Visibility Day": - return ` - Today is Lesbian Visibility Day - `; - break; - case "IDAHOBIT": - return ` - Today is International Day Against Homophobia, Biphobia and Transphobia - `; - break; - case "Agender Pride Day": - return ` - Today is Agender Pride Day - `; - break; - case "Pansexual and Panromantic Awareness & Visibility Day": - return ` - Today is Pansexual and Panromantic Visibility Day - `; - break; - case "Pride Month": - return ` - Happy Pride Month! - `; - break; - case "Non-Binary People's Day": - return ` - Today is Non-Binary People's Day - `; - 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 Bi Visibility Day - `; - break; - case "International Lesbian Day": - return ` - Today is International Lesbian Day - `; - break; - case "National Coming Out Day": - return ` - Today is National Coming Out Day - `; - break; - case "Genderfluid Visibility Week": - return ` - Today is the start of Genderfluid Visibility Week - `; - break; - case "Ace Week": - return ` - Today is the start of Ace Week - `; - break; - case "Intersex Awareness Day": - return ` - Today is Intersex Awareness Day - `; - break; - default: - return ``; - } + return null; } diff --git a/_site/changelogs/2023/index.html b/_site/changelogs/2023/index.html index a9103a73..9d885ee9 100644 --- a/_site/changelogs/2023/index.html +++ b/_site/changelogs/2023/index.html @@ -98,14 +98,12 @@ const todayEvent = getTodayEvent(); - if (todayEvent != "No event") { + if (todayEvent) { heroTopBarEl.classList.remove('hidden'); + heroTopBarEl.innerHTML = todayEvent.blurb; - if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); - } else { - headerImgEl.classList.add(getBanner(todayEvent)); - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); + if (todayEvent.class) { + headerImgEl.classList.add(todayEvent.class); } } @@ -114,196 +112,100 @@ const month = date.getMonth() + 1; const day = date.getDate(); - if (month == 3 && day == 1) - return "Zero Discrimination Day"; - else if (month == 3 && day == 8) - return "International Women's Day"; - else if (month == 3 && day == 31) - return "Trans Day of Visibility"; - else if (month == 4 && day == 6) - return "International Asexuality Day"; - else if (month == 4 && day == 26) - return "Lesbian Visibility Day"; - else if (month == 5 && day == 17) - return "IDAHOBIT"; - else if (month == 5 && day == 19) - return "Agender Pride Day"; - else if (month == 5 && day == 25) - return "Pansexual and Panromantic Awareness & Visibility Day"; - else if (month == 6) - return "Pride Month"; - else if (month == 7 && day == 14) - return "Non-Binary People's Day"; - else if (month == 7 && day == 28) - return "Leilukin's Birthday"; - else if (month == 9 && day == 11) - return "Leilukin's Hub Anniversary"; - else if (month == 9 && day == 23) - return "Bi Visibility Day"; - else if (month == 10 && day == 8) - return "International Lesbian Day"; - else if (month == 10 && day == 11) - return "National Coming Out Day"; - else if (month == 10 && day == 17) - return "Genderfluid Visibility Week"; - else if (month == 10 && day == 24) - return "Ace Week"; - else if (month == 10 && day == 26) - return "Intersex Awareness Day"; + const currentYear = date.getFullYear(); + const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear(); + const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate; + + if (month === 3 && day === 1) + return { + blurb: `Today is Zero Discrimination Day`, + class: "flag-progress-intersex", + }; + else if (month === 3 && day === 8) + return { + blurb: `Today is International Women's Day}`, + class: "symbol-venus", + }; + else if (month === 3 && day === 31) + return { + blurb: `Today is Trans Day of Visibility`, + class: "flag-trans", + }; + else if (month === 4 && day === 6) + return { + blurb: `Today is International Asexuality Day`, + class: "flag-ace", + }; + else if (month === 4 && day === 26) + return { + blurb: `Today is Lesbian Visibility Day`, + class: "flag-lesbian", + }; + else if (month === 5 && day === 17) + return { + blurb: `Today is International Day Against Homophobia, Biphobia and Transphobia`, + class: "flag-progress", + }; + else if (month === 5 && day === 19) + return { + blurb: `Today is Agender Pride Day`, + class: "flag-agender", + }; + else if (month === 5 && day === 25) + return { + blurb: `Today is Pansexual and Panromantic Awareness and Visibility Day`, + class: "flag-pan", + }; + else if (month === 6) + return { + blurb: `Happy Pride Month!`, + class: "flag-progress-intersex", + }; + else if (month === 7 && day === 14) + return { + blurb: `Today is Non-Binary People's Day`, + 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 Bi Visibility Day`, + class: "flag-bi", + }; + else if (month === 10 && day === 8) + return { + blurb: `Today is International Lesbian Day`, + class: "flag-lesbian", + }; + else if (month === 10 && day === 11) + return { + blurb: `Today is National Coming Out Day`, + class: "flag-rainbow", + }; + else if (month === 10 && day === 17) + return { + blurb: `Today is the start of Genderfluid Visibility Week`, + class: "flag-genderfluid", + }; + else if (month === 10 && day === 24) + return { + blurb: `Today is the start of Ace Week`, + class: "flag-ace", + }; + else if (month === 10 && day === 26) + return { + blurb: `Today is Intersex Awareness Day`, + class: "flag-intersex", + }; else - return "No event"; - } - - 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 Zero Discrimination Day - `; - break; - case "International Women's Day": - return ` - Today is International Women's Day - `; - break; - case "Trans Day of Visibility": - return ` - Today is Trans Day of Visibility - `; - break; - case "International Asexuality Day": - return ` - Today is International Asexuality Day - `; - break; - case "Lesbian Visibility Day": - return ` - Today is Lesbian Visibility Day - `; - break; - case "IDAHOBIT": - return ` - Today is International Day Against Homophobia, Biphobia and Transphobia - `; - break; - case "Agender Pride Day": - return ` - Today is Agender Pride Day - `; - break; - case "Pansexual and Panromantic Awareness & Visibility Day": - return ` - Today is Pansexual and Panromantic Visibility Day - `; - break; - case "Pride Month": - return ` - Happy Pride Month! - `; - break; - case "Non-Binary People's Day": - return ` - Today is Non-Binary People's Day - `; - 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 Bi Visibility Day - `; - break; - case "International Lesbian Day": - return ` - Today is International Lesbian Day - `; - break; - case "National Coming Out Day": - return ` - Today is National Coming Out Day - `; - break; - case "Genderfluid Visibility Week": - return ` - Today is the start of Genderfluid Visibility Week - `; - break; - case "Ace Week": - return ` - Today is the start of Ace Week - `; - break; - case "Intersex Awareness Day": - return ` - Today is Intersex Awareness Day - `; - break; - default: - return ``; - } + return null; } diff --git a/_site/changelogs/2024/index.html b/_site/changelogs/2024/index.html index 63caeaec..f8ec9a49 100644 --- a/_site/changelogs/2024/index.html +++ b/_site/changelogs/2024/index.html @@ -98,14 +98,12 @@ const todayEvent = getTodayEvent(); - if (todayEvent != "No event") { + if (todayEvent) { heroTopBarEl.classList.remove('hidden'); + heroTopBarEl.innerHTML = todayEvent.blurb; - if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); - } else { - headerImgEl.classList.add(getBanner(todayEvent)); - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); + if (todayEvent.class) { + headerImgEl.classList.add(todayEvent.class); } } @@ -114,196 +112,100 @@ const month = date.getMonth() + 1; const day = date.getDate(); - if (month == 3 && day == 1) - return "Zero Discrimination Day"; - else if (month == 3 && day == 8) - return "International Women's Day"; - else if (month == 3 && day == 31) - return "Trans Day of Visibility"; - else if (month == 4 && day == 6) - return "International Asexuality Day"; - else if (month == 4 && day == 26) - return "Lesbian Visibility Day"; - else if (month == 5 && day == 17) - return "IDAHOBIT"; - else if (month == 5 && day == 19) - return "Agender Pride Day"; - else if (month == 5 && day == 25) - return "Pansexual and Panromantic Awareness & Visibility Day"; - else if (month == 6) - return "Pride Month"; - else if (month == 7 && day == 14) - return "Non-Binary People's Day"; - else if (month == 7 && day == 28) - return "Leilukin's Birthday"; - else if (month == 9 && day == 11) - return "Leilukin's Hub Anniversary"; - else if (month == 9 && day == 23) - return "Bi Visibility Day"; - else if (month == 10 && day == 8) - return "International Lesbian Day"; - else if (month == 10 && day == 11) - return "National Coming Out Day"; - else if (month == 10 && day == 17) - return "Genderfluid Visibility Week"; - else if (month == 10 && day == 24) - return "Ace Week"; - else if (month == 10 && day == 26) - return "Intersex Awareness Day"; + const currentYear = date.getFullYear(); + const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear(); + const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate; + + if (month === 3 && day === 1) + return { + blurb: `Today is Zero Discrimination Day`, + class: "flag-progress-intersex", + }; + else if (month === 3 && day === 8) + return { + blurb: `Today is International Women's Day}`, + class: "symbol-venus", + }; + else if (month === 3 && day === 31) + return { + blurb: `Today is Trans Day of Visibility`, + class: "flag-trans", + }; + else if (month === 4 && day === 6) + return { + blurb: `Today is International Asexuality Day`, + class: "flag-ace", + }; + else if (month === 4 && day === 26) + return { + blurb: `Today is Lesbian Visibility Day`, + class: "flag-lesbian", + }; + else if (month === 5 && day === 17) + return { + blurb: `Today is International Day Against Homophobia, Biphobia and Transphobia`, + class: "flag-progress", + }; + else if (month === 5 && day === 19) + return { + blurb: `Today is Agender Pride Day`, + class: "flag-agender", + }; + else if (month === 5 && day === 25) + return { + blurb: `Today is Pansexual and Panromantic Awareness and Visibility Day`, + class: "flag-pan", + }; + else if (month === 6) + return { + blurb: `Happy Pride Month!`, + class: "flag-progress-intersex", + }; + else if (month === 7 && day === 14) + return { + blurb: `Today is Non-Binary People's Day`, + 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 Bi Visibility Day`, + class: "flag-bi", + }; + else if (month === 10 && day === 8) + return { + blurb: `Today is International Lesbian Day`, + class: "flag-lesbian", + }; + else if (month === 10 && day === 11) + return { + blurb: `Today is National Coming Out Day`, + class: "flag-rainbow", + }; + else if (month === 10 && day === 17) + return { + blurb: `Today is the start of Genderfluid Visibility Week`, + class: "flag-genderfluid", + }; + else if (month === 10 && day === 24) + return { + blurb: `Today is the start of Ace Week`, + class: "flag-ace", + }; + else if (month === 10 && day === 26) + return { + blurb: `Today is Intersex Awareness Day`, + class: "flag-intersex", + }; else - return "No event"; - } - - 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 Zero Discrimination Day - `; - break; - case "International Women's Day": - return ` - Today is International Women's Day - `; - break; - case "Trans Day of Visibility": - return ` - Today is Trans Day of Visibility - `; - break; - case "International Asexuality Day": - return ` - Today is International Asexuality Day - `; - break; - case "Lesbian Visibility Day": - return ` - Today is Lesbian Visibility Day - `; - break; - case "IDAHOBIT": - return ` - Today is International Day Against Homophobia, Biphobia and Transphobia - `; - break; - case "Agender Pride Day": - return ` - Today is Agender Pride Day - `; - break; - case "Pansexual and Panromantic Awareness & Visibility Day": - return ` - Today is Pansexual and Panromantic Visibility Day - `; - break; - case "Pride Month": - return ` - Happy Pride Month! - `; - break; - case "Non-Binary People's Day": - return ` - Today is Non-Binary People's Day - `; - 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 Bi Visibility Day - `; - break; - case "International Lesbian Day": - return ` - Today is International Lesbian Day - `; - break; - case "National Coming Out Day": - return ` - Today is National Coming Out Day - `; - break; - case "Genderfluid Visibility Week": - return ` - Today is the start of Genderfluid Visibility Week - `; - break; - case "Ace Week": - return ` - Today is the start of Ace Week - `; - break; - case "Intersex Awareness Day": - return ` - Today is Intersex Awareness Day - `; - break; - default: - return ``; - } + return null; } diff --git a/_site/changelogs/index.html b/_site/changelogs/index.html index d91de974..4c4bb1eb 100644 --- a/_site/changelogs/index.html +++ b/_site/changelogs/index.html @@ -98,14 +98,12 @@ const todayEvent = getTodayEvent(); - if (todayEvent != "No event") { + if (todayEvent) { heroTopBarEl.classList.remove('hidden'); + heroTopBarEl.innerHTML = todayEvent.blurb; - if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); - } else { - headerImgEl.classList.add(getBanner(todayEvent)); - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); + if (todayEvent.class) { + headerImgEl.classList.add(todayEvent.class); } } @@ -114,196 +112,100 @@ const month = date.getMonth() + 1; const day = date.getDate(); - if (month == 3 && day == 1) - return "Zero Discrimination Day"; - else if (month == 3 && day == 8) - return "International Women's Day"; - else if (month == 3 && day == 31) - return "Trans Day of Visibility"; - else if (month == 4 && day == 6) - return "International Asexuality Day"; - else if (month == 4 && day == 26) - return "Lesbian Visibility Day"; - else if (month == 5 && day == 17) - return "IDAHOBIT"; - else if (month == 5 && day == 19) - return "Agender Pride Day"; - else if (month == 5 && day == 25) - return "Pansexual and Panromantic Awareness & Visibility Day"; - else if (month == 6) - return "Pride Month"; - else if (month == 7 && day == 14) - return "Non-Binary People's Day"; - else if (month == 7 && day == 28) - return "Leilukin's Birthday"; - else if (month == 9 && day == 11) - return "Leilukin's Hub Anniversary"; - else if (month == 9 && day == 23) - return "Bi Visibility Day"; - else if (month == 10 && day == 8) - return "International Lesbian Day"; - else if (month == 10 && day == 11) - return "National Coming Out Day"; - else if (month == 10 && day == 17) - return "Genderfluid Visibility Week"; - else if (month == 10 && day == 24) - return "Ace Week"; - else if (month == 10 && day == 26) - return "Intersex Awareness Day"; + const currentYear = date.getFullYear(); + const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear(); + const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate; + + if (month === 3 && day === 1) + return { + blurb: `Today is Zero Discrimination Day`, + class: "flag-progress-intersex", + }; + else if (month === 3 && day === 8) + return { + blurb: `Today is International Women's Day}`, + class: "symbol-venus", + }; + else if (month === 3 && day === 31) + return { + blurb: `Today is Trans Day of Visibility`, + class: "flag-trans", + }; + else if (month === 4 && day === 6) + return { + blurb: `Today is International Asexuality Day`, + class: "flag-ace", + }; + else if (month === 4 && day === 26) + return { + blurb: `Today is Lesbian Visibility Day`, + class: "flag-lesbian", + }; + else if (month === 5 && day === 17) + return { + blurb: `Today is International Day Against Homophobia, Biphobia and Transphobia`, + class: "flag-progress", + }; + else if (month === 5 && day === 19) + return { + blurb: `Today is Agender Pride Day`, + class: "flag-agender", + }; + else if (month === 5 && day === 25) + return { + blurb: `Today is Pansexual and Panromantic Awareness and Visibility Day`, + class: "flag-pan", + }; + else if (month === 6) + return { + blurb: `Happy Pride Month!`, + class: "flag-progress-intersex", + }; + else if (month === 7 && day === 14) + return { + blurb: `Today is Non-Binary People's Day`, + 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 Bi Visibility Day`, + class: "flag-bi", + }; + else if (month === 10 && day === 8) + return { + blurb: `Today is International Lesbian Day`, + class: "flag-lesbian", + }; + else if (month === 10 && day === 11) + return { + blurb: `Today is National Coming Out Day`, + class: "flag-rainbow", + }; + else if (month === 10 && day === 17) + return { + blurb: `Today is the start of Genderfluid Visibility Week`, + class: "flag-genderfluid", + }; + else if (month === 10 && day === 24) + return { + blurb: `Today is the start of Ace Week`, + class: "flag-ace", + }; + else if (month === 10 && day === 26) + return { + blurb: `Today is Intersex Awareness Day`, + class: "flag-intersex", + }; else - return "No event"; - } - - 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 Zero Discrimination Day - `; - break; - case "International Women's Day": - return ` - Today is International Women's Day - `; - break; - case "Trans Day of Visibility": - return ` - Today is Trans Day of Visibility - `; - break; - case "International Asexuality Day": - return ` - Today is International Asexuality Day - `; - break; - case "Lesbian Visibility Day": - return ` - Today is Lesbian Visibility Day - `; - break; - case "IDAHOBIT": - return ` - Today is International Day Against Homophobia, Biphobia and Transphobia - `; - break; - case "Agender Pride Day": - return ` - Today is Agender Pride Day - `; - break; - case "Pansexual and Panromantic Awareness & Visibility Day": - return ` - Today is Pansexual and Panromantic Visibility Day - `; - break; - case "Pride Month": - return ` - Happy Pride Month! - `; - break; - case "Non-Binary People's Day": - return ` - Today is Non-Binary People's Day - `; - 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 Bi Visibility Day - `; - break; - case "International Lesbian Day": - return ` - Today is International Lesbian Day - `; - break; - case "National Coming Out Day": - return ` - Today is National Coming Out Day - `; - break; - case "Genderfluid Visibility Week": - return ` - Today is the start of Genderfluid Visibility Week - `; - break; - case "Ace Week": - return ` - Today is the start of Ace Week - `; - break; - case "Intersex Awareness Day": - return ` - Today is Intersex Awareness Day - `; - break; - default: - return ``; - } + return null; } diff --git a/_site/changelogs/layouts/index.html b/_site/changelogs/layouts/index.html index ee3a2af0..d73cc8dc 100644 --- a/_site/changelogs/layouts/index.html +++ b/_site/changelogs/layouts/index.html @@ -98,14 +98,12 @@ const todayEvent = getTodayEvent(); - if (todayEvent != "No event") { + if (todayEvent) { heroTopBarEl.classList.remove('hidden'); + heroTopBarEl.innerHTML = todayEvent.blurb; - if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); - } else { - headerImgEl.classList.add(getBanner(todayEvent)); - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); + if (todayEvent.class) { + headerImgEl.classList.add(todayEvent.class); } } @@ -114,196 +112,100 @@ const month = date.getMonth() + 1; const day = date.getDate(); - if (month == 3 && day == 1) - return "Zero Discrimination Day"; - else if (month == 3 && day == 8) - return "International Women's Day"; - else if (month == 3 && day == 31) - return "Trans Day of Visibility"; - else if (month == 4 && day == 6) - return "International Asexuality Day"; - else if (month == 4 && day == 26) - return "Lesbian Visibility Day"; - else if (month == 5 && day == 17) - return "IDAHOBIT"; - else if (month == 5 && day == 19) - return "Agender Pride Day"; - else if (month == 5 && day == 25) - return "Pansexual and Panromantic Awareness & Visibility Day"; - else if (month == 6) - return "Pride Month"; - else if (month == 7 && day == 14) - return "Non-Binary People's Day"; - else if (month == 7 && day == 28) - return "Leilukin's Birthday"; - else if (month == 9 && day == 11) - return "Leilukin's Hub Anniversary"; - else if (month == 9 && day == 23) - return "Bi Visibility Day"; - else if (month == 10 && day == 8) - return "International Lesbian Day"; - else if (month == 10 && day == 11) - return "National Coming Out Day"; - else if (month == 10 && day == 17) - return "Genderfluid Visibility Week"; - else if (month == 10 && day == 24) - return "Ace Week"; - else if (month == 10 && day == 26) - return "Intersex Awareness Day"; + const currentYear = date.getFullYear(); + const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear(); + const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate; + + if (month === 3 && day === 1) + return { + blurb: `Today is Zero Discrimination Day`, + class: "flag-progress-intersex", + }; + else if (month === 3 && day === 8) + return { + blurb: `Today is International Women's Day}`, + class: "symbol-venus", + }; + else if (month === 3 && day === 31) + return { + blurb: `Today is Trans Day of Visibility`, + class: "flag-trans", + }; + else if (month === 4 && day === 6) + return { + blurb: `Today is International Asexuality Day`, + class: "flag-ace", + }; + else if (month === 4 && day === 26) + return { + blurb: `Today is Lesbian Visibility Day`, + class: "flag-lesbian", + }; + else if (month === 5 && day === 17) + return { + blurb: `Today is International Day Against Homophobia, Biphobia and Transphobia`, + class: "flag-progress", + }; + else if (month === 5 && day === 19) + return { + blurb: `Today is Agender Pride Day`, + class: "flag-agender", + }; + else if (month === 5 && day === 25) + return { + blurb: `Today is Pansexual and Panromantic Awareness and Visibility Day`, + class: "flag-pan", + }; + else if (month === 6) + return { + blurb: `Happy Pride Month!`, + class: "flag-progress-intersex", + }; + else if (month === 7 && day === 14) + return { + blurb: `Today is Non-Binary People's Day`, + 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 Bi Visibility Day`, + class: "flag-bi", + }; + else if (month === 10 && day === 8) + return { + blurb: `Today is International Lesbian Day`, + class: "flag-lesbian", + }; + else if (month === 10 && day === 11) + return { + blurb: `Today is National Coming Out Day`, + class: "flag-rainbow", + }; + else if (month === 10 && day === 17) + return { + blurb: `Today is the start of Genderfluid Visibility Week`, + class: "flag-genderfluid", + }; + else if (month === 10 && day === 24) + return { + blurb: `Today is the start of Ace Week`, + class: "flag-ace", + }; + else if (month === 10 && day === 26) + return { + blurb: `Today is Intersex Awareness Day`, + class: "flag-intersex", + }; else - return "No event"; - } - - 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 Zero Discrimination Day - `; - break; - case "International Women's Day": - return ` - Today is International Women's Day - `; - break; - case "Trans Day of Visibility": - return ` - Today is Trans Day of Visibility - `; - break; - case "International Asexuality Day": - return ` - Today is International Asexuality Day - `; - break; - case "Lesbian Visibility Day": - return ` - Today is Lesbian Visibility Day - `; - break; - case "IDAHOBIT": - return ` - Today is International Day Against Homophobia, Biphobia and Transphobia - `; - break; - case "Agender Pride Day": - return ` - Today is Agender Pride Day - `; - break; - case "Pansexual and Panromantic Awareness & Visibility Day": - return ` - Today is Pansexual and Panromantic Visibility Day - `; - break; - case "Pride Month": - return ` - Happy Pride Month! - `; - break; - case "Non-Binary People's Day": - return ` - Today is Non-Binary People's Day - `; - 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 Bi Visibility Day - `; - break; - case "International Lesbian Day": - return ` - Today is International Lesbian Day - `; - break; - case "National Coming Out Day": - return ` - Today is National Coming Out Day - `; - break; - case "Genderfluid Visibility Week": - return ` - Today is the start of Genderfluid Visibility Week - `; - break; - case "Ace Week": - return ` - Today is the start of Ace Week - `; - break; - case "Intersex Awareness Day": - return ` - Today is Intersex Awareness Day - `; - break; - default: - return ``; - } + return null; } diff --git a/_site/changelogs/page/2/index.html b/_site/changelogs/page/2/index.html index 1baa436f..653620bb 100644 --- a/_site/changelogs/page/2/index.html +++ b/_site/changelogs/page/2/index.html @@ -98,14 +98,12 @@ const todayEvent = getTodayEvent(); - if (todayEvent != "No event") { + if (todayEvent) { heroTopBarEl.classList.remove('hidden'); + heroTopBarEl.innerHTML = todayEvent.blurb; - if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); - } else { - headerImgEl.classList.add(getBanner(todayEvent)); - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); + if (todayEvent.class) { + headerImgEl.classList.add(todayEvent.class); } } @@ -114,196 +112,100 @@ const month = date.getMonth() + 1; const day = date.getDate(); - if (month == 3 && day == 1) - return "Zero Discrimination Day"; - else if (month == 3 && day == 8) - return "International Women's Day"; - else if (month == 3 && day == 31) - return "Trans Day of Visibility"; - else if (month == 4 && day == 6) - return "International Asexuality Day"; - else if (month == 4 && day == 26) - return "Lesbian Visibility Day"; - else if (month == 5 && day == 17) - return "IDAHOBIT"; - else if (month == 5 && day == 19) - return "Agender Pride Day"; - else if (month == 5 && day == 25) - return "Pansexual and Panromantic Awareness & Visibility Day"; - else if (month == 6) - return "Pride Month"; - else if (month == 7 && day == 14) - return "Non-Binary People's Day"; - else if (month == 7 && day == 28) - return "Leilukin's Birthday"; - else if (month == 9 && day == 11) - return "Leilukin's Hub Anniversary"; - else if (month == 9 && day == 23) - return "Bi Visibility Day"; - else if (month == 10 && day == 8) - return "International Lesbian Day"; - else if (month == 10 && day == 11) - return "National Coming Out Day"; - else if (month == 10 && day == 17) - return "Genderfluid Visibility Week"; - else if (month == 10 && day == 24) - return "Ace Week"; - else if (month == 10 && day == 26) - return "Intersex Awareness Day"; + const currentYear = date.getFullYear(); + const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear(); + const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate; + + if (month === 3 && day === 1) + return { + blurb: `Today is Zero Discrimination Day`, + class: "flag-progress-intersex", + }; + else if (month === 3 && day === 8) + return { + blurb: `Today is International Women's Day}`, + class: "symbol-venus", + }; + else if (month === 3 && day === 31) + return { + blurb: `Today is Trans Day of Visibility`, + class: "flag-trans", + }; + else if (month === 4 && day === 6) + return { + blurb: `Today is International Asexuality Day`, + class: "flag-ace", + }; + else if (month === 4 && day === 26) + return { + blurb: `Today is Lesbian Visibility Day`, + class: "flag-lesbian", + }; + else if (month === 5 && day === 17) + return { + blurb: `Today is International Day Against Homophobia, Biphobia and Transphobia`, + class: "flag-progress", + }; + else if (month === 5 && day === 19) + return { + blurb: `Today is Agender Pride Day`, + class: "flag-agender", + }; + else if (month === 5 && day === 25) + return { + blurb: `Today is Pansexual and Panromantic Awareness and Visibility Day`, + class: "flag-pan", + }; + else if (month === 6) + return { + blurb: `Happy Pride Month!`, + class: "flag-progress-intersex", + }; + else if (month === 7 && day === 14) + return { + blurb: `Today is Non-Binary People's Day`, + 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 Bi Visibility Day`, + class: "flag-bi", + }; + else if (month === 10 && day === 8) + return { + blurb: `Today is International Lesbian Day`, + class: "flag-lesbian", + }; + else if (month === 10 && day === 11) + return { + blurb: `Today is National Coming Out Day`, + class: "flag-rainbow", + }; + else if (month === 10 && day === 17) + return { + blurb: `Today is the start of Genderfluid Visibility Week`, + class: "flag-genderfluid", + }; + else if (month === 10 && day === 24) + return { + blurb: `Today is the start of Ace Week`, + class: "flag-ace", + }; + else if (month === 10 && day === 26) + return { + blurb: `Today is Intersex Awareness Day`, + class: "flag-intersex", + }; else - return "No event"; - } - - 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 Zero Discrimination Day - `; - break; - case "International Women's Day": - return ` - Today is International Women's Day - `; - break; - case "Trans Day of Visibility": - return ` - Today is Trans Day of Visibility - `; - break; - case "International Asexuality Day": - return ` - Today is International Asexuality Day - `; - break; - case "Lesbian Visibility Day": - return ` - Today is Lesbian Visibility Day - `; - break; - case "IDAHOBIT": - return ` - Today is International Day Against Homophobia, Biphobia and Transphobia - `; - break; - case "Agender Pride Day": - return ` - Today is Agender Pride Day - `; - break; - case "Pansexual and Panromantic Awareness & Visibility Day": - return ` - Today is Pansexual and Panromantic Visibility Day - `; - break; - case "Pride Month": - return ` - Happy Pride Month! - `; - break; - case "Non-Binary People's Day": - return ` - Today is Non-Binary People's Day - `; - 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 Bi Visibility Day - `; - break; - case "International Lesbian Day": - return ` - Today is International Lesbian Day - `; - break; - case "National Coming Out Day": - return ` - Today is National Coming Out Day - `; - break; - case "Genderfluid Visibility Week": - return ` - Today is the start of Genderfluid Visibility Week - `; - break; - case "Ace Week": - return ` - Today is the start of Ace Week - `; - break; - case "Intersex Awareness Day": - return ` - Today is Intersex Awareness Day - `; - break; - default: - return ``; - } + return null; } diff --git a/_site/changelogs/page/3/index.html b/_site/changelogs/page/3/index.html index 2eaad086..5432d883 100644 --- a/_site/changelogs/page/3/index.html +++ b/_site/changelogs/page/3/index.html @@ -98,14 +98,12 @@ const todayEvent = getTodayEvent(); - if (todayEvent != "No event") { + if (todayEvent) { heroTopBarEl.classList.remove('hidden'); + heroTopBarEl.innerHTML = todayEvent.blurb; - if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); - } else { - headerImgEl.classList.add(getBanner(todayEvent)); - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); + if (todayEvent.class) { + headerImgEl.classList.add(todayEvent.class); } } @@ -114,196 +112,100 @@ const month = date.getMonth() + 1; const day = date.getDate(); - if (month == 3 && day == 1) - return "Zero Discrimination Day"; - else if (month == 3 && day == 8) - return "International Women's Day"; - else if (month == 3 && day == 31) - return "Trans Day of Visibility"; - else if (month == 4 && day == 6) - return "International Asexuality Day"; - else if (month == 4 && day == 26) - return "Lesbian Visibility Day"; - else if (month == 5 && day == 17) - return "IDAHOBIT"; - else if (month == 5 && day == 19) - return "Agender Pride Day"; - else if (month == 5 && day == 25) - return "Pansexual and Panromantic Awareness & Visibility Day"; - else if (month == 6) - return "Pride Month"; - else if (month == 7 && day == 14) - return "Non-Binary People's Day"; - else if (month == 7 && day == 28) - return "Leilukin's Birthday"; - else if (month == 9 && day == 11) - return "Leilukin's Hub Anniversary"; - else if (month == 9 && day == 23) - return "Bi Visibility Day"; - else if (month == 10 && day == 8) - return "International Lesbian Day"; - else if (month == 10 && day == 11) - return "National Coming Out Day"; - else if (month == 10 && day == 17) - return "Genderfluid Visibility Week"; - else if (month == 10 && day == 24) - return "Ace Week"; - else if (month == 10 && day == 26) - return "Intersex Awareness Day"; + const currentYear = date.getFullYear(); + const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear(); + const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate; + + if (month === 3 && day === 1) + return { + blurb: `Today is Zero Discrimination Day`, + class: "flag-progress-intersex", + }; + else if (month === 3 && day === 8) + return { + blurb: `Today is International Women's Day}`, + class: "symbol-venus", + }; + else if (month === 3 && day === 31) + return { + blurb: `Today is Trans Day of Visibility`, + class: "flag-trans", + }; + else if (month === 4 && day === 6) + return { + blurb: `Today is International Asexuality Day`, + class: "flag-ace", + }; + else if (month === 4 && day === 26) + return { + blurb: `Today is Lesbian Visibility Day`, + class: "flag-lesbian", + }; + else if (month === 5 && day === 17) + return { + blurb: `Today is International Day Against Homophobia, Biphobia and Transphobia`, + class: "flag-progress", + }; + else if (month === 5 && day === 19) + return { + blurb: `Today is Agender Pride Day`, + class: "flag-agender", + }; + else if (month === 5 && day === 25) + return { + blurb: `Today is Pansexual and Panromantic Awareness and Visibility Day`, + class: "flag-pan", + }; + else if (month === 6) + return { + blurb: `Happy Pride Month!`, + class: "flag-progress-intersex", + }; + else if (month === 7 && day === 14) + return { + blurb: `Today is Non-Binary People's Day`, + 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 Bi Visibility Day`, + class: "flag-bi", + }; + else if (month === 10 && day === 8) + return { + blurb: `Today is International Lesbian Day`, + class: "flag-lesbian", + }; + else if (month === 10 && day === 11) + return { + blurb: `Today is National Coming Out Day`, + class: "flag-rainbow", + }; + else if (month === 10 && day === 17) + return { + blurb: `Today is the start of Genderfluid Visibility Week`, + class: "flag-genderfluid", + }; + else if (month === 10 && day === 24) + return { + blurb: `Today is the start of Ace Week`, + class: "flag-ace", + }; + else if (month === 10 && day === 26) + return { + blurb: `Today is Intersex Awareness Day`, + class: "flag-intersex", + }; else - return "No event"; - } - - 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 Zero Discrimination Day - `; - break; - case "International Women's Day": - return ` - Today is International Women's Day - `; - break; - case "Trans Day of Visibility": - return ` - Today is Trans Day of Visibility - `; - break; - case "International Asexuality Day": - return ` - Today is International Asexuality Day - `; - break; - case "Lesbian Visibility Day": - return ` - Today is Lesbian Visibility Day - `; - break; - case "IDAHOBIT": - return ` - Today is International Day Against Homophobia, Biphobia and Transphobia - `; - break; - case "Agender Pride Day": - return ` - Today is Agender Pride Day - `; - break; - case "Pansexual and Panromantic Awareness & Visibility Day": - return ` - Today is Pansexual and Panromantic Visibility Day - `; - break; - case "Pride Month": - return ` - Happy Pride Month! - `; - break; - case "Non-Binary People's Day": - return ` - Today is Non-Binary People's Day - `; - 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 Bi Visibility Day - `; - break; - case "International Lesbian Day": - return ` - Today is International Lesbian Day - `; - break; - case "National Coming Out Day": - return ` - Today is National Coming Out Day - `; - break; - case "Genderfluid Visibility Week": - return ` - Today is the start of Genderfluid Visibility Week - `; - break; - case "Ace Week": - return ` - Today is the start of Ace Week - `; - break; - case "Intersex Awareness Day": - return ` - Today is Intersex Awareness Day - `; - break; - default: - return ``; - } + return null; } diff --git a/_site/changelogs/page/4/index.html b/_site/changelogs/page/4/index.html index 94943477..06c33294 100644 --- a/_site/changelogs/page/4/index.html +++ b/_site/changelogs/page/4/index.html @@ -98,14 +98,12 @@ const todayEvent = getTodayEvent(); - if (todayEvent != "No event") { + if (todayEvent) { heroTopBarEl.classList.remove('hidden'); + heroTopBarEl.innerHTML = todayEvent.blurb; - if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); - } else { - headerImgEl.classList.add(getBanner(todayEvent)); - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); + if (todayEvent.class) { + headerImgEl.classList.add(todayEvent.class); } } @@ -114,196 +112,100 @@ const month = date.getMonth() + 1; const day = date.getDate(); - if (month == 3 && day == 1) - return "Zero Discrimination Day"; - else if (month == 3 && day == 8) - return "International Women's Day"; - else if (month == 3 && day == 31) - return "Trans Day of Visibility"; - else if (month == 4 && day == 6) - return "International Asexuality Day"; - else if (month == 4 && day == 26) - return "Lesbian Visibility Day"; - else if (month == 5 && day == 17) - return "IDAHOBIT"; - else if (month == 5 && day == 19) - return "Agender Pride Day"; - else if (month == 5 && day == 25) - return "Pansexual and Panromantic Awareness & Visibility Day"; - else if (month == 6) - return "Pride Month"; - else if (month == 7 && day == 14) - return "Non-Binary People's Day"; - else if (month == 7 && day == 28) - return "Leilukin's Birthday"; - else if (month == 9 && day == 11) - return "Leilukin's Hub Anniversary"; - else if (month == 9 && day == 23) - return "Bi Visibility Day"; - else if (month == 10 && day == 8) - return "International Lesbian Day"; - else if (month == 10 && day == 11) - return "National Coming Out Day"; - else if (month == 10 && day == 17) - return "Genderfluid Visibility Week"; - else if (month == 10 && day == 24) - return "Ace Week"; - else if (month == 10 && day == 26) - return "Intersex Awareness Day"; + const currentYear = date.getFullYear(); + const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear(); + const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate; + + if (month === 3 && day === 1) + return { + blurb: `Today is Zero Discrimination Day`, + class: "flag-progress-intersex", + }; + else if (month === 3 && day === 8) + return { + blurb: `Today is International Women's Day}`, + class: "symbol-venus", + }; + else if (month === 3 && day === 31) + return { + blurb: `Today is Trans Day of Visibility`, + class: "flag-trans", + }; + else if (month === 4 && day === 6) + return { + blurb: `Today is International Asexuality Day`, + class: "flag-ace", + }; + else if (month === 4 && day === 26) + return { + blurb: `Today is Lesbian Visibility Day`, + class: "flag-lesbian", + }; + else if (month === 5 && day === 17) + return { + blurb: `Today is International Day Against Homophobia, Biphobia and Transphobia`, + class: "flag-progress", + }; + else if (month === 5 && day === 19) + return { + blurb: `Today is Agender Pride Day`, + class: "flag-agender", + }; + else if (month === 5 && day === 25) + return { + blurb: `Today is Pansexual and Panromantic Awareness and Visibility Day`, + class: "flag-pan", + }; + else if (month === 6) + return { + blurb: `Happy Pride Month!`, + class: "flag-progress-intersex", + }; + else if (month === 7 && day === 14) + return { + blurb: `Today is Non-Binary People's Day`, + 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 Bi Visibility Day`, + class: "flag-bi", + }; + else if (month === 10 && day === 8) + return { + blurb: `Today is International Lesbian Day`, + class: "flag-lesbian", + }; + else if (month === 10 && day === 11) + return { + blurb: `Today is National Coming Out Day`, + class: "flag-rainbow", + }; + else if (month === 10 && day === 17) + return { + blurb: `Today is the start of Genderfluid Visibility Week`, + class: "flag-genderfluid", + }; + else if (month === 10 && day === 24) + return { + blurb: `Today is the start of Ace Week`, + class: "flag-ace", + }; + else if (month === 10 && day === 26) + return { + blurb: `Today is Intersex Awareness Day`, + class: "flag-intersex", + }; else - return "No event"; - } - - 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 Zero Discrimination Day - `; - break; - case "International Women's Day": - return ` - Today is International Women's Day - `; - break; - case "Trans Day of Visibility": - return ` - Today is Trans Day of Visibility - `; - break; - case "International Asexuality Day": - return ` - Today is International Asexuality Day - `; - break; - case "Lesbian Visibility Day": - return ` - Today is Lesbian Visibility Day - `; - break; - case "IDAHOBIT": - return ` - Today is International Day Against Homophobia, Biphobia and Transphobia - `; - break; - case "Agender Pride Day": - return ` - Today is Agender Pride Day - `; - break; - case "Pansexual and Panromantic Awareness & Visibility Day": - return ` - Today is Pansexual and Panromantic Visibility Day - `; - break; - case "Pride Month": - return ` - Happy Pride Month! - `; - break; - case "Non-Binary People's Day": - return ` - Today is Non-Binary People's Day - `; - 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 Bi Visibility Day - `; - break; - case "International Lesbian Day": - return ` - Today is International Lesbian Day - `; - break; - case "National Coming Out Day": - return ` - Today is National Coming Out Day - `; - break; - case "Genderfluid Visibility Week": - return ` - Today is the start of Genderfluid Visibility Week - `; - break; - case "Ace Week": - return ` - Today is the start of Ace Week - `; - break; - case "Intersex Awareness Day": - return ` - Today is Intersex Awareness Day - `; - break; - default: - return ``; - } + return null; } diff --git a/_site/changelogs/page/5/index.html b/_site/changelogs/page/5/index.html index 88de74d7..60a1e049 100644 --- a/_site/changelogs/page/5/index.html +++ b/_site/changelogs/page/5/index.html @@ -98,14 +98,12 @@ const todayEvent = getTodayEvent(); - if (todayEvent != "No event") { + if (todayEvent) { heroTopBarEl.classList.remove('hidden'); + heroTopBarEl.innerHTML = todayEvent.blurb; - if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); - } else { - headerImgEl.classList.add(getBanner(todayEvent)); - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); + if (todayEvent.class) { + headerImgEl.classList.add(todayEvent.class); } } @@ -114,196 +112,100 @@ const month = date.getMonth() + 1; const day = date.getDate(); - if (month == 3 && day == 1) - return "Zero Discrimination Day"; - else if (month == 3 && day == 8) - return "International Women's Day"; - else if (month == 3 && day == 31) - return "Trans Day of Visibility"; - else if (month == 4 && day == 6) - return "International Asexuality Day"; - else if (month == 4 && day == 26) - return "Lesbian Visibility Day"; - else if (month == 5 && day == 17) - return "IDAHOBIT"; - else if (month == 5 && day == 19) - return "Agender Pride Day"; - else if (month == 5 && day == 25) - return "Pansexual and Panromantic Awareness & Visibility Day"; - else if (month == 6) - return "Pride Month"; - else if (month == 7 && day == 14) - return "Non-Binary People's Day"; - else if (month == 7 && day == 28) - return "Leilukin's Birthday"; - else if (month == 9 && day == 11) - return "Leilukin's Hub Anniversary"; - else if (month == 9 && day == 23) - return "Bi Visibility Day"; - else if (month == 10 && day == 8) - return "International Lesbian Day"; - else if (month == 10 && day == 11) - return "National Coming Out Day"; - else if (month == 10 && day == 17) - return "Genderfluid Visibility Week"; - else if (month == 10 && day == 24) - return "Ace Week"; - else if (month == 10 && day == 26) - return "Intersex Awareness Day"; + const currentYear = date.getFullYear(); + const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear(); + const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate; + + if (month === 3 && day === 1) + return { + blurb: `Today is Zero Discrimination Day`, + class: "flag-progress-intersex", + }; + else if (month === 3 && day === 8) + return { + blurb: `Today is International Women's Day}`, + class: "symbol-venus", + }; + else if (month === 3 && day === 31) + return { + blurb: `Today is Trans Day of Visibility`, + class: "flag-trans", + }; + else if (month === 4 && day === 6) + return { + blurb: `Today is International Asexuality Day`, + class: "flag-ace", + }; + else if (month === 4 && day === 26) + return { + blurb: `Today is Lesbian Visibility Day`, + class: "flag-lesbian", + }; + else if (month === 5 && day === 17) + return { + blurb: `Today is International Day Against Homophobia, Biphobia and Transphobia`, + class: "flag-progress", + }; + else if (month === 5 && day === 19) + return { + blurb: `Today is Agender Pride Day`, + class: "flag-agender", + }; + else if (month === 5 && day === 25) + return { + blurb: `Today is Pansexual and Panromantic Awareness and Visibility Day`, + class: "flag-pan", + }; + else if (month === 6) + return { + blurb: `Happy Pride Month!`, + class: "flag-progress-intersex", + }; + else if (month === 7 && day === 14) + return { + blurb: `Today is Non-Binary People's Day`, + 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 Bi Visibility Day`, + class: "flag-bi", + }; + else if (month === 10 && day === 8) + return { + blurb: `Today is International Lesbian Day`, + class: "flag-lesbian", + }; + else if (month === 10 && day === 11) + return { + blurb: `Today is National Coming Out Day`, + class: "flag-rainbow", + }; + else if (month === 10 && day === 17) + return { + blurb: `Today is the start of Genderfluid Visibility Week`, + class: "flag-genderfluid", + }; + else if (month === 10 && day === 24) + return { + blurb: `Today is the start of Ace Week`, + class: "flag-ace", + }; + else if (month === 10 && day === 26) + return { + blurb: `Today is Intersex Awareness Day`, + class: "flag-intersex", + }; else - return "No event"; - } - - 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 Zero Discrimination Day - `; - break; - case "International Women's Day": - return ` - Today is International Women's Day - `; - break; - case "Trans Day of Visibility": - return ` - Today is Trans Day of Visibility - `; - break; - case "International Asexuality Day": - return ` - Today is International Asexuality Day - `; - break; - case "Lesbian Visibility Day": - return ` - Today is Lesbian Visibility Day - `; - break; - case "IDAHOBIT": - return ` - Today is International Day Against Homophobia, Biphobia and Transphobia - `; - break; - case "Agender Pride Day": - return ` - Today is Agender Pride Day - `; - break; - case "Pansexual and Panromantic Awareness & Visibility Day": - return ` - Today is Pansexual and Panromantic Visibility Day - `; - break; - case "Pride Month": - return ` - Happy Pride Month! - `; - break; - case "Non-Binary People's Day": - return ` - Today is Non-Binary People's Day - `; - 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 Bi Visibility Day - `; - break; - case "International Lesbian Day": - return ` - Today is International Lesbian Day - `; - break; - case "National Coming Out Day": - return ` - Today is National Coming Out Day - `; - break; - case "Genderfluid Visibility Week": - return ` - Today is the start of Genderfluid Visibility Week - `; - break; - case "Ace Week": - return ` - Today is the start of Ace Week - `; - break; - case "Intersex Awareness Day": - return ` - Today is Intersex Awareness Day - `; - break; - default: - return ``; - } + return null; } diff --git a/_site/feed.xml b/_site/feed.xml index 821538a1..ff7349cf 100644 --- a/_site/feed.xml +++ b/_site/feed.xml @@ -4,7 +4,7 @@ Leilukin's personal website. - 2024-04-29T03:40:57Z + 2024-04-29T05:06:38Z https://leilukin.neocities.org Leilukin diff --git a/_site/index.html b/_site/index.html index 400d9520..5c09854f 100644 --- a/_site/index.html +++ b/_site/index.html @@ -98,14 +98,12 @@ const todayEvent = getTodayEvent(); - if (todayEvent != "No event") { + if (todayEvent) { heroTopBarEl.classList.remove('hidden'); + heroTopBarEl.innerHTML = todayEvent.blurb; - if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); - } else { - headerImgEl.classList.add(getBanner(todayEvent)); - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); + if (todayEvent.class) { + headerImgEl.classList.add(todayEvent.class); } } @@ -114,196 +112,100 @@ const month = date.getMonth() + 1; const day = date.getDate(); - if (month == 3 && day == 1) - return "Zero Discrimination Day"; - else if (month == 3 && day == 8) - return "International Women's Day"; - else if (month == 3 && day == 31) - return "Trans Day of Visibility"; - else if (month == 4 && day == 6) - return "International Asexuality Day"; - else if (month == 4 && day == 26) - return "Lesbian Visibility Day"; - else if (month == 5 && day == 17) - return "IDAHOBIT"; - else if (month == 5 && day == 19) - return "Agender Pride Day"; - else if (month == 5 && day == 25) - return "Pansexual and Panromantic Awareness & Visibility Day"; - else if (month == 6) - return "Pride Month"; - else if (month == 7 && day == 14) - return "Non-Binary People's Day"; - else if (month == 7 && day == 28) - return "Leilukin's Birthday"; - else if (month == 9 && day == 11) - return "Leilukin's Hub Anniversary"; - else if (month == 9 && day == 23) - return "Bi Visibility Day"; - else if (month == 10 && day == 8) - return "International Lesbian Day"; - else if (month == 10 && day == 11) - return "National Coming Out Day"; - else if (month == 10 && day == 17) - return "Genderfluid Visibility Week"; - else if (month == 10 && day == 24) - return "Ace Week"; - else if (month == 10 && day == 26) - return "Intersex Awareness Day"; + const currentYear = date.getFullYear(); + const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear(); + const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate; + + if (month === 3 && day === 1) + return { + blurb: `Today is Zero Discrimination Day`, + class: "flag-progress-intersex", + }; + else if (month === 3 && day === 8) + return { + blurb: `Today is International Women's Day}`, + class: "symbol-venus", + }; + else if (month === 3 && day === 31) + return { + blurb: `Today is Trans Day of Visibility`, + class: "flag-trans", + }; + else if (month === 4 && day === 6) + return { + blurb: `Today is International Asexuality Day`, + class: "flag-ace", + }; + else if (month === 4 && day === 26) + return { + blurb: `Today is Lesbian Visibility Day`, + class: "flag-lesbian", + }; + else if (month === 5 && day === 17) + return { + blurb: `Today is International Day Against Homophobia, Biphobia and Transphobia`, + class: "flag-progress", + }; + else if (month === 5 && day === 19) + return { + blurb: `Today is Agender Pride Day`, + class: "flag-agender", + }; + else if (month === 5 && day === 25) + return { + blurb: `Today is Pansexual and Panromantic Awareness and Visibility Day`, + class: "flag-pan", + }; + else if (month === 6) + return { + blurb: `Happy Pride Month!`, + class: "flag-progress-intersex", + }; + else if (month === 7 && day === 14) + return { + blurb: `Today is Non-Binary People's Day`, + 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 Bi Visibility Day`, + class: "flag-bi", + }; + else if (month === 10 && day === 8) + return { + blurb: `Today is International Lesbian Day`, + class: "flag-lesbian", + }; + else if (month === 10 && day === 11) + return { + blurb: `Today is National Coming Out Day`, + class: "flag-rainbow", + }; + else if (month === 10 && day === 17) + return { + blurb: `Today is the start of Genderfluid Visibility Week`, + class: "flag-genderfluid", + }; + else if (month === 10 && day === 24) + return { + blurb: `Today is the start of Ace Week`, + class: "flag-ace", + }; + else if (month === 10 && day === 26) + return { + blurb: `Today is Intersex Awareness Day`, + class: "flag-intersex", + }; else - return "No event"; - } - - 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 Zero Discrimination Day - `; - break; - case "International Women's Day": - return ` - Today is International Women's Day - `; - break; - case "Trans Day of Visibility": - return ` - Today is Trans Day of Visibility - `; - break; - case "International Asexuality Day": - return ` - Today is International Asexuality Day - `; - break; - case "Lesbian Visibility Day": - return ` - Today is Lesbian Visibility Day - `; - break; - case "IDAHOBIT": - return ` - Today is International Day Against Homophobia, Biphobia and Transphobia - `; - break; - case "Agender Pride Day": - return ` - Today is Agender Pride Day - `; - break; - case "Pansexual and Panromantic Awareness & Visibility Day": - return ` - Today is Pansexual and Panromantic Visibility Day - `; - break; - case "Pride Month": - return ` - Happy Pride Month! - `; - break; - case "Non-Binary People's Day": - return ` - Today is Non-Binary People's Day - `; - 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 Bi Visibility Day - `; - break; - case "International Lesbian Day": - return ` - Today is International Lesbian Day - `; - break; - case "National Coming Out Day": - return ` - Today is National Coming Out Day - `; - break; - case "Genderfluid Visibility Week": - return ` - Today is the start of Genderfluid Visibility Week - `; - break; - case "Ace Week": - return ` - Today is the start of Ace Week - `; - break; - case "Intersex Awareness Day": - return ` - Today is Intersex Awareness Day - `; - break; - default: - return ``; - } + return null; } diff --git a/_site/links/index.html b/_site/links/index.html index 291cce8c..821e2e66 100644 --- a/_site/links/index.html +++ b/_site/links/index.html @@ -98,14 +98,12 @@ const todayEvent = getTodayEvent(); - if (todayEvent != "No event") { + if (todayEvent) { heroTopBarEl.classList.remove('hidden'); + heroTopBarEl.innerHTML = todayEvent.blurb; - if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); - } else { - headerImgEl.classList.add(getBanner(todayEvent)); - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); + if (todayEvent.class) { + headerImgEl.classList.add(todayEvent.class); } } @@ -114,196 +112,100 @@ const month = date.getMonth() + 1; const day = date.getDate(); - if (month == 3 && day == 1) - return "Zero Discrimination Day"; - else if (month == 3 && day == 8) - return "International Women's Day"; - else if (month == 3 && day == 31) - return "Trans Day of Visibility"; - else if (month == 4 && day == 6) - return "International Asexuality Day"; - else if (month == 4 && day == 26) - return "Lesbian Visibility Day"; - else if (month == 5 && day == 17) - return "IDAHOBIT"; - else if (month == 5 && day == 19) - return "Agender Pride Day"; - else if (month == 5 && day == 25) - return "Pansexual and Panromantic Awareness & Visibility Day"; - else if (month == 6) - return "Pride Month"; - else if (month == 7 && day == 14) - return "Non-Binary People's Day"; - else if (month == 7 && day == 28) - return "Leilukin's Birthday"; - else if (month == 9 && day == 11) - return "Leilukin's Hub Anniversary"; - else if (month == 9 && day == 23) - return "Bi Visibility Day"; - else if (month == 10 && day == 8) - return "International Lesbian Day"; - else if (month == 10 && day == 11) - return "National Coming Out Day"; - else if (month == 10 && day == 17) - return "Genderfluid Visibility Week"; - else if (month == 10 && day == 24) - return "Ace Week"; - else if (month == 10 && day == 26) - return "Intersex Awareness Day"; + const currentYear = date.getFullYear(); + const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear(); + const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate; + + if (month === 3 && day === 1) + return { + blurb: `Today is Zero Discrimination Day`, + class: "flag-progress-intersex", + }; + else if (month === 3 && day === 8) + return { + blurb: `Today is International Women's Day}`, + class: "symbol-venus", + }; + else if (month === 3 && day === 31) + return { + blurb: `Today is Trans Day of Visibility`, + class: "flag-trans", + }; + else if (month === 4 && day === 6) + return { + blurb: `Today is International Asexuality Day`, + class: "flag-ace", + }; + else if (month === 4 && day === 26) + return { + blurb: `Today is Lesbian Visibility Day`, + class: "flag-lesbian", + }; + else if (month === 5 && day === 17) + return { + blurb: `Today is International Day Against Homophobia, Biphobia and Transphobia`, + class: "flag-progress", + }; + else if (month === 5 && day === 19) + return { + blurb: `Today is Agender Pride Day`, + class: "flag-agender", + }; + else if (month === 5 && day === 25) + return { + blurb: `Today is Pansexual and Panromantic Awareness and Visibility Day`, + class: "flag-pan", + }; + else if (month === 6) + return { + blurb: `Happy Pride Month!`, + class: "flag-progress-intersex", + }; + else if (month === 7 && day === 14) + return { + blurb: `Today is Non-Binary People's Day`, + 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 Bi Visibility Day`, + class: "flag-bi", + }; + else if (month === 10 && day === 8) + return { + blurb: `Today is International Lesbian Day`, + class: "flag-lesbian", + }; + else if (month === 10 && day === 11) + return { + blurb: `Today is National Coming Out Day`, + class: "flag-rainbow", + }; + else if (month === 10 && day === 17) + return { + blurb: `Today is the start of Genderfluid Visibility Week`, + class: "flag-genderfluid", + }; + else if (month === 10 && day === 24) + return { + blurb: `Today is the start of Ace Week`, + class: "flag-ace", + }; + else if (month === 10 && day === 26) + return { + blurb: `Today is Intersex Awareness Day`, + class: "flag-intersex", + }; else - return "No event"; - } - - 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 Zero Discrimination Day - `; - break; - case "International Women's Day": - return ` - Today is International Women's Day - `; - break; - case "Trans Day of Visibility": - return ` - Today is Trans Day of Visibility - `; - break; - case "International Asexuality Day": - return ` - Today is International Asexuality Day - `; - break; - case "Lesbian Visibility Day": - return ` - Today is Lesbian Visibility Day - `; - break; - case "IDAHOBIT": - return ` - Today is International Day Against Homophobia, Biphobia and Transphobia - `; - break; - case "Agender Pride Day": - return ` - Today is Agender Pride Day - `; - break; - case "Pansexual and Panromantic Awareness & Visibility Day": - return ` - Today is Pansexual and Panromantic Visibility Day - `; - break; - case "Pride Month": - return ` - Happy Pride Month! - `; - break; - case "Non-Binary People's Day": - return ` - Today is Non-Binary People's Day - `; - 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 Bi Visibility Day - `; - break; - case "International Lesbian Day": - return ` - Today is International Lesbian Day - `; - break; - case "National Coming Out Day": - return ` - Today is National Coming Out Day - `; - break; - case "Genderfluid Visibility Week": - return ` - Today is the start of Genderfluid Visibility Week - `; - break; - case "Ace Week": - return ` - Today is the start of Ace Week - `; - break; - case "Intersex Awareness Day": - return ` - Today is Intersex Awareness Day - `; - break; - default: - return ``; - } + return null; } diff --git a/_site/now/index.html b/_site/now/index.html index da044459..bd92be65 100644 --- a/_site/now/index.html +++ b/_site/now/index.html @@ -98,14 +98,12 @@ const todayEvent = getTodayEvent(); - if (todayEvent != "No event") { + if (todayEvent) { heroTopBarEl.classList.remove('hidden'); + heroTopBarEl.innerHTML = todayEvent.blurb; - if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); - } else { - headerImgEl.classList.add(getBanner(todayEvent)); - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); + if (todayEvent.class) { + headerImgEl.classList.add(todayEvent.class); } } @@ -114,196 +112,100 @@ const month = date.getMonth() + 1; const day = date.getDate(); - if (month == 3 && day == 1) - return "Zero Discrimination Day"; - else if (month == 3 && day == 8) - return "International Women's Day"; - else if (month == 3 && day == 31) - return "Trans Day of Visibility"; - else if (month == 4 && day == 6) - return "International Asexuality Day"; - else if (month == 4 && day == 26) - return "Lesbian Visibility Day"; - else if (month == 5 && day == 17) - return "IDAHOBIT"; - else if (month == 5 && day == 19) - return "Agender Pride Day"; - else if (month == 5 && day == 25) - return "Pansexual and Panromantic Awareness & Visibility Day"; - else if (month == 6) - return "Pride Month"; - else if (month == 7 && day == 14) - return "Non-Binary People's Day"; - else if (month == 7 && day == 28) - return "Leilukin's Birthday"; - else if (month == 9 && day == 11) - return "Leilukin's Hub Anniversary"; - else if (month == 9 && day == 23) - return "Bi Visibility Day"; - else if (month == 10 && day == 8) - return "International Lesbian Day"; - else if (month == 10 && day == 11) - return "National Coming Out Day"; - else if (month == 10 && day == 17) - return "Genderfluid Visibility Week"; - else if (month == 10 && day == 24) - return "Ace Week"; - else if (month == 10 && day == 26) - return "Intersex Awareness Day"; + const currentYear = date.getFullYear(); + const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear(); + const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate; + + if (month === 3 && day === 1) + return { + blurb: `Today is Zero Discrimination Day`, + class: "flag-progress-intersex", + }; + else if (month === 3 && day === 8) + return { + blurb: `Today is International Women's Day}`, + class: "symbol-venus", + }; + else if (month === 3 && day === 31) + return { + blurb: `Today is Trans Day of Visibility`, + class: "flag-trans", + }; + else if (month === 4 && day === 6) + return { + blurb: `Today is International Asexuality Day`, + class: "flag-ace", + }; + else if (month === 4 && day === 26) + return { + blurb: `Today is Lesbian Visibility Day`, + class: "flag-lesbian", + }; + else if (month === 5 && day === 17) + return { + blurb: `Today is International Day Against Homophobia, Biphobia and Transphobia`, + class: "flag-progress", + }; + else if (month === 5 && day === 19) + return { + blurb: `Today is Agender Pride Day`, + class: "flag-agender", + }; + else if (month === 5 && day === 25) + return { + blurb: `Today is Pansexual and Panromantic Awareness and Visibility Day`, + class: "flag-pan", + }; + else if (month === 6) + return { + blurb: `Happy Pride Month!`, + class: "flag-progress-intersex", + }; + else if (month === 7 && day === 14) + return { + blurb: `Today is Non-Binary People's Day`, + 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 Bi Visibility Day`, + class: "flag-bi", + }; + else if (month === 10 && day === 8) + return { + blurb: `Today is International Lesbian Day`, + class: "flag-lesbian", + }; + else if (month === 10 && day === 11) + return { + blurb: `Today is National Coming Out Day`, + class: "flag-rainbow", + }; + else if (month === 10 && day === 17) + return { + blurb: `Today is the start of Genderfluid Visibility Week`, + class: "flag-genderfluid", + }; + else if (month === 10 && day === 24) + return { + blurb: `Today is the start of Ace Week`, + class: "flag-ace", + }; + else if (month === 10 && day === 26) + return { + blurb: `Today is Intersex Awareness Day`, + class: "flag-intersex", + }; else - return "No event"; - } - - 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 Zero Discrimination Day - `; - break; - case "International Women's Day": - return ` - Today is International Women's Day - `; - break; - case "Trans Day of Visibility": - return ` - Today is Trans Day of Visibility - `; - break; - case "International Asexuality Day": - return ` - Today is International Asexuality Day - `; - break; - case "Lesbian Visibility Day": - return ` - Today is Lesbian Visibility Day - `; - break; - case "IDAHOBIT": - return ` - Today is International Day Against Homophobia, Biphobia and Transphobia - `; - break; - case "Agender Pride Day": - return ` - Today is Agender Pride Day - `; - break; - case "Pansexual and Panromantic Awareness & Visibility Day": - return ` - Today is Pansexual and Panromantic Visibility Day - `; - break; - case "Pride Month": - return ` - Happy Pride Month! - `; - break; - case "Non-Binary People's Day": - return ` - Today is Non-Binary People's Day - `; - 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 Bi Visibility Day - `; - break; - case "International Lesbian Day": - return ` - Today is International Lesbian Day - `; - break; - case "National Coming Out Day": - return ` - Today is National Coming Out Day - `; - break; - case "Genderfluid Visibility Week": - return ` - Today is the start of Genderfluid Visibility Week - `; - break; - case "Ace Week": - return ` - Today is the start of Ace Week - `; - break; - case "Intersex Awareness Day": - return ` - Today is Intersex Awareness Day - `; - break; - default: - return ``; - } + return null; } diff --git a/_site/projects/index.html b/_site/projects/index.html index 2202d94c..7766531b 100644 --- a/_site/projects/index.html +++ b/_site/projects/index.html @@ -98,14 +98,12 @@ const todayEvent = getTodayEvent(); - if (todayEvent != "No event") { + if (todayEvent) { heroTopBarEl.classList.remove('hidden'); + heroTopBarEl.innerHTML = todayEvent.blurb; - if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); - } else { - headerImgEl.classList.add(getBanner(todayEvent)); - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); + if (todayEvent.class) { + headerImgEl.classList.add(todayEvent.class); } } @@ -114,196 +112,100 @@ const month = date.getMonth() + 1; const day = date.getDate(); - if (month == 3 && day == 1) - return "Zero Discrimination Day"; - else if (month == 3 && day == 8) - return "International Women's Day"; - else if (month == 3 && day == 31) - return "Trans Day of Visibility"; - else if (month == 4 && day == 6) - return "International Asexuality Day"; - else if (month == 4 && day == 26) - return "Lesbian Visibility Day"; - else if (month == 5 && day == 17) - return "IDAHOBIT"; - else if (month == 5 && day == 19) - return "Agender Pride Day"; - else if (month == 5 && day == 25) - return "Pansexual and Panromantic Awareness & Visibility Day"; - else if (month == 6) - return "Pride Month"; - else if (month == 7 && day == 14) - return "Non-Binary People's Day"; - else if (month == 7 && day == 28) - return "Leilukin's Birthday"; - else if (month == 9 && day == 11) - return "Leilukin's Hub Anniversary"; - else if (month == 9 && day == 23) - return "Bi Visibility Day"; - else if (month == 10 && day == 8) - return "International Lesbian Day"; - else if (month == 10 && day == 11) - return "National Coming Out Day"; - else if (month == 10 && day == 17) - return "Genderfluid Visibility Week"; - else if (month == 10 && day == 24) - return "Ace Week"; - else if (month == 10 && day == 26) - return "Intersex Awareness Day"; + const currentYear = date.getFullYear(); + const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear(); + const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate; + + if (month === 3 && day === 1) + return { + blurb: `Today is Zero Discrimination Day`, + class: "flag-progress-intersex", + }; + else if (month === 3 && day === 8) + return { + blurb: `Today is International Women's Day}`, + class: "symbol-venus", + }; + else if (month === 3 && day === 31) + return { + blurb: `Today is Trans Day of Visibility`, + class: "flag-trans", + }; + else if (month === 4 && day === 6) + return { + blurb: `Today is International Asexuality Day`, + class: "flag-ace", + }; + else if (month === 4 && day === 26) + return { + blurb: `Today is Lesbian Visibility Day`, + class: "flag-lesbian", + }; + else if (month === 5 && day === 17) + return { + blurb: `Today is International Day Against Homophobia, Biphobia and Transphobia`, + class: "flag-progress", + }; + else if (month === 5 && day === 19) + return { + blurb: `Today is Agender Pride Day`, + class: "flag-agender", + }; + else if (month === 5 && day === 25) + return { + blurb: `Today is Pansexual and Panromantic Awareness and Visibility Day`, + class: "flag-pan", + }; + else if (month === 6) + return { + blurb: `Happy Pride Month!`, + class: "flag-progress-intersex", + }; + else if (month === 7 && day === 14) + return { + blurb: `Today is Non-Binary People's Day`, + 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 Bi Visibility Day`, + class: "flag-bi", + }; + else if (month === 10 && day === 8) + return { + blurb: `Today is International Lesbian Day`, + class: "flag-lesbian", + }; + else if (month === 10 && day === 11) + return { + blurb: `Today is National Coming Out Day`, + class: "flag-rainbow", + }; + else if (month === 10 && day === 17) + return { + blurb: `Today is the start of Genderfluid Visibility Week`, + class: "flag-genderfluid", + }; + else if (month === 10 && day === 24) + return { + blurb: `Today is the start of Ace Week`, + class: "flag-ace", + }; + else if (month === 10 && day === 26) + return { + blurb: `Today is Intersex Awareness Day`, + class: "flag-intersex", + }; else - return "No event"; - } - - 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 Zero Discrimination Day - `; - break; - case "International Women's Day": - return ` - Today is International Women's Day - `; - break; - case "Trans Day of Visibility": - return ` - Today is Trans Day of Visibility - `; - break; - case "International Asexuality Day": - return ` - Today is International Asexuality Day - `; - break; - case "Lesbian Visibility Day": - return ` - Today is Lesbian Visibility Day - `; - break; - case "IDAHOBIT": - return ` - Today is International Day Against Homophobia, Biphobia and Transphobia - `; - break; - case "Agender Pride Day": - return ` - Today is Agender Pride Day - `; - break; - case "Pansexual and Panromantic Awareness & Visibility Day": - return ` - Today is Pansexual and Panromantic Visibility Day - `; - break; - case "Pride Month": - return ` - Happy Pride Month! - `; - break; - case "Non-Binary People's Day": - return ` - Today is Non-Binary People's Day - `; - 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 Bi Visibility Day - `; - break; - case "International Lesbian Day": - return ` - Today is International Lesbian Day - `; - break; - case "National Coming Out Day": - return ` - Today is National Coming Out Day - `; - break; - case "Genderfluid Visibility Week": - return ` - Today is the start of Genderfluid Visibility Week - `; - break; - case "Ace Week": - return ` - Today is the start of Ace Week - `; - break; - case "Intersex Awareness Day": - return ` - Today is Intersex Awareness Day - `; - break; - default: - return ``; - } + return null; } diff --git a/_site/projects/kotor1mods/index.html b/_site/projects/kotor1mods/index.html index 7442d249..141c4522 100644 --- a/_site/projects/kotor1mods/index.html +++ b/_site/projects/kotor1mods/index.html @@ -98,14 +98,12 @@ const todayEvent = getTodayEvent(); - if (todayEvent != "No event") { + if (todayEvent) { heroTopBarEl.classList.remove('hidden'); + heroTopBarEl.innerHTML = todayEvent.blurb; - if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); - } else { - headerImgEl.classList.add(getBanner(todayEvent)); - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); + if (todayEvent.class) { + headerImgEl.classList.add(todayEvent.class); } } @@ -114,196 +112,100 @@ const month = date.getMonth() + 1; const day = date.getDate(); - if (month == 3 && day == 1) - return "Zero Discrimination Day"; - else if (month == 3 && day == 8) - return "International Women's Day"; - else if (month == 3 && day == 31) - return "Trans Day of Visibility"; - else if (month == 4 && day == 6) - return "International Asexuality Day"; - else if (month == 4 && day == 26) - return "Lesbian Visibility Day"; - else if (month == 5 && day == 17) - return "IDAHOBIT"; - else if (month == 5 && day == 19) - return "Agender Pride Day"; - else if (month == 5 && day == 25) - return "Pansexual and Panromantic Awareness & Visibility Day"; - else if (month == 6) - return "Pride Month"; - else if (month == 7 && day == 14) - return "Non-Binary People's Day"; - else if (month == 7 && day == 28) - return "Leilukin's Birthday"; - else if (month == 9 && day == 11) - return "Leilukin's Hub Anniversary"; - else if (month == 9 && day == 23) - return "Bi Visibility Day"; - else if (month == 10 && day == 8) - return "International Lesbian Day"; - else if (month == 10 && day == 11) - return "National Coming Out Day"; - else if (month == 10 && day == 17) - return "Genderfluid Visibility Week"; - else if (month == 10 && day == 24) - return "Ace Week"; - else if (month == 10 && day == 26) - return "Intersex Awareness Day"; + const currentYear = date.getFullYear(); + const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear(); + const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate; + + if (month === 3 && day === 1) + return { + blurb: `Today is Zero Discrimination Day`, + class: "flag-progress-intersex", + }; + else if (month === 3 && day === 8) + return { + blurb: `Today is International Women's Day}`, + class: "symbol-venus", + }; + else if (month === 3 && day === 31) + return { + blurb: `Today is Trans Day of Visibility`, + class: "flag-trans", + }; + else if (month === 4 && day === 6) + return { + blurb: `Today is International Asexuality Day`, + class: "flag-ace", + }; + else if (month === 4 && day === 26) + return { + blurb: `Today is Lesbian Visibility Day`, + class: "flag-lesbian", + }; + else if (month === 5 && day === 17) + return { + blurb: `Today is International Day Against Homophobia, Biphobia and Transphobia`, + class: "flag-progress", + }; + else if (month === 5 && day === 19) + return { + blurb: `Today is Agender Pride Day`, + class: "flag-agender", + }; + else if (month === 5 && day === 25) + return { + blurb: `Today is Pansexual and Panromantic Awareness and Visibility Day`, + class: "flag-pan", + }; + else if (month === 6) + return { + blurb: `Happy Pride Month!`, + class: "flag-progress-intersex", + }; + else if (month === 7 && day === 14) + return { + blurb: `Today is Non-Binary People's Day`, + 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 Bi Visibility Day`, + class: "flag-bi", + }; + else if (month === 10 && day === 8) + return { + blurb: `Today is International Lesbian Day`, + class: "flag-lesbian", + }; + else if (month === 10 && day === 11) + return { + blurb: `Today is National Coming Out Day`, + class: "flag-rainbow", + }; + else if (month === 10 && day === 17) + return { + blurb: `Today is the start of Genderfluid Visibility Week`, + class: "flag-genderfluid", + }; + else if (month === 10 && day === 24) + return { + blurb: `Today is the start of Ace Week`, + class: "flag-ace", + }; + else if (month === 10 && day === 26) + return { + blurb: `Today is Intersex Awareness Day`, + class: "flag-intersex", + }; else - return "No event"; - } - - 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 Zero Discrimination Day - `; - break; - case "International Women's Day": - return ` - Today is International Women's Day - `; - break; - case "Trans Day of Visibility": - return ` - Today is Trans Day of Visibility - `; - break; - case "International Asexuality Day": - return ` - Today is International Asexuality Day - `; - break; - case "Lesbian Visibility Day": - return ` - Today is Lesbian Visibility Day - `; - break; - case "IDAHOBIT": - return ` - Today is International Day Against Homophobia, Biphobia and Transphobia - `; - break; - case "Agender Pride Day": - return ` - Today is Agender Pride Day - `; - break; - case "Pansexual and Panromantic Awareness & Visibility Day": - return ` - Today is Pansexual and Panromantic Visibility Day - `; - break; - case "Pride Month": - return ` - Happy Pride Month! - `; - break; - case "Non-Binary People's Day": - return ` - Today is Non-Binary People's Day - `; - 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 Bi Visibility Day - `; - break; - case "International Lesbian Day": - return ` - Today is International Lesbian Day - `; - break; - case "National Coming Out Day": - return ` - Today is National Coming Out Day - `; - break; - case "Genderfluid Visibility Week": - return ` - Today is the start of Genderfluid Visibility Week - `; - break; - case "Ace Week": - return ` - Today is the start of Ace Week - `; - break; - case "Intersex Awareness Day": - return ` - Today is Intersex Awareness Day - `; - break; - default: - return ``; - } + return null; } diff --git a/_site/projects/kotor2mods/index.html b/_site/projects/kotor2mods/index.html index 4781fdcf..751f4e65 100644 --- a/_site/projects/kotor2mods/index.html +++ b/_site/projects/kotor2mods/index.html @@ -98,14 +98,12 @@ const todayEvent = getTodayEvent(); - if (todayEvent != "No event") { + if (todayEvent) { heroTopBarEl.classList.remove('hidden'); + heroTopBarEl.innerHTML = todayEvent.blurb; - if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); - } else { - headerImgEl.classList.add(getBanner(todayEvent)); - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); + if (todayEvent.class) { + headerImgEl.classList.add(todayEvent.class); } } @@ -114,196 +112,100 @@ const month = date.getMonth() + 1; const day = date.getDate(); - if (month == 3 && day == 1) - return "Zero Discrimination Day"; - else if (month == 3 && day == 8) - return "International Women's Day"; - else if (month == 3 && day == 31) - return "Trans Day of Visibility"; - else if (month == 4 && day == 6) - return "International Asexuality Day"; - else if (month == 4 && day == 26) - return "Lesbian Visibility Day"; - else if (month == 5 && day == 17) - return "IDAHOBIT"; - else if (month == 5 && day == 19) - return "Agender Pride Day"; - else if (month == 5 && day == 25) - return "Pansexual and Panromantic Awareness & Visibility Day"; - else if (month == 6) - return "Pride Month"; - else if (month == 7 && day == 14) - return "Non-Binary People's Day"; - else if (month == 7 && day == 28) - return "Leilukin's Birthday"; - else if (month == 9 && day == 11) - return "Leilukin's Hub Anniversary"; - else if (month == 9 && day == 23) - return "Bi Visibility Day"; - else if (month == 10 && day == 8) - return "International Lesbian Day"; - else if (month == 10 && day == 11) - return "National Coming Out Day"; - else if (month == 10 && day == 17) - return "Genderfluid Visibility Week"; - else if (month == 10 && day == 24) - return "Ace Week"; - else if (month == 10 && day == 26) - return "Intersex Awareness Day"; + const currentYear = date.getFullYear(); + const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear(); + const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate; + + if (month === 3 && day === 1) + return { + blurb: `Today is Zero Discrimination Day`, + class: "flag-progress-intersex", + }; + else if (month === 3 && day === 8) + return { + blurb: `Today is International Women's Day}`, + class: "symbol-venus", + }; + else if (month === 3 && day === 31) + return { + blurb: `Today is Trans Day of Visibility`, + class: "flag-trans", + }; + else if (month === 4 && day === 6) + return { + blurb: `Today is International Asexuality Day`, + class: "flag-ace", + }; + else if (month === 4 && day === 26) + return { + blurb: `Today is Lesbian Visibility Day`, + class: "flag-lesbian", + }; + else if (month === 5 && day === 17) + return { + blurb: `Today is International Day Against Homophobia, Biphobia and Transphobia`, + class: "flag-progress", + }; + else if (month === 5 && day === 19) + return { + blurb: `Today is Agender Pride Day`, + class: "flag-agender", + }; + else if (month === 5 && day === 25) + return { + blurb: `Today is Pansexual and Panromantic Awareness and Visibility Day`, + class: "flag-pan", + }; + else if (month === 6) + return { + blurb: `Happy Pride Month!`, + class: "flag-progress-intersex", + }; + else if (month === 7 && day === 14) + return { + blurb: `Today is Non-Binary People's Day`, + 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 Bi Visibility Day`, + class: "flag-bi", + }; + else if (month === 10 && day === 8) + return { + blurb: `Today is International Lesbian Day`, + class: "flag-lesbian", + }; + else if (month === 10 && day === 11) + return { + blurb: `Today is National Coming Out Day`, + class: "flag-rainbow", + }; + else if (month === 10 && day === 17) + return { + blurb: `Today is the start of Genderfluid Visibility Week`, + class: "flag-genderfluid", + }; + else if (month === 10 && day === 24) + return { + blurb: `Today is the start of Ace Week`, + class: "flag-ace", + }; + else if (month === 10 && day === 26) + return { + blurb: `Today is Intersex Awareness Day`, + class: "flag-intersex", + }; else - return "No event"; - } - - 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 Zero Discrimination Day - `; - break; - case "International Women's Day": - return ` - Today is International Women's Day - `; - break; - case "Trans Day of Visibility": - return ` - Today is Trans Day of Visibility - `; - break; - case "International Asexuality Day": - return ` - Today is International Asexuality Day - `; - break; - case "Lesbian Visibility Day": - return ` - Today is Lesbian Visibility Day - `; - break; - case "IDAHOBIT": - return ` - Today is International Day Against Homophobia, Biphobia and Transphobia - `; - break; - case "Agender Pride Day": - return ` - Today is Agender Pride Day - `; - break; - case "Pansexual and Panromantic Awareness & Visibility Day": - return ` - Today is Pansexual and Panromantic Visibility Day - `; - break; - case "Pride Month": - return ` - Happy Pride Month! - `; - break; - case "Non-Binary People's Day": - return ` - Today is Non-Binary People's Day - `; - 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 Bi Visibility Day - `; - break; - case "International Lesbian Day": - return ` - Today is International Lesbian Day - `; - break; - case "National Coming Out Day": - return ` - Today is National Coming Out Day - `; - break; - case "Genderfluid Visibility Week": - return ` - Today is the start of Genderfluid Visibility Week - `; - break; - case "Ace Week": - return ` - Today is the start of Ace Week - `; - break; - case "Intersex Awareness Day": - return ` - Today is Intersex Awareness Day - `; - break; - default: - return ``; - } + return null; } diff --git a/_site/projects/playlists/index.html b/_site/projects/playlists/index.html index 9b8e9e20..c2390599 100644 --- a/_site/projects/playlists/index.html +++ b/_site/projects/playlists/index.html @@ -98,14 +98,12 @@ const todayEvent = getTodayEvent(); - if (todayEvent != "No event") { + if (todayEvent) { heroTopBarEl.classList.remove('hidden'); + heroTopBarEl.innerHTML = todayEvent.blurb; - if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); - } else { - headerImgEl.classList.add(getBanner(todayEvent)); - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); + if (todayEvent.class) { + headerImgEl.classList.add(todayEvent.class); } } @@ -114,196 +112,100 @@ const month = date.getMonth() + 1; const day = date.getDate(); - if (month == 3 && day == 1) - return "Zero Discrimination Day"; - else if (month == 3 && day == 8) - return "International Women's Day"; - else if (month == 3 && day == 31) - return "Trans Day of Visibility"; - else if (month == 4 && day == 6) - return "International Asexuality Day"; - else if (month == 4 && day == 26) - return "Lesbian Visibility Day"; - else if (month == 5 && day == 17) - return "IDAHOBIT"; - else if (month == 5 && day == 19) - return "Agender Pride Day"; - else if (month == 5 && day == 25) - return "Pansexual and Panromantic Awareness & Visibility Day"; - else if (month == 6) - return "Pride Month"; - else if (month == 7 && day == 14) - return "Non-Binary People's Day"; - else if (month == 7 && day == 28) - return "Leilukin's Birthday"; - else if (month == 9 && day == 11) - return "Leilukin's Hub Anniversary"; - else if (month == 9 && day == 23) - return "Bi Visibility Day"; - else if (month == 10 && day == 8) - return "International Lesbian Day"; - else if (month == 10 && day == 11) - return "National Coming Out Day"; - else if (month == 10 && day == 17) - return "Genderfluid Visibility Week"; - else if (month == 10 && day == 24) - return "Ace Week"; - else if (month == 10 && day == 26) - return "Intersex Awareness Day"; + const currentYear = date.getFullYear(); + const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear(); + const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate; + + if (month === 3 && day === 1) + return { + blurb: `Today is Zero Discrimination Day`, + class: "flag-progress-intersex", + }; + else if (month === 3 && day === 8) + return { + blurb: `Today is International Women's Day}`, + class: "symbol-venus", + }; + else if (month === 3 && day === 31) + return { + blurb: `Today is Trans Day of Visibility`, + class: "flag-trans", + }; + else if (month === 4 && day === 6) + return { + blurb: `Today is International Asexuality Day`, + class: "flag-ace", + }; + else if (month === 4 && day === 26) + return { + blurb: `Today is Lesbian Visibility Day`, + class: "flag-lesbian", + }; + else if (month === 5 && day === 17) + return { + blurb: `Today is International Day Against Homophobia, Biphobia and Transphobia`, + class: "flag-progress", + }; + else if (month === 5 && day === 19) + return { + blurb: `Today is Agender Pride Day`, + class: "flag-agender", + }; + else if (month === 5 && day === 25) + return { + blurb: `Today is Pansexual and Panromantic Awareness and Visibility Day`, + class: "flag-pan", + }; + else if (month === 6) + return { + blurb: `Happy Pride Month!`, + class: "flag-progress-intersex", + }; + else if (month === 7 && day === 14) + return { + blurb: `Today is Non-Binary People's Day`, + 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 Bi Visibility Day`, + class: "flag-bi", + }; + else if (month === 10 && day === 8) + return { + blurb: `Today is International Lesbian Day`, + class: "flag-lesbian", + }; + else if (month === 10 && day === 11) + return { + blurb: `Today is National Coming Out Day`, + class: "flag-rainbow", + }; + else if (month === 10 && day === 17) + return { + blurb: `Today is the start of Genderfluid Visibility Week`, + class: "flag-genderfluid", + }; + else if (month === 10 && day === 24) + return { + blurb: `Today is the start of Ace Week`, + class: "flag-ace", + }; + else if (month === 10 && day === 26) + return { + blurb: `Today is Intersex Awareness Day`, + class: "flag-intersex", + }; else - return "No event"; - } - - 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 Zero Discrimination Day - `; - break; - case "International Women's Day": - return ` - Today is International Women's Day - `; - break; - case "Trans Day of Visibility": - return ` - Today is Trans Day of Visibility - `; - break; - case "International Asexuality Day": - return ` - Today is International Asexuality Day - `; - break; - case "Lesbian Visibility Day": - return ` - Today is Lesbian Visibility Day - `; - break; - case "IDAHOBIT": - return ` - Today is International Day Against Homophobia, Biphobia and Transphobia - `; - break; - case "Agender Pride Day": - return ` - Today is Agender Pride Day - `; - break; - case "Pansexual and Panromantic Awareness & Visibility Day": - return ` - Today is Pansexual and Panromantic Visibility Day - `; - break; - case "Pride Month": - return ` - Happy Pride Month! - `; - break; - case "Non-Binary People's Day": - return ` - Today is Non-Binary People's Day - `; - 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 Bi Visibility Day - `; - break; - case "International Lesbian Day": - return ` - Today is International Lesbian Day - `; - break; - case "National Coming Out Day": - return ` - Today is National Coming Out Day - `; - break; - case "Genderfluid Visibility Week": - return ` - Today is the start of Genderfluid Visibility Week - `; - break; - case "Ace Week": - return ` - Today is the start of Ace Week - `; - break; - case "Intersex Awareness Day": - return ` - Today is Intersex Awareness Day - `; - break; - default: - return ``; - } + return null; } diff --git a/_site/shrines/index.html b/_site/shrines/index.html index 7ec65700..c15069af 100644 --- a/_site/shrines/index.html +++ b/_site/shrines/index.html @@ -98,14 +98,12 @@ const todayEvent = getTodayEvent(); - if (todayEvent != "No event") { + if (todayEvent) { heroTopBarEl.classList.remove('hidden'); + heroTopBarEl.innerHTML = todayEvent.blurb; - if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); - } else { - headerImgEl.classList.add(getBanner(todayEvent)); - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); + if (todayEvent.class) { + headerImgEl.classList.add(todayEvent.class); } } @@ -114,196 +112,100 @@ const month = date.getMonth() + 1; const day = date.getDate(); - if (month == 3 && day == 1) - return "Zero Discrimination Day"; - else if (month == 3 && day == 8) - return "International Women's Day"; - else if (month == 3 && day == 31) - return "Trans Day of Visibility"; - else if (month == 4 && day == 6) - return "International Asexuality Day"; - else if (month == 4 && day == 26) - return "Lesbian Visibility Day"; - else if (month == 5 && day == 17) - return "IDAHOBIT"; - else if (month == 5 && day == 19) - return "Agender Pride Day"; - else if (month == 5 && day == 25) - return "Pansexual and Panromantic Awareness & Visibility Day"; - else if (month == 6) - return "Pride Month"; - else if (month == 7 && day == 14) - return "Non-Binary People's Day"; - else if (month == 7 && day == 28) - return "Leilukin's Birthday"; - else if (month == 9 && day == 11) - return "Leilukin's Hub Anniversary"; - else if (month == 9 && day == 23) - return "Bi Visibility Day"; - else if (month == 10 && day == 8) - return "International Lesbian Day"; - else if (month == 10 && day == 11) - return "National Coming Out Day"; - else if (month == 10 && day == 17) - return "Genderfluid Visibility Week"; - else if (month == 10 && day == 24) - return "Ace Week"; - else if (month == 10 && day == 26) - return "Intersex Awareness Day"; + const currentYear = date.getFullYear(); + const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear(); + const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate; + + if (month === 3 && day === 1) + return { + blurb: `Today is Zero Discrimination Day`, + class: "flag-progress-intersex", + }; + else if (month === 3 && day === 8) + return { + blurb: `Today is International Women's Day}`, + class: "symbol-venus", + }; + else if (month === 3 && day === 31) + return { + blurb: `Today is Trans Day of Visibility`, + class: "flag-trans", + }; + else if (month === 4 && day === 6) + return { + blurb: `Today is International Asexuality Day`, + class: "flag-ace", + }; + else if (month === 4 && day === 26) + return { + blurb: `Today is Lesbian Visibility Day`, + class: "flag-lesbian", + }; + else if (month === 5 && day === 17) + return { + blurb: `Today is International Day Against Homophobia, Biphobia and Transphobia`, + class: "flag-progress", + }; + else if (month === 5 && day === 19) + return { + blurb: `Today is Agender Pride Day`, + class: "flag-agender", + }; + else if (month === 5 && day === 25) + return { + blurb: `Today is Pansexual and Panromantic Awareness and Visibility Day`, + class: "flag-pan", + }; + else if (month === 6) + return { + blurb: `Happy Pride Month!`, + class: "flag-progress-intersex", + }; + else if (month === 7 && day === 14) + return { + blurb: `Today is Non-Binary People's Day`, + 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 Bi Visibility Day`, + class: "flag-bi", + }; + else if (month === 10 && day === 8) + return { + blurb: `Today is International Lesbian Day`, + class: "flag-lesbian", + }; + else if (month === 10 && day === 11) + return { + blurb: `Today is National Coming Out Day`, + class: "flag-rainbow", + }; + else if (month === 10 && day === 17) + return { + blurb: `Today is the start of Genderfluid Visibility Week`, + class: "flag-genderfluid", + }; + else if (month === 10 && day === 24) + return { + blurb: `Today is the start of Ace Week`, + class: "flag-ace", + }; + else if (month === 10 && day === 26) + return { + blurb: `Today is Intersex Awareness Day`, + class: "flag-intersex", + }; else - return "No event"; - } - - 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 Zero Discrimination Day - `; - break; - case "International Women's Day": - return ` - Today is International Women's Day - `; - break; - case "Trans Day of Visibility": - return ` - Today is Trans Day of Visibility - `; - break; - case "International Asexuality Day": - return ` - Today is International Asexuality Day - `; - break; - case "Lesbian Visibility Day": - return ` - Today is Lesbian Visibility Day - `; - break; - case "IDAHOBIT": - return ` - Today is International Day Against Homophobia, Biphobia and Transphobia - `; - break; - case "Agender Pride Day": - return ` - Today is Agender Pride Day - `; - break; - case "Pansexual and Panromantic Awareness & Visibility Day": - return ` - Today is Pansexual and Panromantic Visibility Day - `; - break; - case "Pride Month": - return ` - Happy Pride Month! - `; - break; - case "Non-Binary People's Day": - return ` - Today is Non-Binary People's Day - `; - 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 Bi Visibility Day - `; - break; - case "International Lesbian Day": - return ` - Today is International Lesbian Day - `; - break; - case "National Coming Out Day": - return ` - Today is National Coming Out Day - `; - break; - case "Genderfluid Visibility Week": - return ` - Today is the start of Genderfluid Visibility Week - `; - break; - case "Ace Week": - return ` - Today is the start of Ace Week - `; - break; - case "Intersex Awareness Day": - return ` - Today is Intersex Awareness Day - `; - break; - default: - return ``; - } + return null; } diff --git a/_site/sitemap/index.html b/_site/sitemap/index.html index 5392737f..59029f78 100644 --- a/_site/sitemap/index.html +++ b/_site/sitemap/index.html @@ -98,14 +98,12 @@ const todayEvent = getTodayEvent(); - if (todayEvent != "No event") { + if (todayEvent) { heroTopBarEl.classList.remove('hidden'); + heroTopBarEl.innerHTML = todayEvent.blurb; - if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); - } else { - headerImgEl.classList.add(getBanner(todayEvent)); - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); + if (todayEvent.class) { + headerImgEl.classList.add(todayEvent.class); } } @@ -114,196 +112,100 @@ const month = date.getMonth() + 1; const day = date.getDate(); - if (month == 3 && day == 1) - return "Zero Discrimination Day"; - else if (month == 3 && day == 8) - return "International Women's Day"; - else if (month == 3 && day == 31) - return "Trans Day of Visibility"; - else if (month == 4 && day == 6) - return "International Asexuality Day"; - else if (month == 4 && day == 26) - return "Lesbian Visibility Day"; - else if (month == 5 && day == 17) - return "IDAHOBIT"; - else if (month == 5 && day == 19) - return "Agender Pride Day"; - else if (month == 5 && day == 25) - return "Pansexual and Panromantic Awareness & Visibility Day"; - else if (month == 6) - return "Pride Month"; - else if (month == 7 && day == 14) - return "Non-Binary People's Day"; - else if (month == 7 && day == 28) - return "Leilukin's Birthday"; - else if (month == 9 && day == 11) - return "Leilukin's Hub Anniversary"; - else if (month == 9 && day == 23) - return "Bi Visibility Day"; - else if (month == 10 && day == 8) - return "International Lesbian Day"; - else if (month == 10 && day == 11) - return "National Coming Out Day"; - else if (month == 10 && day == 17) - return "Genderfluid Visibility Week"; - else if (month == 10 && day == 24) - return "Ace Week"; - else if (month == 10 && day == 26) - return "Intersex Awareness Day"; + const currentYear = date.getFullYear(); + const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear(); + const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate; + + if (month === 3 && day === 1) + return { + blurb: `Today is Zero Discrimination Day`, + class: "flag-progress-intersex", + }; + else if (month === 3 && day === 8) + return { + blurb: `Today is International Women's Day}`, + class: "symbol-venus", + }; + else if (month === 3 && day === 31) + return { + blurb: `Today is Trans Day of Visibility`, + class: "flag-trans", + }; + else if (month === 4 && day === 6) + return { + blurb: `Today is International Asexuality Day`, + class: "flag-ace", + }; + else if (month === 4 && day === 26) + return { + blurb: `Today is Lesbian Visibility Day`, + class: "flag-lesbian", + }; + else if (month === 5 && day === 17) + return { + blurb: `Today is International Day Against Homophobia, Biphobia and Transphobia`, + class: "flag-progress", + }; + else if (month === 5 && day === 19) + return { + blurb: `Today is Agender Pride Day`, + class: "flag-agender", + }; + else if (month === 5 && day === 25) + return { + blurb: `Today is Pansexual and Panromantic Awareness and Visibility Day`, + class: "flag-pan", + }; + else if (month === 6) + return { + blurb: `Happy Pride Month!`, + class: "flag-progress-intersex", + }; + else if (month === 7 && day === 14) + return { + blurb: `Today is Non-Binary People's Day`, + 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 Bi Visibility Day`, + class: "flag-bi", + }; + else if (month === 10 && day === 8) + return { + blurb: `Today is International Lesbian Day`, + class: "flag-lesbian", + }; + else if (month === 10 && day === 11) + return { + blurb: `Today is National Coming Out Day`, + class: "flag-rainbow", + }; + else if (month === 10 && day === 17) + return { + blurb: `Today is the start of Genderfluid Visibility Week`, + class: "flag-genderfluid", + }; + else if (month === 10 && day === 24) + return { + blurb: `Today is the start of Ace Week`, + class: "flag-ace", + }; + else if (month === 10 && day === 26) + return { + blurb: `Today is Intersex Awareness Day`, + class: "flag-intersex", + }; else - return "No event"; - } - - 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 Zero Discrimination Day - `; - break; - case "International Women's Day": - return ` - Today is International Women's Day - `; - break; - case "Trans Day of Visibility": - return ` - Today is Trans Day of Visibility - `; - break; - case "International Asexuality Day": - return ` - Today is International Asexuality Day - `; - break; - case "Lesbian Visibility Day": - return ` - Today is Lesbian Visibility Day - `; - break; - case "IDAHOBIT": - return ` - Today is International Day Against Homophobia, Biphobia and Transphobia - `; - break; - case "Agender Pride Day": - return ` - Today is Agender Pride Day - `; - break; - case "Pansexual and Panromantic Awareness & Visibility Day": - return ` - Today is Pansexual and Panromantic Visibility Day - `; - break; - case "Pride Month": - return ` - Happy Pride Month! - `; - break; - case "Non-Binary People's Day": - return ` - Today is Non-Binary People's Day - `; - 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 Bi Visibility Day - `; - break; - case "International Lesbian Day": - return ` - Today is International Lesbian Day - `; - break; - case "National Coming Out Day": - return ` - Today is National Coming Out Day - `; - break; - case "Genderfluid Visibility Week": - return ` - Today is the start of Genderfluid Visibility Week - `; - break; - case "Ace Week": - return ` - Today is the start of Ace Week - `; - break; - case "Intersex Awareness Day": - return ` - Today is Intersex Awareness Day - `; - break; - default: - return ``; - } + return null; } diff --git a/src/_includes/main/hero.njk b/src/_includes/main/hero.njk index ad2cba16..48bf4612 100644 --- a/src/_includes/main/hero.njk +++ b/src/_includes/main/hero.njk @@ -11,14 +11,12 @@ {% block eventScript %} const todayEvent = getTodayEvent(); - if (todayEvent != "No event") { + if (todayEvent) { heroTopBarEl.classList.remove('hidden'); + heroTopBarEl.innerHTML = todayEvent.blurb; - if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") { - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); - } else { - headerImgEl.classList.add(getBanner(todayEvent)); - heroTopBarEl.innerHTML = getBlurbHtml(todayEvent); + if (todayEvent.class) { + headerImgEl.classList.add(todayEvent.class); } } @@ -27,195 +25,99 @@ const month = date.getMonth() + 1; const day = date.getDate(); - if (month == 3 && day == 1) - return "Zero Discrimination Day"; - else if (month == 3 && day == 8) - return "International Women's Day"; - else if (month == 3 && day == 31) - return "Trans Day of Visibility"; - else if (month == 4 && day == 6) - return "International Asexuality Day"; - else if (month == 4 && day == 26) - return "Lesbian Visibility Day"; - else if (month == 5 && day == 17) - return "IDAHOBIT"; - else if (month == 5 && day == 19) - return "Agender Pride Day"; - else if (month == 5 && day == 25) - return "Pansexual and Panromantic Awareness & Visibility Day"; - else if (month == 6) - return "Pride Month"; - else if (month == 7 && day == 14) - return "Non-Binary People's Day"; - else if (month == 7 && day == 28) - return "Leilukin's Birthday"; - else if (month == 9 && day == 11) - return "Leilukin's Hub Anniversary"; - else if (month == 9 && day == 23) - return "Bi Visibility Day"; - else if (month == 10 && day == 8) - return "International Lesbian Day"; - else if (month == 10 && day == 11) - return "National Coming Out Day"; - else if (month == 10 && day == 17) - return "Genderfluid Visibility Week"; - else if (month == 10 && day == 24) - return "Ace Week"; - else if (month == 10 && day == 26) - return "Intersex Awareness Day"; + const currentYear = date.getFullYear(); + const leilukinsHubLaunchDate = new Date("2022-09-11").getFullYear(); + const leilukinsHubAnniversary = currentYear - leilukinsHubLaunchDate; + + if (month === 3 && day === 1) + return { + blurb: `Today is Zero Discrimination Day`, + class: "flag-progress-intersex", + }; + else if (month === 3 && day === 8) + return { + blurb: `Today is International Women's Day}`, + class: "symbol-venus", + }; + else if (month === 3 && day === 31) + return { + blurb: `Today is Trans Day of Visibility`, + class: "flag-trans", + }; + else if (month === 4 && day === 6) + return { + blurb: `Today is International Asexuality Day`, + class: "flag-ace", + }; + else if (month === 4 && day === 26) + return { + blurb: `Today is Lesbian Visibility Day`, + class: "flag-lesbian", + }; + else if (month === 5 && day === 17) + return { + blurb: `Today is International Day Against Homophobia, Biphobia and Transphobia`, + class: "flag-progress", + }; + else if (month === 5 && day === 19) + return { + blurb: `Today is Agender Pride Day`, + class: "flag-agender", + }; + else if (month === 5 && day === 25) + return { + blurb: `Today is Pansexual and Panromantic Awareness and Visibility Day`, + class: "flag-pan", + }; + else if (month === 6) + return { + blurb: `Happy Pride Month!`, + class: "flag-progress-intersex", + }; + else if (month === 7 && day === 14) + return { + blurb: `Today is Non-Binary People's Day`, + 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 Bi Visibility Day`, + class: "flag-bi", + }; + else if (month === 10 && day === 8) + return { + blurb: `Today is International Lesbian Day`, + class: "flag-lesbian", + }; + else if (month === 10 && day === 11) + return { + blurb: `Today is National Coming Out Day`, + class: "flag-rainbow", + }; + else if (month === 10 && day === 17) + return { + blurb: `Today is the start of Genderfluid Visibility Week`, + class: "flag-genderfluid", + }; + else if (month === 10 && day === 24) + return { + blurb: `Today is the start of Ace Week`, + class: "flag-ace", + }; + else if (month === 10 && day === 26) + return { + blurb: `Today is Intersex Awareness Day`, + class: "flag-intersex", + }; else - return "No event"; - } - - 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 Zero Discrimination Day - `; - break; - case "International Women's Day": - return ` - Today is International Women's Day - `; - break; - case "Trans Day of Visibility": - return ` - Today is Trans Day of Visibility - `; - break; - case "International Asexuality Day": - return ` - Today is International Asexuality Day - `; - break; - case "Lesbian Visibility Day": - return ` - Today is Lesbian Visibility Day - `; - break; - case "IDAHOBIT": - return ` - Today is International Day Against Homophobia, Biphobia and Transphobia - `; - break; - case "Agender Pride Day": - return ` - Today is Agender Pride Day - `; - break; - case "Pansexual and Panromantic Awareness & Visibility Day": - return ` - Today is Pansexual and Panromantic Visibility Day - `; - break; - case "Pride Month": - return ` - Happy Pride Month! - `; - break; - case "Non-Binary People's Day": - return ` - Today is Non-Binary People's Day - `; - 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 Bi Visibility Day - `; - break; - case "International Lesbian Day": - return ` - Today is International Lesbian Day - `; - break; - case "National Coming Out Day": - return ` - Today is National Coming Out Day - `; - break; - case "Genderfluid Visibility Week": - return ` - Today is the start of Genderfluid Visibility Week - `; - break; - case "Ace Week": - return ` - Today is the start of Ace Week - `; - break; - case "Intersex Awareness Day": - return ` - Today is Intersex Awareness Day - `; - break; - default: - return ``; - } + return null; } {% endblock %} \ No newline at end of file