Skip to content

Commit

Permalink
TN summit+ blacklist date edit
Browse files Browse the repository at this point in the history
  • Loading branch information
pkzstar committed Oct 19, 2024
1 parent 66529ee commit 48099fa
Show file tree
Hide file tree
Showing 2 changed files with 101 additions and 28 deletions.
92 changes: 77 additions & 15 deletions Calendar/Calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -2124,24 +2124,86 @@ function showCalendar(month, year) {
link.appendChild(image);
cell.appendChild(link);

// TECH 2025
//Tennessee Summit
} else if (month === 0 && (date === 10 || date === 12) && year === 2025) {
// Example link with image
let link = document.createElement("a");
link.href = "https://www.start.gg/tournament/tennessee-p-summit-2025/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%2F714654%2Fimage-9fcdb8b8b1acc8a88280304e3b010b63-optimized.jpg&ehk=8mBzXSK23mbPNHjSmTQkpgvRRF9qYsJ5PfgQ4qo4BJw%3D&w=280&h=280&r=0";

image.classList.add("calendarImg");


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


// TECH 2025 & tennessee summit
} else if (month === 0 && date === 11 && year === 2025) {

let link = document.createElement("a");
link.href = "https://www.start.gg/tournament/tech-2025/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%2F703812%2Fimage-621a3df3388b485f1c17bc39ef5043b4-optimized.png&ehk=fmJ2bU7fSCoK6ta%2FoMgERgnFVVH1449V1iaXyonXZPQ%3D&w=280&h=280&r=0";

image.classList.add("calendarImg");


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




const events = [
{
link: "https://www.start.gg/tournament/tech-2025/details",
imageSrc: "https://www.bing.com/th?pid=Sgg&qlt=100&u=https%3A%2F%2Fimages.start.gg%2Fimages%2Ftournament%2F703812%2Fimage-621a3df3388b485f1c17bc39ef5043b4-optimized.png&ehk=fmJ2bU7fSCoK6ta%2FoMgERgnFVVH1449V1iaXyonXZPQ%3D&w=280&h=280&r=0"

},
{
link: "https://www.start.gg/tournament/tennessee-p-summit-2025/details",
imageSrc: "https://www.bing.com/th?pid=Sgg&qlt=100&u=https%3A%2F%2Fimages.start.gg%2Fimages%2Ftournament%2F714654%2Fimage-9fcdb8b8b1acc8a88280304e3b010b63-optimized.jpg&ehk=8mBzXSK23mbPNHjSmTQkpgvRRF9qYsJ5PfgQ4qo4BJw%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

} else {
// Create and append the date text only if there is no image
cellText = document.createTextNode(date);
Expand Down
37 changes: 24 additions & 13 deletions index js/indexEventsList.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ const eventsData = [
stream: ""
},
{
name: "The Masters Eight: The Best in Texas Finale",
name: "The Best in Texas Finale",
date: "10/19/24",
location: "Austin, TX, USA",
description: "Welcome to the season finale for the 2024 Best in Texas Season! All Project Plus events will take place on Saturday Oct. 19th!",
Expand Down Expand Up @@ -240,17 +240,6 @@ const eventsData = [
trailer: "",
stream: ""
},
{
name: "Blacklisted 9",
date: "11/16/24 - 11/17/24",
location: "Springfield, MA, USA",
description: "Blacklisted has moved venues for the first time in five years! Join us in Springfield, Massachusetts for the biggest and best Blacklisted yet! Blacklisted 9 will be returning with Doubles and Singles pools which will send players into double elimination Pro and Amateur brackets - now for both Project+ and HDR!",
imageUrl: "https://www.bing.com/th?pid=Sgg&qlt=100&u=https%3A%2F%2Fimages.start.gg%2Fimages%2Ftournament%2F681909%2Fimage-7d4e0ff8435ebeb4a6ceb3cd129b1705-optimized.png&ehk=sQBjT2ATBqcPGXSXEzLSl2H8PYlq6I79X7ucG2mT4hU%3D&w=280&h=280&r=0",
link: "https://www.start.gg/tournament/blacklisted-9-a-project-and-hdr-major/details",
rankImg: true,
trailer: "https://twitter.com/BlacklistedSSB/status/1817403907984761246",
stream: "https://www.twitch.tv/projectmnexus"
},
{
name: "Pissmas 5",
date: "11/29/24 - 12/1/24",
Expand All @@ -273,6 +262,17 @@ const eventsData = [
trailer: "",
stream: ""
},
{
name: "Tennessee P+ Summit 2025",
date: "1/10/25 - 1/12/25",
location: "Knoxville, TN, USA",
description: "The Tennessee P+ Summit is back! 20 of the best P+ players from Tennessee will compete for fame and bragging rights in everyone's favorite smash mod.",
imageUrl: "https://www.bing.com/th?pid=Sgg&qlt=100&u=https%3A%2F%2Fimages.start.gg%2Fimages%2Ftournament%2F714654%2Fimage-9fcdb8b8b1acc8a88280304e3b010b63-optimized.jpg&ehk=8mBzXSK23mbPNHjSmTQkpgvRRF9qYsJ5PfgQ4qo4BJw%3D&w=280&h=280&r=0",
link: "https://www.start.gg/tournament/tennessee-p-summit-2025/details",
rankImg: false,
trailer: "",
stream: ""
},
{
name: "TECH 2025",
date: "1/11/25",
Expand All @@ -283,7 +283,18 @@ const eventsData = [
rankImg: false,
trailer: "",
stream: ""
}
},
{
name: "Blacklisted 9",
date: "TBA",
location: "Springfield, MA, USA",
description: "Blacklisted has moved venues for the first time in five years! Join us in Springfield, Massachusetts for the biggest and best Blacklisted yet! Blacklisted 9 will be returning with Doubles and Singles pools which will send players into double elimination Pro and Amateur brackets - now for both Project+ and HDR!",
imageUrl: "https://www.bing.com/th?pid=Sgg&qlt=100&u=https%3A%2F%2Fimages.start.gg%2Fimages%2Ftournament%2F681909%2Fimage-7d4e0ff8435ebeb4a6ceb3cd129b1705-optimized.png&ehk=sQBjT2ATBqcPGXSXEzLSl2H8PYlq6I79X7ucG2mT4hU%3D&w=280&h=280&r=0",
link: "https://www.start.gg/tournament/blacklisted-9-a-project-and-hdr-major/details",
rankImg: true,
trailer: "https://twitter.com/BlacklistedSSB/status/1817403907984761246",
stream: "https://www.twitch.tv/projectmnexus"
},
];

// Create a single div element to contain all the lists
Expand Down

0 comments on commit 48099fa

Please sign in to comment.