build: Generate versioning information for the website
This commit is contained in:
@@ -19,10 +19,14 @@
|
||||
}
|
||||
|
||||
#header {
|
||||
font-weight: bold;
|
||||
color: white;
|
||||
height: 30px;
|
||||
text-align: center;
|
||||
padding-left: 5px;
|
||||
padding-right: 5px;
|
||||
padding-top: 5px;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
.emscripten { padding-right: 0; margin-left: auto; margin-right: auto; display: block; }
|
||||
@@ -37,47 +41,12 @@
|
||||
width: 75vw;
|
||||
}
|
||||
|
||||
.spinner {
|
||||
height: 15px;
|
||||
width: 15px;
|
||||
margin: 0;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
-webkit-animation: rotation .8s linear infinite;
|
||||
-moz-animation: rotation .8s linear infinite;
|
||||
-o-animation: rotation .8s linear infinite;
|
||||
animation: rotation 0.8s linear infinite;
|
||||
border-left: 5px solid black;
|
||||
border-right: 5px solid black;
|
||||
border-bottom: 5px solid black;
|
||||
border-top: 5px solid red;
|
||||
border-radius: 100%;
|
||||
background-color: rgb(245, 245, 245);
|
||||
}
|
||||
@-webkit-keyframes rotation {
|
||||
from {-webkit-transform: rotate(0deg);}
|
||||
to {-webkit-transform: rotate(360deg);}
|
||||
}
|
||||
@-moz-keyframes rotation {
|
||||
from {-moz-transform: rotate(0deg);}
|
||||
to {-moz-transform: rotate(360deg);}
|
||||
}
|
||||
@-o-keyframes rotation {
|
||||
from {-o-transform: rotate(0deg);}
|
||||
to {-o-transform: rotate(360deg);}
|
||||
}
|
||||
@keyframes rotation {
|
||||
from {transform: rotate(0deg);}
|
||||
to {transform: rotate(360deg);}
|
||||
}
|
||||
|
||||
#status {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
margin-top: 5px;
|
||||
margin-left: 5px;
|
||||
font-weight: bold;
|
||||
color: white;
|
||||
font-weight: normal;
|
||||
font-size: 0.8em;
|
||||
color: darkgray;
|
||||
}
|
||||
|
||||
#progress {
|
||||
@@ -119,13 +88,8 @@
|
||||
</head>
|
||||
<body>
|
||||
<div id="header">
|
||||
<div class="spinner" id='spinner'></div>
|
||||
<h1 style="font-size: 1em; text-align: center; margin-top: 0; margin-bottom: 0; padding-bottom: 3px">Terry Cherry</h1>
|
||||
<div class="emscripten" id="status">Downloading...</div>
|
||||
<span id='controls'>
|
||||
<span><input type="button" value="🖵 FULLSCREEN" onclick="Module.requestFullscreen(false, false)"></span>
|
||||
<span><input type="button" id="btn-audio" value="🔇 SUSPEND" onclick="toggleAudio()"></span>
|
||||
</span>
|
||||
|
||||
<div class="emscripten">
|
||||
<progress value="0" max="100" id="progress" hidden=0></progress>
|
||||
</div>
|
||||
@@ -135,11 +99,17 @@
|
||||
<canvas class="emscripten" id="canvas" oncontextmenu="event.preventDefault()" tabindex=-1></canvas>
|
||||
</div>
|
||||
|
||||
<div style="display: flex; justify-content: space-around;">
|
||||
<span id='controls'>
|
||||
<span><input type="button" value="🖵 FULLSCREEN" onclick="Module.requestFullscreen(false, false)"></span>
|
||||
<span><input type="button" id="btn-audio" value="🔇 SUSPEND" onclick="toggleAudio()"></span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<textarea id="output" rows="8"></textarea>
|
||||
<script type='text/javascript'>
|
||||
var statusElement = document.querySelector('#status');
|
||||
var progressElement = document.querySelector('#progress');
|
||||
var spinnerElement = document.querySelector('#spinner');
|
||||
var Module = {
|
||||
preRun: [],
|
||||
postRun: [],
|
||||
@@ -195,15 +165,17 @@
|
||||
progressElement.value = parseInt(m[2])*100;
|
||||
progressElement.max = parseInt(m[4])*100;
|
||||
progressElement.hidden = true;
|
||||
spinnerElement.hidden = false;
|
||||
} else {
|
||||
progressElement.value = null;
|
||||
progressElement.max = null;
|
||||
progressElement.hidden = true;
|
||||
if (!text) spinnerElement.style.display = 'none';
|
||||
}
|
||||
|
||||
statusElement.innerHTML = text;
|
||||
if (text) {
|
||||
statusElement.innerHTML = '@version@: ' + text;
|
||||
} else {
|
||||
statusElement.innerHTML = '@version@';
|
||||
}
|
||||
},
|
||||
totalDependencies: 0,
|
||||
monitorRunDependencies: function(left) {
|
||||
@@ -217,7 +189,6 @@
|
||||
|
||||
window.onerror = function() {
|
||||
Module.setStatus('Exception thrown, see JavaScript console');
|
||||
spinnerElement.style.display = 'none';
|
||||
Module.setStatus = function(text) { if (text) Module.printErr('[post-exception status] ' + text); };
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user