Skip to content

Commit

Permalink
pissmas, wol to past events + 2025 prep. and mobile text adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
pkzstar committed Dec 2, 2024
1 parent 73ebae0 commit 7fbeba5
Show file tree
Hide file tree
Showing 6 changed files with 246 additions and 24 deletions.
13 changes: 12 additions & 1 deletion generaljscss/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,18 @@ document.addEventListener('DOMContentLoaded', () => {
pastEventsList.appendChild(pastEvents2024Wrapper);
pastEvents2024Link.classList.add("past-year");


//2025
// let pastEvents2025 = document.getElementById("pastEvents")
// pastEventsList.classList.add("pastEventsList")
// pastEvents.appendChild(pastEventsList);
// let pastEvents2025Wrapper = document.createElement("p");
// pastEvents2025Wrapper.classList.add("pastYearWrapper")
// let pastEvents2025Link = document.createElement("a");
// pastEvents2025Link.href = "../past-events/2025.html";
// pastEvents2025Wrapper.appendChild(pastEvents2025Link);
// pastEvents2025Link.innerHTML = "2025";
// pastEventsList.appendChild(pastEvents2025Wrapper);
// pastEvents2025Link.classList.add("past-year");



Expand Down
1 change: 1 addition & 0 deletions generaljscss/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -677,6 +677,7 @@ margin: 2px 0 2px 0;
}
.past-article-text {
margin: 5px;
font-size: 15px;
}
}

Expand Down
23 changes: 0 additions & 23 deletions index js/indexEventsList.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,29 +117,6 @@ eventName.appendChild(location);
// Sample event data (replace this with actual event data)
const eventsData = [


{
name: "Pissmas 5",
date: "11/29/24 - 12/1/24",
location: "Southport, QLD, Australia",
description: "A Christmas Smash Major in collaboration with Queensland Ultimate, Tournameta and Piss Gang. Pissmas 5 will run over three days, feature 7 brackets and the one and only Pissbet!",
imageUrl: "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",
link: "https://www.start.gg/tournament/pissmas-5/details",
rankImg: false,
trailer: "",
stream: ""
},
{
name: "Who's On Ledge? 9",
date: "11/30/24",
location: "Des Moines, IA, USA",
description: "DMGC presents Who's on Ledge? Our monthly tournament series featuring Super Smash Bros. Melee, Ultimate, Project+, and Rivals of Aether II at RezBlue Arena!",
imageUrl: "https://www.bing.com/th?pid=Sgg&qlt=100&u=https%3A%2F%2Fimages.start.gg%2Fimages%2Ftournament%2F724863%2Fimage-1e4b69c6abcfa56933f95f14b99a699d-optimized.png&ehk=1uODmbXgfa8XVKQ1Pb%2Be4ot%2Bz2sAYA0RCua9wWZcflI%3D&w=280&h=280&r=0",
link: "https://www.start.gg/tournament/who-s-on-ledge-9/details",
rankImg: false,
trailer: "",
stream: ""
},
{
name: "Condo of Blood 2",
date: "12/14/24",
Expand Down
50 changes: 50 additions & 0 deletions past-events/2025.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<!DOCTYPE html>
<html>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<head>
<link href='https://fonts.googleapis.com/css?family=Nunito' rel='stylesheet'>
<link rel="stylesheet" href="pastevents.css">
<title>Plus Side</title>
<link rel="icon" type="image/x-icon" href="https://github.com/pkzstar/plus-side/blob/main/images/favicon.png?raw=true">
<link rel="stylesheet" href="../index js/index.css">
<link rel="stylesheet" href="../patreon/patreon.css">
<link rel="stylesheet" href="../generaljscss/navBar.css">
<link rel="stylesheet" href="../generaljscss/style.css">
<style>
</style>
</head>
<body>
<div class="wallpaper"></div>
<div class="wallpaper2"></div>
<div id="navBar"></div>
<img id="bulb" class="lightBulb">

<div id="pastEvents"></div>

<div class="upcomingImageParent">
<h1 id="pageHeader" class="textGradient">2025 PAST EVENTS</h1>
</div>
<div class="calPosition">
<a class="navCalPast" href="/Calendar/CalView.html"><button style="margin: unset;" class="calView">Calendar</button></a>
</div>

<div id="addEventForm"></div>
<div id="pastListContainer"></div>

<div class="patronsCenter">
<a class="patrons whiteText" href="../patreon\patreons.html">A huge thank you to all our patrons!</a>
</div>

<div class="wavesBoth">
<img class="wave" src="https://github.com/pkzstar/plus-side/blob/main/images/wave-41459%20(3).png?raw=true" alt="">
<img class="waveReverse" src="https://github.com/pkzstar/plus-side/blob/main/images/wave-41459%20(3).png?raw=true" alt="">
</div>

<script src="/past-events/pastEvents2025.js"></script>
<script src="../generaljscss\navBar.js"></script>
<script src="../generaljscss\script.js"></script>
<!-- <script src="../index js/addEventForm.js"></script> -->
<!-- <script src="../backendstuff/pastEventsSchema2025.js"></script> -->
</body>
</html>
26 changes: 26 additions & 0 deletions past-events/pastEvents2024.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,32 @@ function createPastEventElement(eventData) {
// Sample data for past event
const eventData = [

{
eventTitle: "Who's On Ledge? 9",
imageUrl: "https://www.bing.com/th?pid=Sgg&qlt=100&u=https%3A%2F%2Fimages.start.gg%2Fimages%2Ftournament%2F724863%2Fimage-1e4b69c6abcfa56933f95f14b99a699d-optimized.png&ehk=1uODmbXgfa8XVKQ1Pb%2Be4ot%2Bz2sAYA0RCua9wWZcflI%3D&w=280&h=280&r=0",
eventUrl: "https://www.start.gg/tournament/who-s-on-ledge-9/details",
date: "November 30 2024",
location: "Iowa",
entrants: 9,
first: "Sothe",
second: "Landon",
third: "Hannah",
vodsUrl: "",
hideRankImage: true
},
{
eventTitle: "Pissmas 5",
imageUrl: "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",
eventUrl: "https://www.start.gg/tournament/pissmas-5/details",
date: "November 29 2024",
location: "Australia",
entrants: 19,
first: "Jetfantastic",
second: "Cammy",
third: "Jane",
vodsUrl: "",
hideRankImage: true
},
{
eventTitle: "Game 5 In The D #6",
imageUrl: "https://www.bing.com/th?pid=Sgg&qlt=100&u=https%3A%2F%2Fimages.start.gg%2Fimages%2Ftournament%2F724520%2Fimage-4669a409e8ba16bc8416de03e4131603-optimized.jpg&ehk=Xw944yGxRrU5OozpQQLIyIMXO%2FrpdwImxM1DKXrGLak%3D&w=280&h=280&r=0",
Expand Down
157 changes: 157 additions & 0 deletions past-events/pastEvents2025.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
function createPastEventElement(eventData) {
// Create a container for all past events
const eventList = document.createElement('ul');
eventList.id = 'pastList';
eventList.className = 'pastList';


// Loop through each event data object and create elements for them
eventData.forEach(event => {
const eventListItem = document.createElement('li');
eventListItem.classList.add('past-events');

const eventDiv = document.createElement('div');
eventDiv.style.flex = '0';

const eventLink = document.createElement('a');
eventLink.href = event.eventUrl;
eventLink.target = '_blank';

const eventImage = document.createElement('img');
eventImage.classList.add('past-events-banners');
eventImage.src = event.imageUrl;
eventImage.alt = '';

eventLink.appendChild(eventImage);
eventDiv.appendChild(eventLink);

if (!event.hideRankImage) {
const rankImageDiv = document.createElement('div');
const rankImage = document.createElement('img');
rankImage.classList.add('pm-rank-centered');
rankImage.id = "yourContainerElementId";
rankImage.src = 'https://github.com/pkzstar/plus-side/blob/main/images/pmrank.png?raw=true';
rankImage.alt = '';
rankImageDiv.appendChild(rankImage);
eventDiv.appendChild(rankImageDiv);
} else {
const rankImageDiv = document.createElement('div');
const rankImage = document.createElement('img');
rankImage.classList.add('pm-rank-centered-invis');
rankImage.id = "yourContainerElementId";
rankImage.src = 'https://github.com/pkzstar/plus-side/blob/main/images/pmrank.png?raw=true';
rankImage.alt = '';
rankImageDiv.appendChild(rankImage);
eventDiv.appendChild(rankImageDiv);
};

const eventTitleLink = document.createElement('a');
eventTitleLink.href = event.eventUrl;
eventTitleLink.target = '_blank';
eventTitleLink.textContent = event.eventTitle;

const eventTitle = document.createElement('h1');
eventTitle.classList.add('past-events-title');
eventTitle.appendChild(eventTitleLink);
eventDiv.appendChild(eventTitle);

const dateParagraph = document.createElement('p');
dateParagraph.classList.add('past-article-text');
dateParagraph.textContent = 'Date : ' + event.date;
eventDiv.appendChild(dateParagraph);

const locationParagraph = document.createElement('p');
locationParagraph.classList.add('past-article-text');
locationParagraph.textContent = 'Location : ' + event.location;
eventDiv.appendChild(locationParagraph);

const entrantsParagraph = document.createElement('p');
entrantsParagraph.classList.add('past-article-text');
entrantsParagraph.textContent = 'Entrants : ' + event.entrants;
eventDiv.appendChild(entrantsParagraph);

const firstPlaceParagraph = document.createElement('p');
firstPlaceParagraph.classList.add('top3');
firstPlaceParagraph.textContent = '🥇: ' + event.first;
eventDiv.appendChild(firstPlaceParagraph);

const secondPlaceParagraph = document.createElement('p');
secondPlaceParagraph.classList.add('top3');
secondPlaceParagraph.textContent = '🥈: ' + event.second;
eventDiv.appendChild(secondPlaceParagraph);

const thirdPlaceParagraph = document.createElement('p');
thirdPlaceParagraph.classList.add('top3');
thirdPlaceParagraph.textContent = '🥉: ' + event.third;
eventDiv.appendChild(thirdPlaceParagraph);

if (event.vodsUrl) {
const vodsLink = document.createElement('a');
vodsLink.classList.add('vodsPast');
vodsLink.href = event.vodsUrl;
vodsLink.target = '_blank';
vodsLink.textContent = 'Vods';
eventDiv.appendChild(vodsLink);
}

const startGGLink = document.createElement('a');
startGGLink.classList.add('startgg');
startGGLink.href = event.eventUrl;
startGGLink.target = '_blank';
startGGLink.textContent = 'start.gg';
eventDiv.appendChild(startGGLink);

eventListItem.appendChild(eventDiv);
eventList.appendChild(eventListItem);
});

return eventList;
}
// Sample data for past event
const eventData = [];

// Create past event element
const pastEventElement = createPastEventElement(eventData);

// Append the past event element to a container (e.g., a div with id 'pastListContainer')
const pastListContainer = document.getElementById('pastListContainer');
pastListContainer.appendChild(pastEventElement);



// below is a wip for making the past events format to the left when added

// // Create past event element
// const pastEventElement = createPastEventElement(eventData);

// // Loop through each set of four events
// for (let i = 0; i < eventsData.length; i += 4) {
// // Create a new ul for each set of four events
// const eventList = document.createElement('ul');
// eventList.classList.add('pastList');
// eventList.id = 'pastList' + i; // Unique ID for each list

// // Create and append the li elements for each event in the set
// for (let j = i; j < i + 4 && j < eventsData.length; j++) {
// const eventData = eventsData[j];
// const eventComponent = createEventComponent(eventData);
// // Append the event component directly to the ul
// eventList.appendChild(eventComponent);
// }

// // Check if there's only one li element in the ul and it's not on a screen less than 600px wide
// const lis = eventList.querySelectorAll('li');
// const screenWidthLessThan600 = window.matchMedia("(max-width: 600px)").matches;
// if (lis.length === 1 && !screenWidthLessThan600) {
// // Apply max-width: 100% to the single li element
// lis[0].style.marginLeft = '25%';
// }

// // Append the ul (with li inside) to the past event element
// pastEventElement.appendChild(eventList);
// }

// // Append the past event element to the container with id 'pastListContainer'
// const pastListContainer = document.getElementById('pastListContainer');
// pastListContainer.appendChild(pastEventElement);

0 comments on commit 7fbeba5

Please sign in to comment.