Skip to content

Commit

Permalink
Merge pull request #54 from ilikepizza107/main
Browse files Browse the repository at this point in the history
Birdhouse 13 + vods
  • Loading branch information
pkzstar authored Oct 30, 2024
2 parents 89e55d3 + ff69c25 commit b845aeb
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 40 deletions.
86 changes: 55 additions & 31 deletions Calendar/Calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -2078,45 +2078,69 @@ function showCalendar(month, year) {
updateLinkAndImage(); // Initially update link and image
fadeInOut(image); // Start fade-in/out animation // Start cycling events

//MMDX
} else if (month === 10 && (date === 16) && year === 2024) {


let link = document.createElement("a");
link.href = "https://www.start.gg/tournament/mass-madness-deluxe-a-project-melee-and-hdr-regional/details";
link.target = "_blank";

let image = document.createElement("img");
image.src = "https://www.bing.com/th?pid=Sgg&qlt=100&u=https%3A%2F%2Fimages.start.gg%2Fimages%2Ftournament%2F722151%2Fimage-868aa56131de1627a08419780bb84420-optimized.png&ehk=axLCB38xhnZMiXM%2F4Uz1Bme%2BwrhpVNO27PDEWVKyY1I%3D&w=280&h=280&r=0";

image.classList.add("calendarImg");


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


//Pissmas
else if ((month === 10 && (date === 29 || date === 30) && year === 2024) ||
(month === 11 && date === 1 && year === 2024)) {

//MMDX + Birdhouse 13
} else if(month === 10 && date === 16 && year === 2024) {

const events = [
{
link: "https://www.start.gg/tournament/mass-madness-deluxe-a-project-melee-and-hdr-regional/details",
imageSrc: "https://www.bing.com/th?pid=Sgg&qlt=100&u=https%3A%2F%2Fimages.start.gg%2Fimages%2Ftournament%2F722151%2Fimage-868aa56131de1627a08419780bb84420-optimized.png&ehk=axLCB38xhnZMiXM%2F4Uz1Bme%2BwrhpVNO27PDEWVKyY1I%3D&w=280&h=280&r=0"

},
{
link: "https://www.start.gg/tournament/birdhouse-13-charity-for-the-foodbank/details",
imageSrc: "https://www.bing.com/th?pid=Sgg&qlt=100&u=https%3A%2F%2Fimages.start.gg%2Fimages%2Ftournament%2F723673%2Fimage-1aeb7b34779d59e9909f10cf735714c3-optimized.jpg&ehk=e2h9y%2FCTF7Aw7%2FGVtqZinnCqeudWtq%2FxFsTFRF0ZZg8%3D&w=280&h=280&r=0"
}

];
let currentIndex = 0; // Initialize current index

let link = document.createElement("a");
link.href = "https://www.start.gg/tournament/pissmas-5/details";
link.target = "_blank";

let image = document.createElement("img");
image.src = "https://www.bing.com/th?pid=Sgg&qlt=100&u=https%3A%2F%2Fimages.start.gg%2Fimages%2Ftournament%2F711199%2Fimage-13f747fdf4949ee152c280b5ad6213dc-optimized.png&ehk=B4KLu7um2O7wIzURoDP%2F1L8VLvwVop4KB47typTJpaQ%3D&w=280&h=280&r=0";


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

// CoB 2
else if (month === 11 && (date === 14) && year === 2024) {
} else if (month === 11 && (date === 14) && year === 2024) {


let link = document.createElement("a");
Expand Down
18 changes: 9 additions & 9 deletions past-events/pastEvents2024.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ const eventData = [
first: "Flarp",
second: "Imogen Heat",
third: "Wombat",
vodsUrl: "",
vodsUrl: "https://www.youtube.com/watch?v=jkqz1D472zo",
hideRankImage: false
},
{
Expand Down Expand Up @@ -250,7 +250,7 @@ const eventData = [
first: "Ryzuul",
second: "Goodie",
third: "Microsoft J",
vodsUrl: "",
vodsUrl: "https://www.youtube.com/playlist?list=PLXuSSlxxWDDpJ73ysx0uIYJgx-ZvZH8KH",
hideRankImage: true
},
{
Expand All @@ -263,7 +263,7 @@ const eventData = [
first: "Flarp",
second: "Switch",
third: "sfy bees",
vodsUrl: "",
vodsUrl: "https://youtu.be/e5dDKP2AvZk",
hideRankImage: false
},
{
Expand Down Expand Up @@ -306,7 +306,7 @@ const eventData = [
hideRankImage: true
},
{
eventTitle: "Game 5: The Big One!",
eventTitle: "Game 5 in the D #5: The Big One!",
imageUrl: "https://www.bing.com/th?pid=Sgg&qlt=100&u=https%3A%2F%2Fimages.start.gg%2Fimages%2Ftournament%2F691070%2Fimage-20c7e0ee687afcac9b01ac503fbdc8c3-optimized.jpg&ehk=RA9HKOI4f5SFLA5BA6Eogqbd89fxlbUvo52xfFEc1Mg%3D&w=280&h=280&r=0",
eventUrl: "https://www.start.gg/tournament/game-5-in-the-d-5-the-big-one/event/project-singles/standings",
date: "September 21-22 2024",
Expand Down Expand Up @@ -354,7 +354,7 @@ const eventData = [
first: "Chaloopy",
second: "ORLY",
third: "Comb",
vodsUrl: "",
vodsUrl: "https://www.youtube.com/playlist?list=PLJIkd-7ajnoXD8jJpfyMtLVJ0TTp84P50",
hideRankImage: false
},
{
Expand All @@ -367,7 +367,7 @@ const eventData = [
first: "Apathy",
second: "Pug",
third: "Captain Birdman",
vodsUrl: "",
vodsUrl: "https://www.youtube.com/playlist?list=PLv67ityPWGAU_kPG_pR9zeRpM2g5wZ2n-",
hideRankImage: false
},
{
Expand All @@ -379,8 +379,8 @@ const eventData = [
entrants: 26,
first: "Blitz",
second: "Krumpberry",
third: "The clencher",
vodsUrl: "",
third: "The Clencher",
vodsUrl: "https://www.youtube.com/playlist?list=PLdxdm5Mb0WctMPVYlHsiy9jPPbGCzpoPE",
hideRankImage: true
},
{
Expand Down Expand Up @@ -445,7 +445,7 @@ const eventData = [
first: "Kycse",
second: "Flarp",
third: "Pikmon",
vodsUrl: "",
vodsUrl: "https://www.youtube.com/playlist?list=PLXuSSlxxWDDpwh_gHxj7BCnT_TYCo4NBZ",
hideRankImage: false
},
{
Expand Down

0 comments on commit b845aeb

Please sign in to comment.