Skip to content

Commit

Permalink
black market
Browse files Browse the repository at this point in the history
  • Loading branch information
pkzstar committed Apr 29, 2024
1 parent d5b591d commit 9049445
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 8 deletions.
9 changes: 9 additions & 0 deletions indexEventsList.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,15 @@ const eventsData = [
link: "https://www.start.gg/tournament/invincible-viii/details",
rankImg: false
},
{
name: "The Black Market",
date: "6/22/24",
location: "Calgary, AB, Canada",
description: "A celebration of Smash Bros. fan games!Featuring HDR Singles, HDR Doubles and P+ Singles as paid events, along with plenty of free side events such as HDR Amateur brackets, Smash Remix, Rivals of Aether and Sonic Adventure 2!",
imageUrl: "https://github.com/pkzstar/plus-side/blob/main/images/upcoming%20events/blackmarket.png?raw=true",
link: "https://www.start.gg/tournament/the-black-market/details",
rankImg: false
},
{
name: "SUPER CLOUDY SCUFFLE",
date: "6/22/24",
Expand Down
59 changes: 51 additions & 8 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -290,22 +290,65 @@ function showCalendar(month, year) {
link.appendChild(image);
cell.appendChild(link);

//SUPER CLOUDY SCUFFLE
//SUPER CLOUDY SCUFFLE & Black Market
} else if(month === 5 && date === 22 && year === 2024) {
// Example link with image

const events = [
{
link: "https://www.start.gg/tournament/super-cloudy-scuffle-a-durham-regional/details",
imageSrc: "https://github.com/pkzstar/HDReport/blob/main/images/upcoming%20events/super%20cloudy%20scuffle.png?raw=true"

},
{
link: "https://www.start.gg/tournament/the-black-market/details",
imageSrc: "https://github.com/pkzstar/plus-side/blob/main/images/upcoming%20events/blackmarket.png?raw=true"
}
];
let currentIndex = 0; // Initialize current index

let link = document.createElement("a");
link.href = "https://www.start.gg/tournament/super-cloudy-scuffle-a-durham-regional/details";
link.target = "_blank";

let image = document.createElement("img");
image.src = "https://github.com/pkzstar/HDReport/blob/main/images/upcoming%20events/super%20cloudy%20scuffle.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

//Undertow 2024
} else if (month === 8 && (date === 6 || date === 7 || date === 8) && year === 2024) {
Expand Down

0 comments on commit 9049445

Please sign in to comment.