diff --git a/css/style.css b/css/style.css index bdf179f..646dc11 100644 --- a/css/style.css +++ b/css/style.css @@ -39,8 +39,8 @@ } :root { - --season-accent-1: #6dc2ff; - --season-accent-2: #fff; + --season-accent-1: #69a452; + --season-accent-2: rgb(0, 49, 0); --crew-pack-position: 0; --theme-color: #101014; --border-color: #1b1b20; @@ -653,7 +653,7 @@ select { left: 0; top: 0; - color: black; + color: white; font-family: headings-squash; } diff --git a/festival/view/js/song.js b/festival/view/js/song.js index deb6b5b..3c489a8 100644 --- a/festival/view/js/song.js +++ b/festival/view/js/song.js @@ -140,17 +140,14 @@ function loadViewer() { for (let page of _pages) { let _users = {} try { - let response = await fetch('https://raw.githubusercontent.com/FNLookup/festival/main/leaderboards/season4/' + viewTrack.id + '/' + instrumentStr + '_' + page + '_Users.json') - _users = await response.json() - - response = await fetch('https://raw.githubusercontent.com/FNLookup/festival/main/leaderboards/season4/' + viewTrack.id + '/' + instrumentStr + '_' + page + '.json') + response = await fetch('https://raw.githubusercontent.com/FNLookup/festival-leaderboards/main/leaderboards/season5/' + viewTrack.id + '/' + instrumentStr + '_' + page + '.json') let data = await response.json() for (let entry of data.entries) { //console.log(entry) let entryContainer = gne('div') - entryContainer.classList.add('festival-leaderboard-entry-parent') + entryContainer.classList.add('festival-leaderboard-entry-parent', 'fortnite-button-border') let entryFirstInfo = gne('div') entryFirstInfo.classList.add('flex', 'festival-leaderboard-entry') @@ -161,12 +158,7 @@ function loadViewer() { let name = gne('a') name.classList.add('festival-entry-name') - if (Object.keys(_users).includes(entry.teamId)) { - //console.log('Yes') - name.innerHTML += _users[entry.teamId].displayName - } else { - name.innerText = entry.teamId - } + name.innerText = entry.userName let score = gne('a') score.classList.add('festival-entry-score') @@ -284,7 +276,7 @@ function loadViewer() { generateItems(allEntries.slice(0, perPage)) } - fetch('https://api.github.com/repos/FNLookup/festival/commits?path=leaderboards/season4/' + viewTrack.id + '/').then(r=>r.json()).then(r=> { + fetch('https://api.github.com/repos/FNLookup/festival-leaderboards/commits?path=leaderboards/season5/' + viewTrack.id + '/').then(r=>r.json()).then(r=> { if (r.length > 0) fetchLeaderboardData(_instruments[0]) else { leaderBoardEntries.innerHTML = '

Leaderboard not available

' diff --git a/items/shop/js/item-shop.js b/items/shop/js/item-shop.js index bfff4b4..6474e17 100644 --- a/items/shop/js/item-shop.js +++ b/items/shop/js/item-shop.js @@ -65,6 +65,10 @@ function createItems() { "height": 0 }; + if (section_name === null) { + section_name = 'Unknown_Category_Section_THIS IS USED AS FALLBACK' + } + if (category === null) { category = section_name; } @@ -202,6 +206,7 @@ function createItems() { //console.log(categories_final) let shopContainer = document.getElementById('main') + let theJamTracksHaveBeenSkipped = false; let labelRight = document.getElementById('label-right') labelRight.onclick = () => { @@ -214,6 +219,7 @@ function createItems() { let classContainer = gne('div') classContainer.classList.add('filter-class-container') + // console.log(category) classContainer.innerHTML += '

' + category.name.toUpperCase() + '

' let groupContainer = gne('div') @@ -232,7 +238,13 @@ function createItems() { let sectionHeight = 425; //console.log(section.id) - if (section.id == 'JamTracks0819.97') continue; + if (section.id.includes('JamTracks')) { + if (!theJamTracksHaveBeenSkipped) { + shopContainer.innerHTML += '
Go to Jam Tracks' + theJamTracksHaveBeenSkipped = true; + } + continue; + } shopContainer.innerHTML += `
` } @@ -343,7 +355,7 @@ function makeShopCard(item) { // section_c = document.getElementsByName(section_name)[0]; // } - if (item.section.id == 'JamTracks0819.97') return; + if (item.section.id.includes('JamTracks')) return; let section_c = document.getElementById('Section_' + item.section.id) @@ -495,7 +507,7 @@ function makeShopCard(item) { if (displayAsset.renderData.OffsetImage_Y != undefined) { img_obj.classList.add('override-styles'); - console.log(displayAsset.renderData.OffsetImage_Y + '' + item.displayName); + // console.log(displayAsset.renderData.OffsetImage_Y + '' + item.displayName); img_obj.style.setProperty('--y-off', displayAsset.renderData.OffsetImage_Y + 'px'); } } diff --git a/statistics/index.html b/stats/index.html similarity index 86% rename from statistics/index.html rename to stats/index.html index f2ca5ee..5637e97 100644 --- a/statistics/index.html +++ b/stats/index.html @@ -16,15 +16,10 @@ - + -
- -
-
- diff --git a/statistics/js/playerstats.js b/stats/js/stats.js similarity index 62% rename from statistics/js/playerstats.js rename to stats/js/stats.js index 6c5f87d..441ca7b 100644 --- a/statistics/js/playerstats.js +++ b/stats/js/stats.js @@ -6,15 +6,17 @@ function searchPlayer(ID) { let requestData = getRequestData('stats&account=' + uID); fetch(requestData.url, requestData.data).then(res => res.json()).then(res => { - content.innerHTML += '

Battle Pass


Level ' + res.account.level + '
'; + thestatsfrfr = document.createElement('div') - content.innerHTML += '

Account Stats


' + thestatsfrfr.innerHTML += '

Battle Pass


Level ' + res.account.level + '
'; + + thestatsfrfr.innerHTML += '

Account Stats


' let statCategories = [ { name: 'Global Stats', stats: res.global_stats }, - (res.per_input.keyboardmouse ? { name: 'Keyboard & Mouse Stats', stats: res.per_input.keyboardmouse } : undefined), - (res.per_input.gamepad ? { name: 'Gamepad', stats: res.per_input.gamepad } : undefined), - (res.per_input.touch ? { name: 'Touch', stats: res.per_input.touch } : undefined) + { name: 'Keyboard & Mouse Stats', stats: res.per_input.keyboardmouse }, + { name: 'Gamepad', stats: res.per_input.gamepad }, + { name: 'Touch', stats: res.per_input.touch } ] for (let category of statCategories) { @@ -28,24 +30,22 @@ function searchPlayer(ID) { let globalTitle = gne('h2'); globalTitle.innerHTML = category.name; globalTitle.classList.add('header-text-bold'); - let globalBoxContent = gne('div') - globalBoxContent.classList.add('stats-content'); - globalBox.append(globalTitle, globalBoxContent) + globalBox.append(globalTitle) - content.appendChild(globalBox) + thestatsfrfr.appendChild(globalBox) for (let thing of things) { let thingsSequelThings = category.stats[thing] let thingsSequel = Object.getOwnPropertyNames(thingsSequelThings) - let box = gne('div') + let box = document.createElement('div') - let title = document.createElement('h3'); - title.innerHTML = getLabel(thing); - title.classList.add('links'); - title.classList.add('pointer'); - title.classList.add('header-text-bold') + let stattitle = document.createElement('h3'); + stattitle.innerHTML = getLabel(thing); + stattitle.classList.add('links'); + stattitle.classList.add('pointer'); + stattitle.classList.add('header-text-bold') let sa = document.createElement('i'); sa.classList.add('arrow'); @@ -55,21 +55,16 @@ function searchPlayer(ID) { tab_contents.classList.add('stats-content', 'stats-items'); tab_contents.classList.add('hidden'); - title.appendChild(sa); - - //console.log(title); - - box.append(title, tab_contents) - globalBoxContent.append(box) + stattitle.appendChild(sa); - let FUCK = function() { + globalBox.append(box) + stattitle.onclick = function() { sa.classList.toggle('sideways'); tab_contents.classList.toggle('hidden'); - console.log('a') - } - //FUCK(); + }; - title.onclick = FUCK; + box.appendChild(stattitle) + box.appendChild(tab_contents) for (let thingy of thingsSequel) { let value = thingsSequelThings[thingy]; @@ -100,18 +95,39 @@ function searchPlayer(ID) { } } - if (globalBoxContent.children.length == 0) { - globalBoxContent.innerHTML = '

There\'s nothing to see here. Maybe invite this player to join the game?

'; + if (globalBox.children.length == 0) { + globalBox.innerHTML = '

There\'s nothing to see here. Maybe invite this player to join the game?

'; } } - content.innerHTML += '

Level History


' + content.append(thestatsfrfr) + + let levelHistoryBullshit = '' let cardContainerHTML = '' for (let levelHistory of res.accountLevelHistory) { cardContainerHTML += '
Season ' + levelHistory.season + '

Season ' + levelHistory.season + '

' } - content.innerHTML += '
' + cardContainerHTML + '
' + levelHistoryBullshit += '
' + cardContainerHTML + '
' + + let lhtBS = document.createElement('h1') + lhtBS.innerText = 'Level History' + lhtBS.classList.add('header-text-bold') + lhtBS.classList.add('links'); + lhtBS.classList.add('pointer'); + let thh = document.createElement('i'); + thh.classList.add('arrow'); + thh.classList.add('sideways'); + lhtBS.append(thh); + content.append(lhtBS) + let levelHistoryContainerBS = document.createElement('div') + levelHistoryContainerBS.innerHTML = levelHistoryBullshit + levelHistoryContainerBS.classList.add('hidden') + content.append(levelHistoryContainerBS) + lhtBS.onclick = function() { + thh.classList.toggle('sideways'); + levelHistoryContainerBS.classList.toggle('hidden'); + }; }).catch(error => { let eText = document.createElement('h1'); console.error(error);