mirror of
https://wiilab.wiimart.org/wiimart/WiiMart-github-io
synced 2025-09-21 18:07:03 +02:00
On-site Title Sheet
This commit is contained in:
parent
30370812e9
commit
fe4da68a5d
58
credits.html
58
credits.html
@ -15,16 +15,16 @@
|
||||
<meta name="keywords" content="WiiMart, Wii Shop, homebrew">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="stylesheet" href="meta/main.css">
|
||||
<script src="meta/gallery.js" defer></script>
|
||||
<link rel="icon" type="image/x-icon" href="favicon.ico">
|
||||
<style>
|
||||
figure {display:flex;align-items:flex-start}
|
||||
figure img.pfp {margin-left: -30px;width:150px;height:100%;object-fit: cover;border-radius:5px;}
|
||||
figure img.pfp {margin-left:-30px;width:150px;height:100%;object-fit: cover;border-radius:5px;}
|
||||
figcaption {padding-left:10px;text-align:left}
|
||||
hr {border-style:dashed}
|
||||
div#Contribute button {min-width:300px;}
|
||||
div#Contribute button img {float:left;}
|
||||
</style>
|
||||
<script src="meta/gallery.js" defer></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="backgroundd" style="display:none;"></div><div id="wscspinnerbg" style="display:none;"><img id="wscspinner" onload="loadrimg();" src="/meta/grey-loader.png" alt="spin"><img id="wscspinnershadow" src="/meta/grey-loader.png" alt="s"></div><div class="box" id="bgmplayer" onclick="activatebgmplayer();" style="display:none;" title="BGM player"> <div id="bgmplayerBG"></div> <div id="mainplayer"><p id="bgmplrtitle">bgm plr..</p><a href="javascript:playBGM();" onclick="spinnerallowed=false;" id="shopbgmselector" title="Enable audio autoplay in your browser for it to continue playing throughout the website."><button id="shopbgm">Ply?</button></a><a href="javascript:deactivatebgmplayer();" onclick="spinnerallowed=false;"><button>Close</button></a></div> </div>
|
||||
@ -136,21 +136,9 @@
|
||||
|
||||
<hr>
|
||||
|
||||
<figure>
|
||||
<img loading="lazy" src="media/pfp-andry.png" class="pfp">
|
||||
<figcaption>
|
||||
<b>Andry6702</b> is a Discord moderator, he contributed on other projects such as New Shop Channel and Reviive.
|
||||
<br><br>
|
||||
<a target="_blank" href="https://www.youtube.com/@andry6702"><button><img loading="lazy" src="meta/ico-yt.png" class="ico"></button></a>
|
||||
<a target="_blank" href="https://andry6702.net"><button><img loading="lazy" src="meta/ico-web.png" class="ico"></button></a>
|
||||
</figcaption>
|
||||
</figure>
|
||||
|
||||
<hr>
|
||||
|
||||
<figure id="RM05">
|
||||
<img src="media/pfp-rm05.png" class="pfp">
|
||||
<figcaption><b>RM05</b> is a Discord administrator and WiiMart translation contributor.
|
||||
<figcaption><b>RM05</b> is a Discord moderator and WiiMart translation contributor.
|
||||
<br><br>
|
||||
<a target="_blank" href="https://wiilab.wiimart.org/MrRM05"><button><img src="meta/ico-git.png" class="ico" alt="GitLab"></button></a>
|
||||
<a target="_blank" href="https://www.youtube.com/@Mr_RM05"><button><img src="meta/ico-yt.png" class="ico"></button></a>
|
||||
@ -159,30 +147,6 @@
|
||||
|
||||
<hr>
|
||||
|
||||
<figure>
|
||||
<img src="media/pfp-emol.png" class="pfp">
|
||||
<figcaption><b>Emolgun</b> is one of the Discord moderators.
|
||||
<br><br>
|
||||
<a target="_blank" href="https://bsky.app/profile/emolgun.bsky.social"><button><img src="meta/ico-bsky.png" class="ico" alt="GitLab"></button></a>
|
||||
<a target="_blank" href="https://twitch.tv/emolgun"><button><img src="meta/ico-twitch.png" class="ico">
|
||||
<a target="_blank" href="https://www.youtube.com/@Emolgun"><button><img src="meta/ico-yt.png" class="ico"></button></a>
|
||||
</figcaption>
|
||||
</figure>
|
||||
|
||||
<hr>
|
||||
|
||||
<figure>
|
||||
<img loading="lazy" src="media/pfp-def.png" class="pfp">
|
||||
<figcaption><b>DefeatOf13</b> is a Discord moderator and WiiMart mascot designer.
|
||||
<br><br>
|
||||
<a target="_blank" href="https://wiilab.wiimart.org/DefeatOf13"><button><img loading="lazy" src="meta/ico-git.png" class="ico" alt="GitLab"></button></a>
|
||||
<a target="_blank" href="https://www.youtube.com/@defeatof13"><button><img loading="lazy" src="meta/ico-yt.png" class="ico"></button></a>
|
||||
<a target="_blank" href="https://defitmods.xyz"><button><img loading="lazy" src="meta/ico-web.png" class="ico"></button></a>
|
||||
</figcaption>
|
||||
</figure>
|
||||
|
||||
<hr>
|
||||
|
||||
<figure id="Subnetic">
|
||||
<img loading="lazy" src="media/pfp-subnetic.png" class="pfp" style="cursor:help">
|
||||
<figcaption>
|
||||
@ -199,7 +163,7 @@
|
||||
<figure id="Yoshi">
|
||||
<img loading="lazy" src="media/pfp-yoshi.png" class="pfp" style="cursor:help">
|
||||
<figcaption>
|
||||
<b><i>ThatOneYoshi</i></b> is one of the Discord moderators.
|
||||
<b><i>ThatOneYoshi</i></b> is one of the Discord moderators and have contributed with Flash injects.
|
||||
<br><br>
|
||||
<a target="_blank" href="https://thatoneyoshi.link/"><button><img loading="lazy" src="meta/ico-web.png" class="ico"></button></a>
|
||||
<a target="_blank" href="https://bsky.app/profile/thatoneyoshi.link"><button><img loading="lazy" src="meta/ico-bsky.png" class="ico"></button></a>
|
||||
@ -223,8 +187,20 @@
|
||||
</div>
|
||||
|
||||
<div class="box" style="border-color:#9900FF;">
|
||||
<h2 style="text-shadow: 0 2px 4px #9900FF;color:#9900FF;">Contributors</h2>
|
||||
<h2 style="text-shadow:0 2px 4px #9900FF;color:#9900FF;">Contributors</h2>
|
||||
|
||||
<figure>
|
||||
<img loading="lazy" src="media/pfp-def.png" class="pfp">
|
||||
<figcaption><b>DefeatOf13</b> created the mascot Miis for WiiMart and the upcoming DSiMart.
|
||||
<br><br>
|
||||
<a target="_blank" href="https://wiilab.wiimart.org/DefeatOf13"><button><img loading="lazy" src="meta/ico-git.png" class="ico" alt="GitLab"></button></a>
|
||||
<a target="_blank" href="https://www.youtube.com/@defeatof13"><button><img loading="lazy" src="meta/ico-yt.png" class="ico"></button></a>
|
||||
<a target="_blank" href="https://defitmods.xyz"><button><img loading="lazy" src="meta/ico-web.png" class="ico"></button></a>
|
||||
</figcaption>
|
||||
</figure>
|
||||
|
||||
<hr>
|
||||
|
||||
<figure>
|
||||
<img loading="lazy" src="media/pfp-rou.png" class="pfp" style="cursor:help">
|
||||
<figcaption><b><i>Roulettz</i></b> created the first 2006 banner WiiMart WAD.</figcaption>
|
||||
|
234860
meta/games.json
Normal file
234860
meta/games.json
Normal file
File diff suppressed because it is too large
Load Diff
185
meta/titles-table.js
Normal file
185
meta/titles-table.js
Normal file
@ -0,0 +1,185 @@
|
||||
document.addEventListener('DOMContentLoaded', async () => {
|
||||
// Check for old browsers (e.g., Nintendo/PlayStation)
|
||||
const userAgent = navigator.userAgent.toLowerCase();
|
||||
const isOldBrowser = userAgent.includes('nintendo') || userAgent.includes('playstation');
|
||||
|
||||
if (isOldBrowser) {
|
||||
const btnsDiv = document.querySelector('.table-notice');
|
||||
if (btnsDiv) {
|
||||
btnsDiv.innerHTML = `<p style="color:#ed3434;font-weight:bold;">Your browser is unsupported, please load this page on a modern device.</p>`;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
const tableNotice = document.querySelector('.table-notice');
|
||||
const tableContainer = document.querySelector('.table-container');
|
||||
const table = document.getElementById('titles');
|
||||
const btnsDiv = document.getElementById('btns');
|
||||
const regionSpan = document.getElementById('region');
|
||||
const returnButton = document.querySelector('.table-container button');
|
||||
let allGamesData = [];
|
||||
|
||||
const controllerMap = {
|
||||
"B_08_RvlCtrl.gif": "Wii Remote",
|
||||
"B_08_NunchukCtrl.gif": "Nunchuk",
|
||||
"B_08_ClassicCtrl.gif": "Classic Controller",
|
||||
"B_08_WheelCtrl.gif": "Wii Wheel",
|
||||
"B_08_GcCtrl.gif": "Nintendo GameCube Controller",
|
||||
"B_08_ZapperCtrl.gif": "Wii Zapper",
|
||||
"B_08_SpeakCtrl.gif": "Wii Speak",
|
||||
"B_08_KeyboardCtrl.gif": "USB Keyboard",
|
||||
"Balance Board": "Wii Balance Board"
|
||||
};
|
||||
|
||||
function getControllerStringFromHTML(htmlString) {
|
||||
if (!htmlString || htmlString.trim() === '') {
|
||||
return { text: "Missing", style: "color:red;font-weight:bold;" };
|
||||
}
|
||||
|
||||
const tempDiv = document.createElement('div');
|
||||
tempDiv.innerHTML = htmlString;
|
||||
const imgElements = tempDiv.querySelectorAll('img');
|
||||
const filenames = Array.from(imgElements).map(img => {
|
||||
const src = img.getAttribute('src');
|
||||
const filename = src.split('/').pop();
|
||||
return filename;
|
||||
});
|
||||
|
||||
const names = filenames.map(img => controllerMap[img] || img).filter(name => name !== undefined && name !== '');
|
||||
|
||||
if (names.length === 0) {
|
||||
if (htmlString.includes('Balance Board')) {
|
||||
return { text: "Wii Balance Board" };
|
||||
}
|
||||
return { text: "Missing", style: "color:red;font-weight:bold;" };
|
||||
} else if (names.length === 1) {
|
||||
return { text: names[0] };
|
||||
} else if (names.length === 2) {
|
||||
return { text: `${names[0]} and ${names[1]}` };
|
||||
} else {
|
||||
const last = names.pop();
|
||||
return { text: `${names.join(', ')}, and ${last}` };
|
||||
}
|
||||
}
|
||||
|
||||
function formatTitle(title) {
|
||||
if (!title) return '';
|
||||
const tempDiv = document.createElement('div');
|
||||
tempDiv.innerHTML = title.replace(/'/g, "'");
|
||||
return tempDiv.innerHTML;
|
||||
}
|
||||
|
||||
async function fetchGamesData() {
|
||||
try {
|
||||
const response = await fetch('/meta/games.json');
|
||||
if (!response.ok) {
|
||||
throw new Error(`HTTP error! status: ${response.status}`);
|
||||
}
|
||||
const data = await response.json();
|
||||
allGamesData = data.map(game => {
|
||||
const combinedTitle = game.title2 && game.title2 !== '' ? `${game.title1} ${game.title2}` : game.title1;
|
||||
return {
|
||||
...game,
|
||||
title: combinedTitle
|
||||
};
|
||||
});
|
||||
console.log('JSON data successfully loaded and pre-processed!');
|
||||
} catch (error) {
|
||||
console.error('Error fetching or parsing the JSON file:', error);
|
||||
tableNotice.innerHTML = `<p style="color:#ed3434;">Error loading data. Please check the console for details.</p>`;
|
||||
}
|
||||
}
|
||||
|
||||
function renderTable(games) {
|
||||
games.sort((a, b) => {
|
||||
const titleA = a.title.toUpperCase();
|
||||
const titleB = b.title.toUpperCase();
|
||||
if (titleA < titleB) {
|
||||
return -1;
|
||||
}
|
||||
if (titleA > titleB) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
});
|
||||
|
||||
const allKeys = new Set();
|
||||
games.forEach(game => {
|
||||
Object.keys(game).forEach(key => allKeys.add(key));
|
||||
});
|
||||
|
||||
allKeys.delete('title1');
|
||||
allKeys.delete('title2');
|
||||
allKeys.add('title');
|
||||
|
||||
const sortedKeys = ['id', 'console', 'title', 'publisher', 'points', 'genre', 'players', 'controllers', 'language', 'thumbnail', 'size', 'rating', 'ratingdetails'];
|
||||
|
||||
table.innerHTML = '';
|
||||
|
||||
const headerRow = document.createElement('tr');
|
||||
sortedKeys.forEach(key => {
|
||||
const th = document.createElement('th');
|
||||
th.textContent = key.toUpperCase();
|
||||
headerRow.appendChild(th);
|
||||
});
|
||||
table.appendChild(headerRow);
|
||||
|
||||
games.forEach(game => {
|
||||
const row = document.createElement('tr');
|
||||
sortedKeys.forEach(key => {
|
||||
const cell = document.createElement('td');
|
||||
const cellValue = game[key];
|
||||
|
||||
if (key === 'thumbnail') {
|
||||
if (game.id && game.thumbnail) {
|
||||
const link = document.createElement('a');
|
||||
link.href = `https://oss-auth.thecheese.io/oss/ccs/${game.id}/${game.thumbnail}`;
|
||||
link.textContent = 'View';
|
||||
link.target = '_blank';
|
||||
cell.appendChild(link);
|
||||
} else {
|
||||
cell.textContent = '';
|
||||
}
|
||||
} else if (key === 'controllers') {
|
||||
const controllerData = getControllerStringFromHTML(cellValue);
|
||||
cell.textContent = controllerData.text;
|
||||
if (controllerData.style) {
|
||||
cell.setAttribute('style', controllerData.style);
|
||||
}
|
||||
} else if (key === 'title') {
|
||||
cell.innerHTML = formatTitle(cellValue);
|
||||
} else {
|
||||
cell.textContent = cellValue !== undefined ? cellValue : '';
|
||||
}
|
||||
row.appendChild(cell);
|
||||
});
|
||||
table.appendChild(row);
|
||||
});
|
||||
}
|
||||
|
||||
btnsDiv.addEventListener('click', (event) => {
|
||||
if (event.target.tagName === 'BUTTON') {
|
||||
const selectedRegion = event.target.textContent;
|
||||
|
||||
regionSpan.textContent = selectedRegion;
|
||||
|
||||
const filteredGames = allGamesData.filter(game => game.region === selectedRegion);
|
||||
|
||||
renderTable(filteredGames);
|
||||
|
||||
tableNotice.style.display = 'none';
|
||||
tableContainer.style.display = 'block';
|
||||
}
|
||||
});
|
||||
|
||||
returnButton.addEventListener('click', () => {
|
||||
tableContainer.style.display = 'none';
|
||||
tableNotice.style.display = 'block';
|
||||
table.innerHTML = '';
|
||||
regionSpan.textContent = '';
|
||||
});
|
||||
|
||||
await fetchGamesData();
|
||||
});
|
||||
|
||||
// fun fact, the gem in Gemdation stands for Gemini
|
@ -25,9 +25,7 @@
|
||||
<h1><a href="/">WiiMart</a></h1>
|
||||
|
||||
<nav><a href="install" class="btn">Install</a> <a href="support" class="btn">Support</a> <a href="errors" class="btn">Errors</a> <a href="branding" class="btn">Branding</a> <span class="active">Specials</span> <a href="credits" class="btn">Credits</a></nav>
|
||||
<style>
|
||||
|
||||
</style>
|
||||
<div class="row">
|
||||
<div class="box" id="3DS">
|
||||
<h2>3DS Theme</h2>
|
||||
|
@ -1,14 +1,60 @@
|
||||
<!DOCTYPE html><html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-compatible" content="IE=edge">
|
||||
<meta property="og:title" content="WiiMart Title Spreadsheet">
|
||||
<meta property="og:description" content="View all the titles WiiMart is hosting.">
|
||||
<meta property="og:url" content="https://docs.google.com/spreadsheets/d/1rG8Qtwe8_qXcdXv8dTvU_2ibIsRtgLUS7NW70DMTF2Q/edit">
|
||||
<meta property="og:image" content="https://wiimart.org/media/branding-bag.png">
|
||||
<title>Redirecting...</title>
|
||||
<meta http-equiv="refresh" content="0; URL=https://docs.google.com/spreadsheets/d/1rG8Qtwe8_qXcdXv8dTvU_2ibIsRtgLUS7NW70DMTF2Q/edit">
|
||||
<meta charset="utf-8">
|
||||
<title>Title Sheet</title>
|
||||
<script src="meta/music.js"></script>
|
||||
<script src="meta/loader.js"></script>
|
||||
<script src="meta/titles-table.js"></script>
|
||||
<meta http-equiv="X-UA-compatible" content="IE=edge">
|
||||
<meta property="og:title" content="WiiMart Title Sheet">
|
||||
<meta property="og:description" content="View all the titles WiiMart is hosting.">
|
||||
<meta property="og:url" content="https://wiimart.org/title-sheet">
|
||||
<meta property="og:image" content="https://wiimart.org/media/branding-bag.png">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="stylesheet" href="meta/main.css">
|
||||
<link rel="icon" type="image/x-icon" href="favicon.ico">
|
||||
<style>
|
||||
.table-container {overflow-x: auto; max-width: 100%; display:none;}
|
||||
#titles {width: 100%; border-collapse: collapse;}
|
||||
#titles th, #titles td {border: 1px solid #ddd; padding: 2px; text-align: left; white-space: nowrap;}
|
||||
#titles th {background-color: #34BEED; color: white;}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="backgroundd" style="display:none;"></div><div id="wscspinnerbg" style="display:none;"><img id="wscspinner" onload="loadrimg();" src="/meta/grey-loader.png" alt="spin"><img id="wscspinnershadow" src="/meta/grey-loader.png" alt="s"></div><div class="box" id="bgmplayer" onclick="activatebgmplayer();" style="display:none;" title="BGM player"> <div id="bgmplayerBG"></div> <div id="mainplayer"><p id="bgmplrtitle">bgm plr..</p><a href="javascript:playBGM();" onclick="spinnerallowed=false;" id="shopbgmselector" title="Enable audio autoplay in your browser for it to continue playing throughout the website."><button id="shopbgm">Ply?</button></a><a href="javascript:deactivatebgmplayer();" onclick="spinnerallowed=false;"><button>Close</button></a></div> </div>
|
||||
|
||||
<h1><a href="/">WiiMart</a></h1>
|
||||
|
||||
<nav><a href="/" class="btn">Back to WiiMart.org</a></nav>
|
||||
|
||||
<div class="box" style="padding:0;">
|
||||
<div class="table-notice">
|
||||
<header style="background-color:#34BEED;color:white;font-weight:bold;width:100%;">Title Sheet</header>
|
||||
<h2>Ready to view?</h2>
|
||||
<p>This spreadsheet is large and may not work on certain hardware.</p>
|
||||
<p>To begin viewing, press a region code.</p>
|
||||
|
||||
<div id="btns">
|
||||
<button>US</button>
|
||||
<button>CA</button>
|
||||
<button>MX</button>
|
||||
<button>ES</button>
|
||||
<button>GB</button>
|
||||
<button>DE</button>
|
||||
<button>IT</button>
|
||||
<button>FR</button>
|
||||
<button>JP</button>
|
||||
<button>NL</button>
|
||||
</div>
|
||||
<p style="color:grey">This file is taken from <a href="https://oss-auth.thecheese.io/oss/oss/common/js/games.json" style="color:grey">games.json</a></p>
|
||||
</div>
|
||||
|
||||
<div class="table-container">
|
||||
<h2><button style="float:left;margin-left:20px;">Return</button> <b>Region</b>: <span id="region" style="color:white"></span> </h2>
|
||||
<table id="titles">
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
Loading…
x
Reference in New Issue
Block a user