mirror of
https://dev.s-ul.net/Galexion/MaiMaiDXNet.git
synced 2024-11-24 07:20:12 +01:00
New Score Grid Layout.
This commit is contained in:
parent
54300c933e
commit
cc3dacadeb
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,5 +1,7 @@
|
|||||||
config.json
|
config.json
|
||||||
public/images
|
public/images
|
||||||
public/assets
|
public/assets
|
||||||
|
public/javascript/user copy.js
|
||||||
node_modules
|
node_modules
|
||||||
todo
|
todo
|
||||||
|
.DS_Store
|
@ -215,6 +215,7 @@ async function userPlayLogFormatter(div, loadMoreButton) {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
let diffucultyData = song.difficultys.Notes[score.level] // get difficulty information
|
let diffucultyData = song.difficultys.Notes[score.level] // get difficulty information
|
||||||
|
const tasGrid = document.createElement('div');
|
||||||
|
|
||||||
if (!song || !song.name) { // if a song can't be found, skip it and increment the error counter by 1.
|
if (!song || !song.name) { // if a song can't be found, skip it and increment the error counter by 1.
|
||||||
console.log(song)
|
console.log(song)
|
||||||
@ -224,62 +225,117 @@ async function userPlayLogFormatter(div, loadMoreButton) {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
console.log(song)
|
console.log(song)
|
||||||
scoreDiv.innerHTML = `
|
// Song Title
|
||||||
|
tasGrid.innerHTML = `
|
||||||
<div class="score-title">
|
<div class="score-title">
|
||||||
<h4>${song.name.str} || ${new Date(score.user_play_date||score.userPlayDate)}</h4>
|
<h4 class="score-title">${song.name.str}</h4>
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
/* Score Jacket Image */
|
// Song Jacket
|
||||||
const scoreJacketDiv = document.createElement('div');
|
const scoreJacketDiv = document.createElement('div');
|
||||||
let jacket = document.createElement('img');
|
let jacket = document.createElement('img');
|
||||||
jacket.addEventListener("error", function () {
|
jacket.addEventListener("error", function () {
|
||||||
this.src = "assets/icon/UI_Icon_000000.png";
|
this.src = "assets/icon/UI_Icon_000000.png";
|
||||||
});
|
});
|
||||||
scoreJacketDiv.classList.add('score-jacket');
|
|
||||||
jacket.classList.add('score-jacket');
|
jacket.classList.add('score-jacket');
|
||||||
jacket.src = "assets/jacket/UI_Jacket_" + padNumber(Number(song.InGameID), 6) + '.png';
|
jacket.src = "assets/jacket/UI_Jacket_" + padNumber(Number(song.InGameID), 6) + '.png';
|
||||||
scoreJacketDiv.append(jacket)
|
scoreJacketDiv.append(jacket)
|
||||||
scoreDiv.append(scoreJacketDiv)
|
scoreDiv.append(scoreJacketDiv)
|
||||||
|
|
||||||
/* Achivement Box */
|
/* Achivement Box */
|
||||||
|
|
||||||
const scoreAchivementDiv = document.createElement('div');
|
const scoreAchivementDiv = document.createElement('div');
|
||||||
scoreAchivementDiv.classList.add('score-achivement');
|
scoreAchivementDiv.classList.add('score-achivement');
|
||||||
scoreAchivementDiv.innerHTML = `<h5>ACHIVEMENT</h5>`;
|
let achivementPercentage = document.createElement('h4');
|
||||||
let achivementPercentage = document.createElement('h5');
|
|
||||||
let achivementNumber = padNumber(Number(score.achievement), 7)
|
let achivementNumber = padNumber(Number(score.achievement), 7)
|
||||||
achivementPercentage.textContent = `${achivementNumber / 10000}%`;
|
achivementPercentage.textContent = `${achivementNumber / 10000}%`;
|
||||||
scoreAchivementDiv.append(achivementPercentage)
|
scoreAchivementDiv.append(achivementPercentage)
|
||||||
scoreDiv.append(scoreAchivementDiv)
|
tasGrid.append(scoreAchivementDiv)
|
||||||
|
|
||||||
/* Score Grade */
|
/* Score Grade */
|
||||||
|
|
||||||
let scoreGrades = ["D", "C", "B", "BB", "BBB", "A", "AA", "AAA", "S", "S+", "SS", "SS+", "SSS", "SSS+"]
|
let scoreGrades = ["D", "C", "B", "BB", "BBB", "A", "AA", "AAA", "S", "S+", "SS", "SS+", "SSS", "SSS+"]
|
||||||
|
let SGimgarray = ["D", "C", "B", "BB", "BBB", "A", "AA", "AAA", "S", "Sp", "SS", "SSp", "SSS", "SSSp"]
|
||||||
const scoreGradeDiv = document.createElement('div');
|
const scoreGradeDiv = document.createElement('div');
|
||||||
scoreGradeDiv.classList.add('score-grade');
|
scoreGradeDiv.classList.add('score-grade');
|
||||||
let scoreGrade = document.createElement('h4');
|
let scoreGrade = document.createElement('h4');
|
||||||
scoreGrade.textContent = `${scoreGrades[score.score_rank||score.scoreRank]}`;
|
scoreGrade.textContent = `${scoreGrades[score.score_rank||score.scoreRank]}`;
|
||||||
scoreGradeDiv.append(scoreGrade);
|
let SGimg = document.createElement('img');
|
||||||
scoreDiv.append(scoreGradeDiv);
|
SGimg.addEventListener("error", function () {
|
||||||
|
this.src = "assets/icon/UI_Icon_000000.png";
|
||||||
|
});
|
||||||
|
SGimg.classList.add('sg-image');
|
||||||
|
SGimg.src = "assets/uicon/UI_TTR_Rank_" + scoreGrades[score.score_rank||score.scoreRank] + '.png';
|
||||||
|
scoreGradeDiv.append(SGimg);
|
||||||
|
//scoreGradeDiv.append(scoreGrade);
|
||||||
|
tasGrid.append(scoreGradeDiv);
|
||||||
|
|
||||||
/* DX Score, Full Combo, Full Sync, and Multi-Placement */
|
//DX Score & Fast Late Reading
|
||||||
|
const rGrid = document.createElement('div');
|
||||||
|
|
||||||
const scoreInfoDiv = document.createElement('div');
|
const DXScoreDiv = document.createElement('div');
|
||||||
scoreInfoDiv.classList.add('score-info');
|
DXScoreDiv.classList.add('DX-Score');
|
||||||
const scoreInfoGridDiv = document.createElement('div');
|
let DXScore = document.createElement('h4');
|
||||||
scoreInfoDiv.classList.add('score-info-grid');
|
DXScore.classList.add('DX-Score');
|
||||||
// please i dont want to make a fucking nested grid
|
DXScore.innerHTML = `DXs ${score.deluxscore}/${diffucultyData.maxNotes * 3}`;
|
||||||
/* DX Score */
|
let FLindi = document.createElement('h4');
|
||||||
const scoreDXScoreDiv = document.createElement('div');
|
FLindi.classList.add('DX-Score');
|
||||||
scoreDXScoreDiv.classList.add('DX-Score');
|
FLindi.innerHTML = `F/L ${score.fastCount}/${score.lateCount}`;
|
||||||
scoreDXScoreDiv.innerHTML = `<h6>DX Score: ${score.deluxscore}/${diffucultyData.maxNotes * 3}</h6>`;
|
DXScoreDiv.append(DXScore);
|
||||||
scoreInfoGridDiv.append(scoreDXScoreDiv);
|
DXScoreDiv.append(FLindi);
|
||||||
scoreInfoDiv.append(scoreInfoGridDiv);
|
rGrid.append(DXScoreDiv);
|
||||||
scoreDiv.append(scoreInfoDiv);
|
|
||||||
/* Full Combo */
|
|
||||||
/* Full Sync */
|
|
||||||
/* Player Placement */
|
|
||||||
|
|
||||||
/* Side note: Can't Do Any of this without the Image Assets / Information, So Moving on for now */
|
/* Full Combo & Full Sync Icons, in a table of 1 row 2 col */
|
||||||
|
|
||||||
|
const FCFSgrid = document.createElement('div');
|
||||||
|
FCFSgrid.setAttribute("class", "fcfs-grid");
|
||||||
|
|
||||||
|
/* Full Combo Icon */
|
||||||
|
let FCTypes = ["SC","FC","FCp","AP","APp"];
|
||||||
|
let FCimgDiv = document.createElement('div');
|
||||||
|
let FCimg = document.createElement('img');
|
||||||
|
FCimg.addEventListener("error", function () {
|
||||||
|
this.src = "assets/icon/UI_Icon_000000.png";
|
||||||
|
});
|
||||||
|
FCimgDiv.classList.add('fullCombo-image'); //seriously galexion make up your god damned mind
|
||||||
|
FCimg.classList.add('fullCombo-image');
|
||||||
|
FCimg.src = "assets/uicon/UI_CHR_PlayBonus_" + FCTypes[score.comboStatus] + '.png';
|
||||||
|
|
||||||
|
|
||||||
|
FCimgDiv.append(FCimg)
|
||||||
|
FCFSgrid.append(FCimgDiv)
|
||||||
|
|
||||||
|
/* Full Sync Icon */
|
||||||
|
let FSTypes = ["PS","FS","FSp"];
|
||||||
|
let FSimgDiv = document.createElement('div');
|
||||||
|
let FSimg = document.createElement('img');
|
||||||
|
FSimg.addEventListener("error", function () {
|
||||||
|
this.src = "assets/icon/UI_Icon_000000.png";
|
||||||
|
});
|
||||||
|
FSimgDiv.classList.add('fullSync-image'); //seriously galexion make up your god damned mind
|
||||||
|
FSimg.classList.add('fullSync-image');
|
||||||
|
FSimg.src = "assets/uicon/UI_CHR_PlayBonus_" + FSTypes[score.syncStatus] + '.png';
|
||||||
|
|
||||||
|
|
||||||
|
FSimgDiv.append(FSimg);
|
||||||
|
FCFSgrid.append(FSimgDiv);
|
||||||
|
|
||||||
|
/* Details shit */
|
||||||
|
let detailsBlock = document.createElement('details');
|
||||||
|
detailsBlock.classList.add('score-info-grid');
|
||||||
|
let summary = document.createElement('summary');
|
||||||
|
summary.textContent = "Details";
|
||||||
|
const detailsGridDiv = document.createElement('div');
|
||||||
|
detailsBlock.append(detailsGridDiv);
|
||||||
|
scoreDiv.append(detailsBlock);
|
||||||
/* setting stuff up */
|
/* setting stuff up */
|
||||||
|
|
||||||
|
|
||||||
|
rGrid.classList.add('rGrid');
|
||||||
|
tasGrid.classList.add('tasGrid');
|
||||||
|
rGrid.append(FCFSgrid)
|
||||||
|
scoreDiv.append(rGrid)
|
||||||
|
scoreDiv.append(tasGrid)
|
||||||
scoreDiv.setAttribute("class", "score-grid");
|
scoreDiv.setAttribute("class", "score-grid");
|
||||||
scoreIncrement++
|
scoreIncrement++
|
||||||
|
|
||||||
|
@ -88,9 +88,13 @@ h4.profile {
|
|||||||
font-size: 2em;
|
font-size: 2em;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 600px) {
|
||||||
h4 {
|
h4.score-grid {
|
||||||
font-size: 1.5em;
|
font-size: 4vmin;
|
||||||
|
}
|
||||||
|
|
||||||
|
h4.DX-Score {
|
||||||
|
font-size: 3vmin;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -201,111 +205,89 @@ h4.profile {
|
|||||||
padding-top: 1em;
|
padding-top: 1em;
|
||||||
padding-bottom: 1em;
|
padding-bottom: 1em;
|
||||||
}
|
}
|
||||||
/* Galexion make your fucking mind up are you going to use camelCase or dashe-instead-of-spaces */
|
|
||||||
|
/* Galexion make your fucking mind up are you going to use camelCase or dashes-instead-of-spaces */
|
||||||
|
|
||||||
.score-grid {
|
.score-grid {
|
||||||
display: grid;
|
display: grid;
|
||||||
|
|
||||||
grid-template-rows: min-content min-content min-content;
|
grid-template-rows: 0.75fr min-content min-content;
|
||||||
grid-template-columns: 82.5% min-content min-content;
|
grid-template-columns: 0.75fr min-content max-content;
|
||||||
grid-auto-rows: minmax(100px, auto);
|
grid-auto-rows: minmax(100px, auto);
|
||||||
grid-template-areas:
|
grid-template-areas:
|
||||||
'label0 label0'
|
"Jacket tasGrid rGrid"
|
||||||
'label1 label2'
|
"Details Details Details";
|
||||||
'label1 label3'
|
|
||||||
'label1 label4';
|
|
||||||
|
|
||||||
gap: 0px;
|
gap: 0px;
|
||||||
height: 100%;
|
margin-bottom: 0.2em;
|
||||||
max-width: 75%;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.rGrid {
|
||||||
|
display:grid;
|
||||||
|
grid-area: rGrid;
|
||||||
|
|
||||||
|
grid-template-rows: min-content min-content;
|
||||||
|
grid-template-areas:
|
||||||
|
'FC-FS'
|
||||||
|
'DXs-Fast-Slow';
|
||||||
|
}
|
||||||
|
|
||||||
|
.fcfs-grid {
|
||||||
|
grid-area: FC-FS;
|
||||||
|
display: grid;
|
||||||
|
|
||||||
|
grid-template-rows: min-content min-content;
|
||||||
|
grid-template-areas:
|
||||||
|
'fc'
|
||||||
|
'fs';
|
||||||
|
|
||||||
|
gap: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tasGrid {
|
||||||
|
grid-area: tasGrid;
|
||||||
|
display:grid;
|
||||||
|
|
||||||
|
grid-template-rows: min-content min-content;
|
||||||
|
grid-template-areas:
|
||||||
|
'title'
|
||||||
|
'achivement'
|
||||||
|
'score-grade';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@media (min-width: 600px) {
|
@media (min-width: 600px) {
|
||||||
.score-grid {
|
.score-grid {
|
||||||
max-width: 80%;
|
max-width: 80%;
|
||||||
width: 80%;
|
width: 80%;
|
||||||
grid-template-rows: max-content min-content min-content;
|
grid-template-rows: 1fr, auto;
|
||||||
grid-template-columns: 1fr 1fr 1fr;
|
grid-template-columns: 1fr 1fr 1fr;
|
||||||
grid-auto-rows: minmax(100px, auto);
|
grid-auto-rows: auto;
|
||||||
grid-template-areas:
|
grid-template-areas:
|
||||||
'label0 label0 label0'
|
"Jacket tasGrid rGrid"
|
||||||
'label1 label2 label3'
|
"Details Details Details";
|
||||||
'label1 label4 label4';
|
|
||||||
margin: auto;
|
margin: auto;
|
||||||
|
margin-bottom: 0.2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
h4.score-grid {
|
||||||
|
font-size: 5vw;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fcfs-grid {
|
||||||
|
grid-area: FC-FS;
|
||||||
|
display: grid;
|
||||||
|
grid-auto-columns: min-content min-content;
|
||||||
|
|
||||||
|
grid-template-areas:
|
||||||
|
'fc fs';
|
||||||
|
|
||||||
|
gap: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.score-jacket {
|
.score-jacket {
|
||||||
|
grid-area: Jacket;
|
||||||
background-color: #9EF6B5;
|
|
||||||
grid-area: label1;
|
|
||||||
display: block;
|
|
||||||
margin-left: auto;
|
|
||||||
margin-right: auto;
|
|
||||||
max-width: 100%;
|
|
||||||
width: 100%;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Please I really dont want to make a nested grid */
|
|
||||||
.score-info-grid {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: repeat(3, 1fr);
|
|
||||||
grid-template-rows: repeat(3, 1fr);
|
|
||||||
grid-gap: 10px;
|
|
||||||
grid-template-areas:
|
|
||||||
"DX-Score DX-Score DX-Score"
|
|
||||||
"full-combo full-sync multi-place"
|
|
||||||
". . details";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.score-title {
|
|
||||||
|
|
||||||
background-color: #D5BBCA;
|
|
||||||
grid-area: label0;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.score-achivement {
|
|
||||||
|
|
||||||
background-color: #ED69FD;
|
|
||||||
grid-area: label2;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.score-grade {
|
|
||||||
|
|
||||||
background-color: #9B5999;
|
|
||||||
grid-area: label3;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.score-info {
|
|
||||||
|
|
||||||
background-color: #58B669;
|
|
||||||
grid-area: label4;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Please I really dont want to make a nested grid */
|
|
||||||
.score-info-grid {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: repeat(3, min-content);
|
|
||||||
grid-template-rows: repeat(3, min-content);
|
|
||||||
grid-gap: 10px;
|
|
||||||
grid-template-areas:
|
|
||||||
"DX-Score DX-Score DX-Score"
|
|
||||||
"full-combo full-sync multi-place"
|
|
||||||
"details details details";
|
|
||||||
}
|
|
||||||
|
|
||||||
.DX-Score {
|
|
||||||
grid-area: DX-Score;
|
|
||||||
}
|
|
||||||
|
|
||||||
.score-jacket {
|
|
||||||
|
|
||||||
background-color: #9EF6B5;
|
|
||||||
grid-area: label1;
|
|
||||||
display: block;
|
display: block;
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
@ -314,6 +296,89 @@ h4.profile {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
h4.DX-Score {
|
/* Please I really dont want to make a nested grid */
|
||||||
font-size: 2em;
|
.score-info-grid {
|
||||||
|
grid-area: Details;
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(3, 0.5fr);
|
||||||
|
grid-template-rows: repeat(3, 0.5fr);
|
||||||
|
grid-gap: 10px;
|
||||||
|
grid-template-areas:
|
||||||
|
"timingTable timingTable"
|
||||||
|
"maxCombo maxSync";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.score-title {
|
||||||
|
grid-area: title;
|
||||||
|
}
|
||||||
|
|
||||||
|
.score-achivement {
|
||||||
|
|
||||||
|
grid-area: achivement;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.score-grade {
|
||||||
|
grid-area: score-grade;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.score-info {
|
||||||
|
grid-area: label4;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.DX-Score {
|
||||||
|
grid-area: DXs-Fast-Slow;
|
||||||
|
}
|
||||||
|
|
||||||
|
.score-jacket {
|
||||||
|
grid-area: Jacket;
|
||||||
|
display: block;
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
max-width: 75%;
|
||||||
|
width: 75%;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#user-play-data {
|
||||||
|
object-fit: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
img.sg-image {
|
||||||
|
width:17vw;
|
||||||
|
max-width: 125px;
|
||||||
|
}
|
||||||
|
|
||||||
|
img.fullCombo-image {
|
||||||
|
width:12vw;
|
||||||
|
max-width: 120px;
|
||||||
|
}
|
||||||
|
|
||||||
|
img.fullSync-image {
|
||||||
|
width:12vw;
|
||||||
|
max-width: 120px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fullCombo-image:nth-of-type(1) {
|
||||||
|
grid-area: fc;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fullSync-image:nth-of-type(1) {
|
||||||
|
grid-area: fs;
|
||||||
|
}
|
||||||
|
|
||||||
|
.score-info-grid {
|
||||||
|
grid-area: Details;
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(3, 0.5fr);
|
||||||
|
grid-template-rows: repeat(3, 0.5fr);
|
||||||
|
grid-gap: 10px;
|
||||||
|
grid-template-areas:
|
||||||
|
"timingTable timingTable"
|
||||||
|
"maxCombo maxSync";
|
||||||
}
|
}
|
32
views/log.ejs
Normal file
32
views/log.ejs
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
<% var rootPath='../' ; %>
|
||||||
|
<%- include(rootPath + 'templates/header.ejs' ); %>
|
||||||
|
|
||||||
|
<div id="loginContent">
|
||||||
|
<h1>Mai<b>DXNet</b> Dashboard</h1>
|
||||||
|
<h5>Total Users Registered: <%= params.totalUsers %></h5>
|
||||||
|
<h4>Please Input your 20 Digit Access Code.</h4>
|
||||||
|
<form id="myForm">
|
||||||
|
<input type="text" name="myInput" minlength="20" maxlength="20" placeholder="0000011111222223333344444" required>
|
||||||
|
<button type="submit">Submit</button>
|
||||||
|
</form>
|
||||||
|
<script type="text/javascript" src="/javascript/login.js"></script>
|
||||||
|
</div>
|
||||||
|
<div id="loginContent">
|
||||||
|
<h4>
|
||||||
|
Please Note:
|
||||||
|
</h4>
|
||||||
|
<p>
|
||||||
|
This is mainly a Demo of <a href="https://dev.s-ul.net/Galexion/MaiMaiDXNet">MaiMaiDXNet</a>, and should not be used for actual play.
|
||||||
|
<br><br>
|
||||||
|
If Testing on your own card, please visit <a href="http://vermilliondx.ml">here</a> to import your data from any other Water based Amusement Server.
|
||||||
|
<br><br>
|
||||||
|
Note that Some scores, Song Jackets, or other ammenitys are missing. this is completely normal.
|
||||||
|
<br><br>
|
||||||
|
Everything that was not supposed to be missing is now back. Please update any personal / production instances to the latest version.
|
||||||
|
</p>
|
||||||
|
For Up to date information, join our <a href="https://discord.gg/EEJKDpFTVT">Discord Server</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
Loading…
Reference in New Issue
Block a user