mirror of
https://github.com/zeldaret/website.git
synced 2026-09-29 23:14:32 -04:00
bug fix
This commit is contained in:
@@ -22,7 +22,8 @@
|
||||
--zelda-border-light: #4f77cd;
|
||||
--zelda-border-dark: #1c2a49;
|
||||
--zelda-bg: #2f487c;
|
||||
--zelda-button-width: calc(145px*var(--scaling-factor));
|
||||
--zelda-file-button-width: calc(145px*var(--scaling-factor));
|
||||
--zelda-button-width: calc(174px*var(--scaling-factor));
|
||||
--zelda-button-font-size: calc(22px*var(--scaling-factor));
|
||||
--zelda-content-font-size: calc(18px*var(--scaling-factor));
|
||||
}
|
||||
@@ -73,6 +74,7 @@ a:hover
|
||||
font-size: var(--zelda-button-font-size);
|
||||
padding-top: calc(10px*var(--scaling-factor));
|
||||
width: var(--zelda-button-width);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
|
||||
@@ -84,7 +86,7 @@ a:hover
|
||||
|
||||
.zelda-file-box-slot {
|
||||
color: black;
|
||||
width: var(--zelda-button-width);
|
||||
width: var(--zelda-file-button-width);
|
||||
float: left;
|
||||
text-align: center;
|
||||
text-shadow: 0px 0px calc(4px*var(--scaling-factor));;
|
||||
@@ -99,12 +101,12 @@ a:hover
|
||||
border-bottom-style: none;
|
||||
border-bottom-left-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
margin-left: var(--zelda-button-width);
|
||||
margin-left: var(--zelda-file-button-width);
|
||||
}
|
||||
|
||||
.zelda-file-box-hack_left {
|
||||
padding: 0;
|
||||
width: var(--zelda-button-width);
|
||||
width: var(--zelda-file-button-width);
|
||||
height: 0px;
|
||||
border-right-style: none;
|
||||
border-bottom-style: none;
|
||||
@@ -120,7 +122,7 @@ a:hover
|
||||
border-top-style: none;
|
||||
border-bottom-style: none;
|
||||
border-radius: 0;
|
||||
margin-left: var(--zelda-button-width);
|
||||
margin-left: var(--zelda-file-button-width);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -73,7 +73,7 @@
|
||||
<!--
|
||||
<div class="zelda-box zelda-button" id="toggle_audio_mute" onclick="toggleMute()">Audio: <span style="color:red">Off</span></div>
|
||||
-->
|
||||
<div class="zelda-box zelda-button" id="toggle_matching" onclick="toggleMatching()">Match: <span style="color:red">No</span></div>
|
||||
<div class="zelda-box zelda-button" id="toggle_matching" onclick="toggleMatching()">Matching: <span style="color:red">No</span></div>
|
||||
<br>
|
||||
<div class="zelda-box zelda-button"><a href="index.html">Main Page</a></div>
|
||||
</div>
|
||||
|
||||
+7
-9
@@ -2,13 +2,12 @@ var matching = false;
|
||||
var url = "reports/progress.csv";
|
||||
var urlMatching = "reports/progress_matching.csv";
|
||||
var currentVersion = 1;
|
||||
var decimalPlaces = 4;
|
||||
|
||||
function toggleMatching()
|
||||
{
|
||||
matching = !matching;
|
||||
var html = '<span style="color:' + (matching? "green" : "red") + '">' + (matching? "Yes" : "No") + "</span>";
|
||||
document.getElementById("toggle_matching").innerHTML = "Match: " + html;
|
||||
document.getElementById("toggle_matching").innerHTML = "Matching: " + html;
|
||||
updateProgress();
|
||||
}
|
||||
|
||||
@@ -48,12 +47,15 @@ function parseCsv(csv)
|
||||
nonMatchingCount: 0,
|
||||
};
|
||||
|
||||
var lines = csv.split("\r\n");
|
||||
var lines = csv.split("\n");
|
||||
var objs = [[]]
|
||||
for (var i = 0; i < lines.length; i++)
|
||||
{
|
||||
var values = lines[i].split(",");
|
||||
|
||||
if (values.length != 12)
|
||||
continue;
|
||||
|
||||
if (values[0] != currentVersion)
|
||||
{
|
||||
alert("Invalid CSV");
|
||||
@@ -78,7 +80,8 @@ function getPercent(progress, total)
|
||||
function updateProgress()
|
||||
{
|
||||
getResponse(matching? urlMatching : url, function(text) {
|
||||
var progress = parseCsv(text)[0];
|
||||
var arr = parseCsv(text);
|
||||
progress = arr[arr.length-1];
|
||||
|
||||
var date = new Date(progress.timestamp *1000);
|
||||
setText("last_change", date.toLocaleDateString() + " " + date.toLocaleTimeString());
|
||||
@@ -87,11 +90,6 @@ function updateProgress()
|
||||
setText("boot_percent", getPercent(progress.boot, progress.bootSize));
|
||||
setText("code_percent", getPercent(progress.code, progress.codeSize));
|
||||
setText("overlay_percent", getPercent(progress.ovl, progress.ovlSize));
|
||||
|
||||
var keys = Object.keys(progress.reports[timestamp]);
|
||||
keys.forEach(e => {
|
||||
setText(e, progress.reports[timestamp][e] + "%");
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user