add nav buttons to loading and clean up intervals

This commit is contained in:
xenofem 2020-05-29 12:58:55 -04:00
parent f97243199d
commit 89736633b5
2 changed files with 81 additions and 57 deletions

View file

@ -4,54 +4,57 @@
<link rel="stylesheet" href="loading.css">
</head>
<body>
<div id="config">
<div>
User configuration: You are a...
<div id="main-container">
<div id="config">
<div>
User configuration: You are a...
</div>
<table>
<tr>
<td><input type="checkbox" id="toy" name="toy" value="Good toy..."><label for="toy">Toy</label></td>
<td><input type="checkbox" id="doll" name="doll" value="Good doll..."><label for="doll">Doll</label></td>
</tr>
<tr>
<td><input type="checkbox" id="plaything" name="plaything" value="Cute horny plaything..."><label for="plaything">Plaything</label></td>
<td><input type="checkbox" id="slut" name="slut" value="Cute horny slut..."><label for="slut">Slut</label></td>
</tr>
<tr>
<td><input type="checkbox" id="girl" name="girl" value="Good girl..."><label for="girl">Girl</label></td>
<td><input type="checkbox" id="boy" name="boy" value="Good boy..."><label for="boy">Boy</label></td>
</tr>
<tr>
<td><input type="checkbox" id="kitty" name="kitty" value="Good kitty..."><label for="kitty">Kitty</label></td>
<td><input type="checkbox" id="puppy" name="puppy" value="Good puppy..."><label for="puppy">Puppy</label></td>
</tr>
</table>
<div class="button-container">
<span id="start" class="button">Install</span>
</div>
</div>
<table>
<tr>
<td><input type="checkbox" id="toy" name="toy" value="Good toy..."><label for="toy">Toy</label></td>
<td><input type="checkbox" id="doll" name="doll" value="Good doll..."><label for="doll">Doll</label></td>
</tr>
<tr>
<td><input type="checkbox" id="plaything" name="plaything" value="Cute horny plaything..."><label for="plaything">Plaything</label></td>
<td><input type="checkbox" id="slut" name="slut" value="Cute horny slut..."><label for="slut">Slut</label></td>
</tr>
<tr>
<td><input type="checkbox" id="girl" name="girl" value="Good girl..."><label for="girl">Girl</label></td>
<td><input type="checkbox" id="boy" name="boy" value="Good boy..."><label for="boy">Boy</label></td>
</tr>
<tr>
<td><input type="checkbox" id="kitty" name="kitty" value="Good kitty..."><label for="kitty">Kitty</label></td>
<td><input type="checkbox" id="puppy" name="puppy" value="Good puppy..."><label for="puppy">Puppy</label></td>
</tr>
</table>
<div class="button-container">
<span id="start" class="button">Install</span>
</div>
</div>
<div id="installer" style="display: none;">
<svg class="spin" id="logo" version='1.1' viewBox='0 -525 525 525' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'>
<g id='page1'>
<g transform='matrix(1 0 0 1 -43 133)'>
<path d='M467.5 -395.5C467.5 -484.969 394.969 -557.5 305.5 -557.5S143.5 -484.969 143.5 -395.5S216.031 -233.5 305.5 -233.5S467.5 -306.031 467.5 -395.5Z' fill='none' stroke='#ff0000' stroke-linecap='round' stroke-linejoin='round' stroke-miterlimit='10.0375' stroke-width='20.075'/>
<path d='M557.5 -395.5C557.5 -534.676 444.676 -647.5 305.5 -647.5S53.5 -534.676 53.5 -395.5C53.5 -256.324 166.324 -143.5 305.5 -143.5S557.5 -256.324 557.5 -395.5Z' fill='none' stroke='#ff0000' stroke-linecap='round' stroke-linejoin='round' stroke-miterlimit='10.0375' stroke-width='20.075'/>
<path d='M305.5 -323.5L425.102 -530.652' fill='none' stroke='#ff0000' stroke-linecap='round' stroke-linejoin='round' stroke-miterlimit='10.0375' stroke-width='20.075'/>
<path d='M465.602 -554.039C465.602 -568.953 453.516 -581.039 438.602 -581.039C423.691 -581.039 411.602 -568.953 411.602 -554.039C411.602 -539.129 423.691 -527.039 438.602 -527.039C453.516 -527.039 465.602 -539.129 465.602 -554.039Z' fill='none' stroke='#ff0000' stroke-linecap='round' stroke-linejoin='round' stroke-miterlimit='10.0375' stroke-width='20.075'/>
<path d='M367.856 -431.5H128.652' fill='none' stroke='#ff0000' stroke-linecap='round' stroke-linejoin='round' stroke-miterlimit='10.0375' stroke-width='20.075'/>
<path d='M88.148 -454.883C75.234 -447.426 70.812 -430.914 78.266 -418C85.723 -405.086 102.234 -400.66 115.148 -408.117C128.062 -415.574 132.488 -432.086 125.031 -445C117.578 -457.914 101.062 -462.34 88.148 -454.883Z' fill='none' stroke='#ff0000' stroke-linecap='round' stroke-linejoin='round' stroke-miterlimit='10.0375' stroke-width='20.075'/>
<path d='M243.144 -431.5L362.746 -224.348' fill='none' stroke='#ff0000' stroke-linecap='round' stroke-linejoin='round' stroke-miterlimit='10.0375' stroke-width='20.075'/>
<path d='M362.75 -177.578C375.664 -170.121 392.176 -174.547 399.633 -187.461C407.086 -200.375 402.664 -216.887 389.75 -224.344S360.32 -227.375 352.867 -214.461C345.41 -201.547 349.836 -185.035 362.75 -177.578Z' fill='none' stroke='#ff0000' stroke-linecap='round' stroke-linejoin='round' stroke-miterlimit='10.0375' stroke-width='20.075'/>
<div id="installer" style="display: none;">
<svg class="spin" id="logo" version='1.1' viewBox='0 -525 525 525' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'>
<g id='page1'>
<g transform='matrix(1 0 0 1 -43 133)'>
<path d='M467.5 -395.5C467.5 -484.969 394.969 -557.5 305.5 -557.5S143.5 -484.969 143.5 -395.5S216.031 -233.5 305.5 -233.5S467.5 -306.031 467.5 -395.5Z' fill='none' stroke='#ff0000' stroke-linecap='round' stroke-linejoin='round' stroke-miterlimit='10.0375' stroke-width='20.075'/>
<path d='M557.5 -395.5C557.5 -534.676 444.676 -647.5 305.5 -647.5S53.5 -534.676 53.5 -395.5C53.5 -256.324 166.324 -143.5 305.5 -143.5S557.5 -256.324 557.5 -395.5Z' fill='none' stroke='#ff0000' stroke-linecap='round' stroke-linejoin='round' stroke-miterlimit='10.0375' stroke-width='20.075'/>
<path d='M305.5 -323.5L425.102 -530.652' fill='none' stroke='#ff0000' stroke-linecap='round' stroke-linejoin='round' stroke-miterlimit='10.0375' stroke-width='20.075'/>
<path d='M465.602 -554.039C465.602 -568.953 453.516 -581.039 438.602 -581.039C423.691 -581.039 411.602 -568.953 411.602 -554.039C411.602 -539.129 423.691 -527.039 438.602 -527.039C453.516 -527.039 465.602 -539.129 465.602 -554.039Z' fill='none' stroke='#ff0000' stroke-linecap='round' stroke-linejoin='round' stroke-miterlimit='10.0375' stroke-width='20.075'/>
<path d='M367.856 -431.5H128.652' fill='none' stroke='#ff0000' stroke-linecap='round' stroke-linejoin='round' stroke-miterlimit='10.0375' stroke-width='20.075'/>
<path d='M88.148 -454.883C75.234 -447.426 70.812 -430.914 78.266 -418C85.723 -405.086 102.234 -400.66 115.148 -408.117C128.062 -415.574 132.488 -432.086 125.031 -445C117.578 -457.914 101.062 -462.34 88.148 -454.883Z' fill='none' stroke='#ff0000' stroke-linecap='round' stroke-linejoin='round' stroke-miterlimit='10.0375' stroke-width='20.075'/>
<path d='M243.144 -431.5L362.746 -224.348' fill='none' stroke='#ff0000' stroke-linecap='round' stroke-linejoin='round' stroke-miterlimit='10.0375' stroke-width='20.075'/>
<path d='M362.75 -177.578C375.664 -170.121 392.176 -174.547 399.633 -187.461C407.086 -200.375 402.664 -216.887 389.75 -224.344S360.32 -227.375 352.867 -214.461C345.41 -201.547 349.836 -185.035 362.75 -177.578Z' fill='none' stroke='#ff0000' stroke-linecap='round' stroke-linejoin='round' stroke-miterlimit='10.0375' stroke-width='20.075'/>
</g>
</g>
</g>
</svg>
<div id="progressbar">
<div id="filled"></div>
</div>
<div id="status">
Beginning installation...
</svg>
<div id="progressbar">
<div id="filled"></div>
</div>
<div id="status">
Beginning installation...
</div>
</div>
</div>
<div id="controls"><a id="back" href=".."><img src="../back.svg"></a> <a id="reload" style="display: none;" href="."><img src="../reload.svg"></a></div>
<script type="text/javascript">
var boringStatuses = [
"Initializing database...",
@ -101,27 +104,33 @@
}
var progress = 0;
var progressInterval;
function makeProgress() {
if (progress >= 100) {
document.getElementById("status").innerText = "SLEEP";
document.getElementById("back").style.display = "";
document.getElementById("reload").style.display = "";
clearInterval(progressInterval);
return;
}
progress += 0.1;
document.getElementById("filled").style.width = progress + "%";
}
var statusInterval;
function updateStatus() {
var newStatus;
if (progress >= 100) {
newStatus = "SLEEP";
} else {
if (Math.random()*100 < progress) {
if (optionalLewdStatuses.length > 0 && Math.floor(Math.random()*(lewdStatuses.length+1)) === 0) {
newStatus = randomChoice(optionalLewdStatuses);
} else {
newStatus = randomChoice(lewdStatuses);
}
clearInterval(statusInterval);
return;
}
var newStatus;
if (Math.random()*100 < progress) {
if (optionalLewdStatuses.length > 0 && Math.floor(Math.random()*(lewdStatuses.length+1)) === 0) {
newStatus = randomChoice(optionalLewdStatuses);
} else {
newStatus = randomChoice(boringStatuses);
newStatus = randomChoice(lewdStatuses);
}
} else {
newStatus = randomChoice(boringStatuses);
}
document.getElementById("status").innerText = newStatus;
}
@ -139,9 +148,10 @@
document.getElementById("start").onclick = function() {
document.getElementById("config").style.display = "none";
document.getElementById("back").style.display = "none";
document.getElementById("installer").style.display = "";
setInterval(makeProgress, 50);
setInterval(updateStatus, 1500);
progressInterval = setInterval(makeProgress, 50);
statusInterval = setInterval(updateStatus, 1500);
};
</script>
</body>

View file

@ -2,6 +2,7 @@
font-family: 'Raleway';
src: url('../fonts/Raleway-Regular.otf');
}
body {
background-color: black;
color: red;
@ -9,8 +10,11 @@ body {
font-size: 25px;
font-weight: bold;
text-align: center;
width: 100%;
margin: 0px;
}
#main-container {
width: 100%;
position: absolute;
top: 50%;
transform: translateY(-50%);
@ -81,6 +85,16 @@ span.button:hover {
}
}
#controls {
position: absolute;
bottom: 10px;
left: 10px;
}
#controls img {
width: 40px;
height: 40px;
}
/*
* https://css-tricks.com/custom-styling-form-inputs-with-modern-css-features/
* https://codepen.io/aaroniker/pen/ZEYoxEY