Skip to content

Commit

Permalink
Merge pull request #40 from ilikepizza107/main
Browse files Browse the repository at this point in the history
Storm IX, DFW Fest Finale :(, G5itD 5
  • Loading branch information
pkzstar authored Aug 2, 2024
2 parents ad4c27c + 3871d26 commit 463452f
Show file tree
Hide file tree
Showing 2 changed files with 115 additions and 6 deletions.
89 changes: 83 additions & 6 deletions Calendar/Calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -1248,25 +1248,85 @@ function showCalendar(month, year) {
cell.appendChild(link);


//Tech Zone 3
} else if (month === 7 && (date === 31) && year === 2024) {
//Storm IX
} else if (month === 7 && (date === 17) && year === 2024) {


let link = document.createElement("a");
link.href = "https://www.start.gg/tournament/tech-zone-3/details";
link.href = "https://www.start.gg/tournament/storm-ix/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%2F685674%2Fimage-c4721066d975473bbb300c0cb9c6fba3-optimized.png&ehk=8hPucP15HYK%2BadyuKPEp36gjy6N9HFnZm5UZKxcINS8%3D&w=280&h=280&r=0";
image.src = "https://www.bing.com/th?pid=Sgg&qlt=100&u=https%3A%2F%2Fimages.start.gg%2Fimages%2Ftournament%2F685889%2Fimage-93aa902db1980d230e1408e73e570b32-optimized.png&ehk=k0xKVQvVRrSRjoIXPf4YN4aPmQXvWKjwYTpH2OKTo0E%3D&w=280&h=280&r=0";

image.classList.add("calendarImg");


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


//Tech Zone 3 + DFW Fest Finale
} else if (month === 7 && (date === 31) && year === 2024) {

//Undertow 2024
const events = [
{
link: "https://www.start.gg/tournament/tech-zone-3/details",
imageSrc: "https://www.bing.com/th?pid=Sgg&qlt=100&u=https%3A%2F%2Fimages.start.gg%2Fimages%2Ftournament%2F685674%2Fimage-c4721066d975473bbb300c0cb9c6fba3-optimized.png&ehk=8hPucP15HYK%2BadyuKPEp36gjy6N9HFnZm5UZKxcINS8%3D&w=280&h=280&r=0"

},
{
link: "https://www.start.gg/tournament/dfw-fest-finale/details",
imageSrc: "https://www.bing.com/th?pid=Sgg&qlt=100&u=https%3A%2F%2Fimages.start.gg%2Fimages%2Ftournament%2F694863%2Fimage-566e5e5f63a5f87f94a87375509f61c9-optimized.png&ehk=CaWmVw9oqVniui2UvyVvvcfkhfGIJ9rEMmwP9AdBz9A%3D&w=280&h=280&r=0"
}
];
let currentIndex = 0; // Initialize current index

let link = document.createElement("a");
link.target = "_blank";

let image = document.createElement("img");

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
} else if (month === 8 && (date === 6 || date === 7 || date === 8) && year === 2024) {


Expand All @@ -1284,7 +1344,7 @@ function showCalendar(month, year) {
cell.appendChild(link);


//Infrared 2024
//Infrared 2024
} else if (month === 9 && (date === 6) && year === 2024) {


Expand All @@ -1302,6 +1362,23 @@ function showCalendar(month, year) {
cell.appendChild(link);


//G5itD #5
} else if (month === 8 && (date === 21 || date === 22) && year === 2024) {


let link = document.createElement("a");
link.href = "https://www.start.gg/tournament/game-5-in-the-d-5-the-big-one/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%2F691070%2Fimage-20c7e0ee687afcac9b01ac503fbdc8c3-optimized.jpg&ehk=RA9HKOI4f5SFLA5BA6Eogqbd89fxlbUvo52xfFEc1Mg%3D&w=280&h=280&r=0";

image.classList.add("calendarImg");


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

//Big Cheese
} else if (month === 9 && (date === 11) && year === 2024) {

Expand Down
32 changes: 32 additions & 0 deletions index js/indexEventsList.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,16 @@ const eventsData = [
rankImg: true,
trailer: ""
},
{
name: "Storm IX",
date: "8/17/24",
location: "Newcastle, Northumberland, UK",
description: "THERE BE A STORM BREWIN' We return with Storm. Hosted at the Bridge Inn - Castle Garth venue. Opposite the Newcastle Castle. 48 PLAYER ENTRY CAP",
imageUrl: "https://www.bing.com/th?pid=Sgg&qlt=100&u=https%3A%2F%2Fimages.start.gg%2Fimages%2Ftournament%2F685889%2Fimage-93aa902db1980d230e1408e73e570b32-optimized.png&ehk=k0xKVQvVRrSRjoIXPf4YN4aPmQXvWKjwYTpH2OKTo0E%3D&w=280&h=280&r=0",
link: "https://www.start.gg/tournament/storm-ix/details",
rankImg: false,
trailer: ""
},
{
name: "Garden Brawl",
date: "8/24/24",
Expand All @@ -159,6 +169,17 @@ const eventsData = [
trailer: "",
stream: ""
},
{
name: "DFW Fest FINALE :(",
date: "8/31/24",
location: "Plano, TX, USA",
description: "The final DFW Fest! Doors at 12PM CT, Dubs at 1PM CT, Singles at 3PM CT",
imageUrl: "https://www.bing.com/th?pid=Sgg&qlt=100&u=https%3A%2F%2Fimages.start.gg%2Fimages%2Ftournament%2F694863%2Fimage-566e5e5f63a5f87f94a87375509f61c9-optimized.png&ehk=CaWmVw9oqVniui2UvyVvvcfkhfGIJ9rEMmwP9AdBz9A%3D&w=280&h=280&r=0",
link: "https://www.start.gg/tournament/dfw-fest-finale/details",
rankImg: false,
trailer: "https://youtu.be/plhYgcCJwtA",
stream: "https://www.twitch.tv/projectmnexus"
},
{
name: "Undertow 2024",
date: "9/6/24 - 9/9/24",
Expand All @@ -170,6 +191,17 @@ const eventsData = [
trailer: "https://drive.google.com/file/d/1vimHNr_rDTmjhH1vFLUpQZjQPFIsG7xR/view",
stream: "https://www.twitch.tv/projectmnexus"
},
{
name: "Game 5 in the D #5: The Big One!",
date: "9/21/24 - 9/22/24",
location: "Detroit, MI, USA",
description: "We welcome all valiant competitors to our local P+ scene's return-to-form! Featuring a professional stream, custom tournament badges, your favorite players, and much, much more, this will be an event you won't want to miss!",
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",
link: "https://www.start.gg/tournament/game-5-in-the-d-5-the-big-one/details",
rankImg: false,
trailer: "",
stream: "https://www.twitch.tv/game5projectplus"
},
{
name: "Infrared 2024",
date: "10/6/24",
Expand Down

0 comments on commit 463452f

Please sign in to comment.