Skip to content

Commit

Permalink
smym + beachin date fix
Browse files Browse the repository at this point in the history
  • Loading branch information
pkzstar committed Sep 19, 2024
1 parent 754d69d commit 7ece72a
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 8 deletions.
60 changes: 52 additions & 8 deletions Calendar/Calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -1856,7 +1856,7 @@ function showCalendar(month, year) {


// Beachin
} else if (month === 10 && (date === 9) && year === 2024) {
} else if (month === 10 && (date === 1 || date === 2 || date === 3) && year === 2024) {


let link = document.createElement("a");
Expand All @@ -1872,22 +1872,66 @@ function showCalendar(month, year) {
link.appendChild(image);
cell.appendChild(link);

//Homecoming
//Homecoming & show me your moves
} else if (month === 10 && (date === 9) && year === 2024) {


const events = [
{
link: "https://smashboards.com/threads/homecoming-p-hdr-nov-9th-2024.523550/",
imageSrc: "https://github.com/pkzstar/plus-side/blob/main/images/upcoming%20events/homecominglogo.png?raw=true"
},
{
link: "https://www.start.gg/tournament/show-me-your-moves-24-1/details",
imageSrc: "https://www.bing.com/th?pid=Sgg&qlt=100&u=https%3A%2F%2Fimages.start.gg%2Fimages%2Ftournament%2F698361%2Fimage-d2e2c3e64de1dc9428c9460ea5c42180-optimized.jpg&ehk=i1VdSzAZQGuklEvHYhFum3SBQvSjxHcoDLlRYbWuOKA%3D&w=280&h=280&r=0"
}
];
let currentIndex = 0; // Initialize current index

let link = document.createElement("a");
link.href = "https://smashboards.com/threads/homecoming-p-hdr-nov-9th-2024.523550/";
link.target = "_blank";

let image = document.createElement("img");
image.src = "https://github.com/pkzstar/plus-side/blob/main/images/upcoming%20events/homecominglogo.png?raw=true";


image.classList.add("calendarImg");



link.appendChild(image);
cell.appendChild(link);

// Function to fade in/out the image and link
function fadeInOut(element) {
let opacity = 0;
let increasing = true;
let interval = setInterval(function() {
if (increasing) {
opacity += 0.05;
} else {
opacity -= 0.05;
}
element.style.opacity = opacity;
if (opacity >= 1) {
increasing = false;
setTimeout(() => {
increasing = true;
updateLinkAndImage(); // Update link and image after fully visible
}, 2000); // Image and link will be fully visible for 2 seconds before fading out
} else if (opacity <= 0) {
clearInterval(interval);
fadeInOut(element); // Restart the fading animation
}
}, 100); // Adjust the timing as needed
}

// Function to update the link and image
function updateLinkAndImage() {
link.href = events[currentIndex].link;
image.src = events[currentIndex].imageSrc;
currentIndex = (currentIndex + 1) % events.length; // Move to the next event, looping back to the beginning if necessary
}

updateLinkAndImage(); // Initially update link and image
fadeInOut(image); // Start fade-in/out animation // Start cycling events

}
//BL9
else if (month === 10 && (date === 16 || date === 17) && year === 2024) {
Expand Down
11 changes: 11 additions & 0 deletions index js/indexEventsList.js
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,17 @@ const eventsData = [
trailer: "",
stream: ""
},
{
name: "Show Me Your Moves 24",
date: "11/9/24",
location: "Urbana, IL, USA",
description: "Show Me Your Moves features Super Smash Bros. Melee and Super Smash Bros. Ultimate as always, and we're thrilled to be bringing you Project+ once more!",
imageUrl: "https://www.bing.com/th?pid=Sgg&qlt=100&u=https%3A%2F%2Fimages.start.gg%2Fimages%2Ftournament%2F698361%2Fimage-d2e2c3e64de1dc9428c9460ea5c42180-optimized.jpg&ehk=i1VdSzAZQGuklEvHYhFum3SBQvSjxHcoDLlRYbWuOKA%3D&w=280&h=280&r=0",
link: "https://www.start.gg/tournament/show-me-your-moves-24-1/details",
rankImg: false,
trailer: "",
stream: ""
},
{
name: "Blacklisted 9",
date: "11/16/24 - 11/17/24",
Expand Down

0 comments on commit 7ece72a

Please sign in to comment.