2024-04-20 10:10:34 +00:00
<!DOCTYPE html>
< html lang = "en" dir = "ltr" id = "page-top" >
< head >
< meta charset = "UTF-8" >
< meta http-equiv = "X-UA-Compatible" content = "IE=edge" >
< meta name = "viewport" content = "width=device-width, initial-scale=1.0" >
< meta property = "og:title" content = "Changelogs" >
< meta charset = "utf-8" >
< meta http-equiv = "X-UA-Compatible" content = "IE=edge" >
< meta name = "viewport" content = "width=device-width, initial-scale=1" >
< meta name = "description" content = "Changelogs of my website." >
< meta name = "generator" content = "Eleventy v2.0.1" >
< meta property = "og:type" content = "website" >
< meta property = "og:url" content = "https://leilukin.neocities.org/changelogs/" >
< meta property = "og:site_name" content = "Leilukin's Hub" >
< meta property = "og:locale" content = "en_MY" >
< meta property = "og:description" content = "Changelogs of my website." >
< meta name = "twitter:card" content = "summary" >
< meta name = "twitter:url" content = "https://leilukin.neocities.org/changelogs/" >
< meta name = "twitter:description" content = "Changelogs of my website." >
< link rel = "canonical" href = "https://leilukin.neocities.org/changelogs/" >
< link rel = "stylesheet" href = "/assets/css/main.css" >
< link rel = "stylesheet" href = "/assets/fonts/noto-sans/noto-sans.css" >
< link href = "/assets/fonts/fontawesome/css/fontawesome.css" rel = "stylesheet" / >
< link href = "/assets/fonts/fontawesome/css/brands.css" rel = "stylesheet" / >
< link href = "/assets/fonts/fontawesome/css/solid.css" rel = "stylesheet" / >
< link rel = "apple-touch-icon" sizes = "180x180" href = "/assets/favicon/apple-touch-icon.png" >
< link rel = "icon" type = "image/png" sizes = "32x32" href = "/assets/favicon/favicon-32x32.png" >
< link rel = "icon" type = "image/png" sizes = "16x16" href = "/assets/favicon/favicon-16x16.png" >
< link rel = "manifest" href = "/assets/favicon/site.webmanifest" >
< title >
Changelogs | Leilukin's Hub
< / title >
< / head >
< body >
< header class = "hero" >
< div class = "hero__top-bar hidden" > < / div >
< div class = "hero__img" >
2024-04-20 12:00:02 +00:00
< img fetchpriority = "high" src = "/assets/leilukin/Leilukins-Hub-website-banner.png" alt = "Banner of Leilukin's Hub" >
2024-04-20 10:10:34 +00:00
< / div >
< / header >
< style >
.hero {
width: 100%;
background-color: var(--clr-hero-bg);
display: flex;
flex-direction: column;
justify-content: center;
text-align: center;
}
.hero__top-bar {
background-color: var(--clr-navbar-bg);
width: 100%;
2024-04-23 07:57:54 +00:00
padding: 0.5em 0.7em;
2024-04-20 10:10:34 +00:00
}
.hero__img {
display: grid;
place-content: center;
}
.hero img {
2024-04-20 11:43:13 +00:00
object-fit: contain;
2024-04-20 10:10:34 +00:00
overflow: hidden;
2024-04-20 11:43:13 +00:00
max-height: 16rem;
2024-04-26 16:12:13 +00:00
filter: drop-shadow(0.1rem 0.1rem 0.2rem black);
2024-04-20 10:10:34 +00:00
}
< / style >
< script defer >
const hero = document.querySelector(".hero");
const todayEvent = getTodayEvent();
const heroTopBarEl = document.querySelector(".hero__top-bar");
const headerImgEl = document.querySelector(".hero__img");
if (todayEvent != "No event") {
heroTopBarEl.classList.remove('hidden');
if (todayEvent == "Leilukin's Birthday" || todayEvent == "Leilukin's Hub Anniversary") {
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent);
} else {
headerImgEl.classList.add(getBanner(todayEvent));
heroTopBarEl.innerHTML = getBlurbHtml(todayEvent);
}
}
function getTodayEvent() {
const date = new Date();
const month = date.getMonth() + 1;
const day = date.getDate();
if (month == 3 & & day == 1)
return "Zero Discrimination Day";
2024-04-29 03:04:46 +00:00
else if (month == 3 & & day == 8)
return "International Women's Day";
2024-04-20 10:10:34 +00:00
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";
2024-04-29 02:56:49 +00:00
else if (month == 10 & & day == 17)
2024-04-29 02:54:38 +00:00
return "Genderfluid Visibility Week";
2024-04-29 02:56:49 +00:00
else if (month == 10 & & day == 24)
return "Ace Week";
2024-04-20 10:10:34 +00:00
else if (month == 10 & & day == 26)
return "Intersex Awareness Day";
else
return "No event";
}
function getBanner(day) {
switch (day) {
case "Zero Discrimination Day":
return "flag-progress-intersex";
break;
2024-04-29 03:04:46 +00:00
case "International Women's Day":
return "symbol-venus";
break;
2024-04-20 10:10:34 +00:00
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;
2024-04-29 02:54:38 +00:00
case "Genderfluid Visibility Week":
return "flag-genderfluid";
break;
2024-04-29 02:56:49 +00:00
case "Ace Week":
return "flag-ace";
break;
2024-04-20 10:10:34 +00:00
case "Intersex Awareness Day":
return "flag-intersex";
break;
default:
return "";
}
}
function getBlurbHtml(day) {
switch (day) {
case "Zero Discrimination Day":
return `
Today is < a href = "https://www.unaids.org/en/zero-discrimination-day" target = "_blank" > Zero Discrimination Day< / a >
`;
break;
2024-04-29 03:04:46 +00:00
case "International Women's Day":
return `
Today is < a href = "https://www.internationalwomensday.com/" target = "_blank" > International Women's Day< / a >
`;
break;
2024-04-20 10:10:34 +00:00
case "Trans Day of Visibility":
return `
Today is < a href = "https://www.manygendersonevoice.org/tdov.html" target = "_blank" > Trans Day of Visibility< / a >
`;
break;
case "International Asexuality Day":
return `
Today is < a href = "https://internationalasexualityday.org/en" target = "_blank" > International Asexuality Day< / a >
`;
break;
case "Lesbian Visibility Day":
return `
Today is < a href = "https://www.lesbianvisibilityweek.com" target = "_blank" > Lesbian Visibility Day< / a >
`;
break;
case "IDAHOBIT":
return `
Today is < a href = "https://may17.org" target = "_blank" > International Day Against Homophobia, Biphobia and Transphobia< / a > < / span >
`;
break;
case "Agender Pride Day":
return `
Today is < a href = "https://www.believeoutloud.com/voices/article/agender-pride-day/" target = "_blank" > Agender Pride Day< / a > < / span >
`;
break;
case "Pansexual and Panromantic Awareness & Visibility Day":
return `
Today is < a href = "https://genderedintelligence.co.uk/panvisibilityday" target = "_blank" > Pansexual and Panromantic Visibility Day< / a >
`;
break;
case "Pride Month":
return `
Happy < a href = "https://www.loc.gov/lgbt-pride-month/about/" target = "_blank" > Pride Month< / a > !
`;
break;
case "Non-Binary People's Day":
return `
Today is < a href = "https://www.manygendersonevoice.org/non-binary-peoples-day.html" target = "_blank" > Non-Binary People's Day< / a >
`;
break;
case "Leilukin's Birthday":
return `
Today is Leilukin's birthday
`;
break;
case "Leilukin's Hub Anniversary":
return `
Today is the anniversary of the launch of Leilukin's Hub
`;
break;
case "Bi Visibility Day":
return `
Today is < a href = "https://bivisibilityday.com/about" target = "_blank" > Bi Visibility Day< / a >
`;
break;
case "International Lesbian Day":
return `
Today is < a href = "https://www.lgbtiqhealth.org.au/international_lesbian_day2" target = "_blank" > International Lesbian Day< / a >
`;
break;
case "National Coming Out Day":
return `
Today is < a href = "https://www.hrc.org/resources/national-coming-out-day" target = "_blank" > National Coming Out Day< / a >
`;
break;
2024-04-29 02:54:38 +00:00
case "Genderfluid Visibility Week":
return `
Today is the start of < a href = "https://www.grlgbtqhealthcareconsortium.org/significantdates/genderfluid-visibility-week" target = "_blank" > Genderfluid Visibility Week< / a >
`;
break;
2024-04-29 02:56:49 +00:00
case "Ace Week":
return `
Today is the start of < a href = "https://www.grlgbtqhealthcareconsortium.org/significantdates/ace-week" target = "_blank" > Ace Week< / a >
`;
break;
2024-04-20 10:10:34 +00:00
case "Intersex Awareness Day":
return `
Today is < a href = "https://interactadvocates.org/intersex-awareness-day" target = "_blank" > Intersex Awareness Day< / a >
`;
break;
default:
return ``;
}
}
< / script >
< nav class = "navbar" >
< ul class = "nav__menu" >
< li >
2024-04-24 16:43:39 +00:00
< a href = "/" > Home< / a >
2024-04-20 10:10:34 +00:00
< / li >
< li >
2024-04-24 16:43:39 +00:00
< a href = "/about/" > About< / a >
2024-04-20 10:10:34 +00:00
< / li >
< li >
2024-04-24 16:43:39 +00:00
< a href = "/now/" > Now< / a >
2024-04-20 10:10:34 +00:00
< / li >
< li >
2024-04-24 16:43:39 +00:00
< a href = "/blog/" > Blog< / a >
2024-04-20 10:10:34 +00:00
< / li >
< li >
2024-04-24 16:43:39 +00:00
< a href = "/articles/" > Articles< / a >
2024-04-20 10:10:34 +00:00
< / li >
< li >
2024-04-24 16:43:39 +00:00
< a href = "/projects/" > Projects< / a >
2024-04-20 10:10:34 +00:00
< / li >
< li >
2024-04-24 16:43:39 +00:00
< a href = "/shrines/" > Shrines< / a >
2024-04-20 10:10:34 +00:00
< / li >
< li >
2024-04-24 16:43:39 +00:00
< a href = "/links/" > Links< / a >
2024-04-20 10:10:34 +00:00
< / li >
< li > < a href = "https://leilukin.123guestbook.com/" > Guestbook< / a > < / li >
< / ul >
< / nav >
< style >
.navbar {
background: var(--clr-navbar-bg);
padding: 0 0.6rem;
width: 100%;
z-index: 999;
position: sticky;
top: 0;
}
.navbar a {
color: var(--clr-navbar-link);
text-decoration: none;
cursor: pointer;
}
.navbar a:hover {
color: var(--clr-link-hover);
}
.navbar a:focus {
outline-offset: 0.3em;
outline: 0.15em solid var(--clr-navbar-link);
}
.nav__menu {
list-style: none;
padding: 0;
display: flex;
justify-content: space-evenly;
flex-wrap: wrap;
gap: 0.5rem;
}
< / style >
< main >
< header class = "main__header" >
< h1 > Website Changelogs< / h1 >
< p > Changelogs of my website.< / p >
< / header >
< div class = "content__wrapper" >
< div class = "content " >
< nav class = "changelog__nav" >
< p class = "changelog__nav--title" > Changelog Archive:< / p >
< ul class = "changelog__nav--links" >
2024-04-20 10:59:51 +00:00
< li > < a
aria-current="page"
href="/changelogs"
>Latest< / a > < / li >
2024-04-20 10:10:34 +00:00
2024-04-20 10:59:51 +00:00
< li > < a
href="/changelogs/2024/"
>2024< / a > < / li >
< li > < a
href="/changelogs/2023/"
>2023< / a > < / li >
< li > < a
href="/changelogs/2022/"
>2022< / a > < / li >
< li > < a
href="/changelogs/layouts/"
>Website Layouts< / a > < / li >
2024-04-20 10:10:34 +00:00
< / ul >
< / nav >
< p > To get notified of the updates on this website, you can subscribe to the < a href = "/feed.xml" target = "blank" > Leilukin's Hub RSS feed< / a > , which contains new articles, blog posts and website changelogs, or follow < a href = "https://neocities.org/site/leilukin" target = "_blank" > my Neocities profile< / a > .< / p >
< div class = "web-btn-wrapper center-el" style = "margin-top: 0.7em;" >
< a href = "/feed.xml" target = "blank" title = "Leilukin's Hub RSS Feed" >
< img src = "/assets/buttons/rss-button.gif" alt = "RSS feed button" >
< / a >
< / div >
< article >
< h2 > Latest Changelogs< / h2 >
2024-04-27 07:16:39 +00:00
< h3 class = "date-style" > 27 April 2024< / h3 >
< ul >
< li > New blog post: < a href = "/blog/posts/2024-04-27-lesbian-visibility-day1-year-anniversary-of-cassette-beasts/" > Happy Lesbian Visibility Day and 1-Year Anniversary of Cassette Beasts< / a > .< / li >
< / ul >
2024-04-21 12:59:43 +00:00
< h3 class = "date-style" > 21 April 2024< / h3 >
< ul >
2024-04-21 13:05:19 +00:00
< li > New blog post: < a href = "/blog/posts/2024-04-21-april-2024-leilukins-hub-overhaul-with-eleventy/" > April 2024 Leilukin's Hub Overhaul with Eleventy< / a > .< / li >
2024-04-21 12:59:43 +00:00
< / ul >
2024-04-20 10:10:34 +00:00
< h3 class = "date-style" > 20 April 2024< / h3 >
< ul >
< li > Finished overhauling this entire website with the static site generator < a href = "https://www.11ty.dev/" > Eleventy< / a > .< / li >
< / ul >
< h3 class = "date-style" > 5 April 2024< / h3 >
< ul >
< li > Add table of contents to my < a href = "/projects/kotor1mods/" > Star Wars: Knights of the Old Republic< / a > and < a href = "/projects/kotor2mods/" > Star Wars: Knights of the Old Republic II: The Sith Lords mods< / a > .< / li >
< / ul >
< h3 class = "date-style" > 6 March 2024< / h3 >
< ul >
< li > New blog post: < a href = "/blog/posts/2024-03-06-I-Received-a-Lifetime-Premium-Membership-on-Nexus-Mods-for-Free" > I Received a Lifetime Premium Membership on Nexus Mods for Free< / a > .< / li >
< / ul >
< h3 class = "date-style" > 8 February 2024< / h3 >
< ul >
< li > Cassette Beasts < a href = "/shrines/cassettebeasts/" > shrine< / a > : Added < a href = "/shrines/cassettebeasts/resources" > Resources< / a > page.< / li >
< / ul >
< h3 class = "date-style" > 7 February 2024< / h3 >
< ul >
< li > < a href = "/projects/" > Projects< / a > : Added My Characters section.< / li >
< / ul >
< h3 class = "date-style" > 9 January 2024< / h3 >
< ul >
< li > Cassette Beasts < a href = "/shrines/cassettebeasts/" > shrine< / a > : Added a new section: My Contributions to the Cassette Beasts community.< / li >
< / ul >
< h3 class = "date-style" > 20 November 2023< / h3 >
< ul >
< li > New blog post: < a href = "/blog/posts/2023-11-20-Finally-Beat-A-Bugs-Life-Video-Game-24-Years-Later" > Finally Beat A Bug's Life The Video Game — 24 Years Later< / a > < / li >
< / ul >
< h3 class = "date-style" > 19 November 2023< / h3 >
< ul >
< li > New blog post: < a href = "/blog/posts/2023-11-19-I-Can-Finally-Game-on-a-Solid-State-Drive" > I Can Finally Game on a Solid-State Drive< / a > < / li >
< / ul >
< h3 class = "date-style" > 9 November 2023< / h3 >
< ul >
< li > Added extra header elements to the main site and the shrines to be dynamically displayed on certain days to celebrate special events. (Credit to < a href = "https://kotor.neocities.org/" > KotOR Community Portal< / a > for the inspiration)< / li >
< / ul >
< h3 class = "date-style" > 30 October 2023< / h3 >
< ul >
< li > New blog post: < a href = "/blog/posts/2023-10-30-Support-for-My-Steam-Review-of-A-Summers-End" > Support for My Steam Review of A Summer's End — Hong Kong 1986< / a > .< / li >
< / ul >
< h3 class = "date-style" > 18 October 2023< / h3 >
< ul >
< li > Cassette Beasts < a href = "/shrines/cassettebeasts/" > shrine< / a > : Added Developer Notes section to the < a href = "/shrines/cassettebeasts/trivia" > Trivia< / a > page.< / li >
< / ul >
< h3 class = "date-style" > 13 October 2023< / h3 >
< ul >
< li > New blog post: < a href = "/blog/posts/2023-10-13-My-Cassette-Beasts-Pombomb-Plushie-Arrived" > My Cassette Beasts Pombomb Plushie Arrived!< / a > < / li >
< / ul >
< h3 class = "date-style" > 4 October 2023< / h3 >
< ul >
< li > Cassette Beasts < a href = "/shrines/cassettebeasts/" > shrine< / a > : Updated the Development History section of the < a href = "/shrines/cassettebeasts/trivia" > Trivia< / a > page with info about the release of Update 1.5 and " Pier of the Unknown" DLC.< / li >
< / ul >
< h3 class = "date-style" > 3 October 2023< / h3 >
< ul >
< li > Changed this website's font to Noto Sans.< / li >
< li > Cassette Beasts < a href = "/shrines/cassettebeasts/" > shrine< / a > : Added link to my record of all the bootleg mosnters I have encountered to the < a href = "/shrines/cassettebeasts/gamelog/" > Game Log< / a > page.< / li >
< / ul >
< h3 class = "date-style" > 28 September 2023< / h3 >
< ul >
< li > Cassette Beasts < a href = "/shrines/cassettebeasts/" > shrine< / a > : Removed the Developer Insight page since the official Cassette Beasts wiki not has a page for a < a href = "https://wiki.cassettebeasts.com/wiki/List_of_Interviews" > list of interviews< / a > the Cassette Beasts staff participated in.< / li >
< / ul >
< h3 class = "date-style" > 15 September 2023< / h3 >
< ul >
< li > Cassette Beasts < a href = "/shrines/cassettebeasts/" > shrine< / a > : Updated the < a href = "/shrines/cassettebeasts/devinsights" > Developer Insight< / a > page by adding an Event Showcase section.< / li >
< / ul >
< h3 class = "date-style" > 13 September 2023< / h3 >
< ul >
< li > Cassette Beasts < a href = "/shrines/cassettebeasts/" > shrine< / a > : Updated the < a href = "/shrines/cassettebeasts/trivia" > Trivia< / a > page's Development History section with new information about the " Pier of the Unknown" DLC.< / li >
< / ul >
< h3 class = "date-style" > 11 September 2023< / h3 >
< ul >
< li > New blog post: < a href = "/blog/posts/2023-09-11-Happy-1st-Anniversary-to-Leilukins-Hub" > Happy 1st Anniversary to Leilukin's Hub< / a > .< / li >
< li > Updated the < a href = "/about/" > About< / a > page.< / li >
< li > Modified < a href = "/blog/" > blog< / a > style.< / li >
< li > Added the blog's new layout to the < a href = "/changelogs/layouts" > layout archive< / a > .< / li >
< / ul >
< / article >
< nav aria-label = "pagination" class = "pagination__wrapper" >
< ul class = "pagination" >
< li >
< a href = " /changelogs/" >
< i class = "fa-solid fa-angles-left" > < / i >
Newest
< / a >
< / li >
< li >
< i class = "fa-solid fa-angle-left" > < / i >
Newer
< / li >
< li >
< a href = " /changelogs/page/2/" >
Older
< i class = "fa-solid fa-angle-right" > < / i >
< / a >
< / li >
< li >
< a href = " /changelogs/page/5/" >
Oldest
< i class = "fa-solid fa-angles-right" > < / i >
< / a >
< / li >
< / ul >
< / nav >
< style >
.pagination__wrapper {
display: grid;
place-content: center;
margin-top: 1.5em;
}
.pagination {
list-style: none;
padding: 0;
margin: 0;
display: flex;
gap: 0.5em;
flex-wrap: wrap;
justify-content: center;
}
.pagination li {
text-align: center;
padding: 0.3em 0.7em;
color: var(--clr-title-border);
background-color: var(--clr-code-bg);
}
.pagination li:has(a) {
background-color: var(--clr-title-border);
}
.pagination li:has(a):hover {
cursor: pointer;
background-color: var(--clr-link-hover);
}
.pagination li:has(a):focus-within {
outline: 0.2em solid var(--clr-title-border);
outline-offset: 0.15em;
}
.pagination li a {
color: var(--clr-link-btn-hover);
text-decoration: none;
}
.pagination li a:focus {
outline: none;
}
< / style >
< style >
h2 + h3 {
margin-top: 1.5em;
}
h3 + ul {
margin-bottom: 3em;
}
< / style >
< style >
.changelog__nav,
.changelog__nav--links {
display: flex;
align-items: center;
justify-content: center;
flex-wrap: wrap;
}
.changelog__nav {
flex-direction: column;
gap: 0.2em;
align-self: center;
font-weight: 600;
gap: 0.5em;
}
.changelog__nav--links {
margin: 0;
padding: 0;
line-height: 1.1;
}
.changelog__nav--links {
list-style: none;
gap: 0.5em;
}
.changelog__nav--links li {
text-align: center;
align-self: center;
}
2024-04-20 10:59:51 +00:00
.changelog__nav--links li:not(:last-child)::after {
content: '|';
padding-left: 0.5em;
}
2024-04-20 10:10:34 +00:00
.changelog__nav--links [aria-current="page"] {
text-decoration: none;
color: var(--clr-bold-txt);
}
@media (min-width: 640px) {
.changelog__nav {
flex-direction: row;
gap: 1em;
}
}
< / style >
< / div >
< / div >
< style >
.breadcrumbs {
list-style: none;
padding: 0;
margin: 0 0 0.7em 0;
display: flex;
gap: 0.5em;
flex-wrap: wrap;
justify-content: center;
}
2024-04-24 17:31:54 +00:00
.breadcrumbs li::after {
content: '➔';
padding-left: 0.3em;
}
2024-04-20 10:10:34 +00:00
< / style >
< / main >
< footer class = "footer" >
< p > Made with ♥ by Leilukin since < time > 11 September 2022< / time > < / p >
< ul class = "footer__links" >
2024-04-20 10:59:51 +00:00
< li > < a
href="/sitemap/
">Site Map< / a > < / li >
< li > < a
aria-current="page"
href="/changelogs/"
>Changelogs< / a > < / li >
2024-04-20 10:10:34 +00:00
< li > < a href = "/feed.xml" > RSS< / a > < / li >
< / ul >
< / footer >
< style >
.footer {
margin-top: auto;
background: var(--clr-main-footer-bg);
padding: 0.8rem;
text-align: center;
display: grid;
}
.footer p {
padding: 0;
}
.footer__links {
justify-self: center;
list-style: none;
margin: 0;
padding: 0;
display: flex;
gap: 0.7em;
}
2024-04-20 10:59:51 +00:00
.footer__links li:not(:last-child)::after {
content: '|';
padding-left: 0.6em;
}
2024-04-20 10:10:34 +00:00
@media only screen and (min-width: 600px) {
.footer {
width: 100%;
}
}
< / style >
2024-04-21 19:05:20 +00:00
< button class = "top-btn hidden" aria-label = "Scroll to top" >
< i class = "fa-solid fa-chevron-up" > < / i >
2024-04-20 10:10:34 +00:00
< / button >
< style >
.top-btn {
position: fixed;
2024-04-21 19:05:20 +00:00
margin: 0;
padding: 0;
2024-04-21 19:08:40 +00:00
bottom: 0.5rem;
right: 0.5rem;
2024-04-20 10:10:34 +00:00
z-index: 999;
border: none;
2024-04-21 19:05:20 +00:00
background-color: var(--clr-top-btn-bg);
color: var(--clr-top-btn-txt);
2024-04-20 10:10:34 +00:00
border-radius: 50em;
2024-04-21 19:08:40 +00:00
width: 2rem;
2024-04-21 19:05:20 +00:00
aspect-ratio: 1 / 1;
2024-04-20 10:10:34 +00:00
}
.top-btn:focus {
2024-04-21 19:05:20 +00:00
outline: 0.25em solid var(--clr-top-btn-bg);
2024-04-20 10:10:34 +00:00
outline-offset: 0.15em;
}
< / style >
< script defer >
const topButton = document.querySelector(".top-btn");
window.onscroll = () => {
if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {
topButton.classList.remove("hidden");
} else {
topButton.classList.add("hidden");
}
}
topButton.addEventListener('click', () => {
window.scrollTo({
top: 0,
left: 0,
behavior: "smooth",
});
});
< / script >
< / body >
< / html >