Display anniversary year count of Cassette Beasts releases on tht hero top bar

This commit is contained in:
Helen Chong 2024-04-23 16:13:01 +08:00
parent 7a47b1faa2
commit 8c26c844e1
11 changed files with 81 additions and 25 deletions

View File

@ -30,6 +30,10 @@
--clr-main-footer-bg: #9b59b6;
}
.hero__top-bar {
color: var(--clr-navbar-link);
}
.footer {
color: var(--clr-navbar-link);
}

View File

@ -4,7 +4,7 @@
<subtitle>Leilukin&#39;s personal website.</subtitle>
<link href="https://leilukin.neocities.org/feed.xml" rel="self"/>
<link href="https://leilukin.neocities.org"/>
<updated>2024-04-23T07:56:04Z</updated>
<updated>2024-04-23T08:12:34Z</updated>
<id>https://leilukin.neocities.org</id>
<author>
<name>Leilukin</name>

View File

@ -114,22 +114,28 @@
if (month == 4 && day == 26)
return "CB Anniversary";
else if (month == 9 && day == 12)
else if (month == 10 && day == 4)
return "Pier Anniversary";
else
return "No event";
}
function getBlurbHtml(day) {
const currentYear = new Date().getFullYear();
const cbReleaseDate = new Date("2023-04-26").getFullYear();
const pierReleaseDate = new Date("2023-10-04").getFullYear();
const cbAnniversary = currentYear - cbReleaseDate;
const pierAnniversary = currentYear - pierReleaseDate;
switch (day) {
case "CB Anniversary":
return `
Today is the anniversary of the release of <cite>Cassette Beasts</cite>!
Today is the ${cbAnniversary}-year anniversary of the release of <cite>Cassette Beasts</cite>!
`;
break;
case "Pier Anniversary":
return `
Today is the anniversary of the release of <cite>Pier of the Unknown</cite>, the first DLC expansion of <cite>Cassette Beasts</cite>!
Today is the ${pierAnniversary}-year anniversary of the release of <cite>Pier of the Unknown</cite>, the first DLC expansion of <cite>Cassette Beasts</cite>!
`;
break;
default:

View File

@ -114,22 +114,28 @@
if (month == 4 && day == 26)
return "CB Anniversary";
else if (month == 9 && day == 12)
else if (month == 10 && day == 4)
return "Pier Anniversary";
else
return "No event";
}
function getBlurbHtml(day) {
const currentYear = new Date().getFullYear();
const cbReleaseDate = new Date("2023-04-26").getFullYear();
const pierReleaseDate = new Date("2023-10-04").getFullYear();
const cbAnniversary = currentYear - cbReleaseDate;
const pierAnniversary = currentYear - pierReleaseDate;
switch (day) {
case "CB Anniversary":
return `
Today is the anniversary of the release of <cite>Cassette Beasts</cite>!
Today is the ${cbAnniversary}-year anniversary of the release of <cite>Cassette Beasts</cite>!
`;
break;
case "Pier Anniversary":
return `
Today is the anniversary of the release of <cite>Pier of the Unknown</cite>, the first DLC expansion of <cite>Cassette Beasts</cite>!
Today is the ${pierAnniversary}-year anniversary of the release of <cite>Pier of the Unknown</cite>, the first DLC expansion of <cite>Cassette Beasts</cite>!
`;
break;
default:

View File

@ -114,22 +114,28 @@
if (month == 4 && day == 26)
return "CB Anniversary";
else if (month == 9 && day == 12)
else if (month == 10 && day == 4)
return "Pier Anniversary";
else
return "No event";
}
function getBlurbHtml(day) {
const currentYear = new Date().getFullYear();
const cbReleaseDate = new Date("2023-04-26").getFullYear();
const pierReleaseDate = new Date("2023-10-04").getFullYear();
const cbAnniversary = currentYear - cbReleaseDate;
const pierAnniversary = currentYear - pierReleaseDate;
switch (day) {
case "CB Anniversary":
return `
Today is the anniversary of the release of <cite>Cassette Beasts</cite>!
Today is the ${cbAnniversary}-year anniversary of the release of <cite>Cassette Beasts</cite>!
`;
break;
case "Pier Anniversary":
return `
Today is the anniversary of the release of <cite>Pier of the Unknown</cite>, the first DLC expansion of <cite>Cassette Beasts</cite>!
Today is the ${pierAnniversary}-year anniversary of the release of <cite>Pier of the Unknown</cite>, the first DLC expansion of <cite>Cassette Beasts</cite>!
`;
break;
default:

View File

@ -114,22 +114,28 @@
if (month == 4 && day == 26)
return "CB Anniversary";
else if (month == 9 && day == 12)
else if (month == 10 && day == 4)
return "Pier Anniversary";
else
return "No event";
}
function getBlurbHtml(day) {
const currentYear = new Date().getFullYear();
const cbReleaseDate = new Date("2023-04-26").getFullYear();
const pierReleaseDate = new Date("2023-10-04").getFullYear();
const cbAnniversary = currentYear - cbReleaseDate;
const pierAnniversary = currentYear - pierReleaseDate;
switch (day) {
case "CB Anniversary":
return `
Today is the anniversary of the release of <cite>Cassette Beasts</cite>!
Today is the ${cbAnniversary}-year anniversary of the release of <cite>Cassette Beasts</cite>!
`;
break;
case "Pier Anniversary":
return `
Today is the anniversary of the release of <cite>Pier of the Unknown</cite>, the first DLC expansion of <cite>Cassette Beasts</cite>!
Today is the ${pierAnniversary}-year anniversary of the release of <cite>Pier of the Unknown</cite>, the first DLC expansion of <cite>Cassette Beasts</cite>!
`;
break;
default:

View File

@ -114,22 +114,28 @@
if (month == 4 && day == 26)
return "CB Anniversary";
else if (month == 9 && day == 12)
else if (month == 10 && day == 4)
return "Pier Anniversary";
else
return "No event";
}
function getBlurbHtml(day) {
const currentYear = new Date().getFullYear();
const cbReleaseDate = new Date("2023-04-26").getFullYear();
const pierReleaseDate = new Date("2023-10-04").getFullYear();
const cbAnniversary = currentYear - cbReleaseDate;
const pierAnniversary = currentYear - pierReleaseDate;
switch (day) {
case "CB Anniversary":
return `
Today is the anniversary of the release of <cite>Cassette Beasts</cite>!
Today is the ${cbAnniversary}-year anniversary of the release of <cite>Cassette Beasts</cite>!
`;
break;
case "Pier Anniversary":
return `
Today is the anniversary of the release of <cite>Pier of the Unknown</cite>, the first DLC expansion of <cite>Cassette Beasts</cite>!
Today is the ${pierAnniversary}-year anniversary of the release of <cite>Pier of the Unknown</cite>, the first DLC expansion of <cite>Cassette Beasts</cite>!
`;
break;
default:

View File

@ -114,22 +114,28 @@
if (month == 4 && day == 26)
return "CB Anniversary";
else if (month == 9 && day == 12)
else if (month == 10 && day == 4)
return "Pier Anniversary";
else
return "No event";
}
function getBlurbHtml(day) {
const currentYear = new Date().getFullYear();
const cbReleaseDate = new Date("2023-04-26").getFullYear();
const pierReleaseDate = new Date("2023-10-04").getFullYear();
const cbAnniversary = currentYear - cbReleaseDate;
const pierAnniversary = currentYear - pierReleaseDate;
switch (day) {
case "CB Anniversary":
return `
Today is the anniversary of the release of <cite>Cassette Beasts</cite>!
Today is the ${cbAnniversary}-year anniversary of the release of <cite>Cassette Beasts</cite>!
`;
break;
case "Pier Anniversary":
return `
Today is the anniversary of the release of <cite>Pier of the Unknown</cite>, the first DLC expansion of <cite>Cassette Beasts</cite>!
Today is the ${pierAnniversary}-year anniversary of the release of <cite>Pier of the Unknown</cite>, the first DLC expansion of <cite>Cassette Beasts</cite>!
`;
break;
default:

View File

@ -114,22 +114,28 @@
if (month == 4 && day == 26)
return "CB Anniversary";
else if (month == 9 && day == 12)
else if (month == 10 && day == 4)
return "Pier Anniversary";
else
return "No event";
}
function getBlurbHtml(day) {
const currentYear = new Date().getFullYear();
const cbReleaseDate = new Date("2023-04-26").getFullYear();
const pierReleaseDate = new Date("2023-10-04").getFullYear();
const cbAnniversary = currentYear - cbReleaseDate;
const pierAnniversary = currentYear - pierReleaseDate;
switch (day) {
case "CB Anniversary":
return `
Today is the anniversary of the release of <cite>Cassette Beasts</cite>!
Today is the ${cbAnniversary}-year anniversary of the release of <cite>Cassette Beasts</cite>!
`;
break;
case "Pier Anniversary":
return `
Today is the anniversary of the release of <cite>Pier of the Unknown</cite>, the first DLC expansion of <cite>Cassette Beasts</cite>!
Today is the ${pierAnniversary}-year anniversary of the release of <cite>Pier of the Unknown</cite>, the first DLC expansion of <cite>Cassette Beasts</cite>!
`;
break;
default:

View File

@ -20,22 +20,28 @@
if (month == 4 && day == 26)
return "CB Anniversary";
else if (month == 9 && day == 12)
else if (month == 10 && day == 4)
return "Pier Anniversary";
else
return "No event";
}
function getBlurbHtml(day) {
const currentYear = new Date().getFullYear();
const cbReleaseDate = new Date("2023-04-26").getFullYear();
const pierReleaseDate = new Date("2023-10-04").getFullYear();
const cbAnniversary = currentYear - cbReleaseDate;
const pierAnniversary = currentYear - pierReleaseDate;
switch (day) {
case "CB Anniversary":
return `
Today is the anniversary of the release of <cite>Cassette Beasts</cite>!
Today is the ${cbAnniversary}-year anniversary of the release of <cite>Cassette Beasts</cite>!
`;
break;
case "Pier Anniversary":
return `
Today is the anniversary of the release of <cite>Pier of the Unknown</cite>, the first DLC expansion of <cite>Cassette Beasts</cite>!
Today is the ${pierAnniversary}-year anniversary of the release of <cite>Pier of the Unknown</cite>, the first DLC expansion of <cite>Cassette Beasts</cite>!
`;
break;
default:

View File

@ -30,6 +30,10 @@
--clr-main-footer-bg: #9b59b6;
}
.hero__top-bar {
color: var(--clr-navbar-link);
}
.footer {
color: var(--clr-navbar-link);
}