pushbox-quest/analyzer/index.html
szdytom 94cd28d403 add playback progress bar
Signed-off-by: szdytom <szdytom@qq.com>
2024-01-20 16:16:26 +08:00

201 lines
3.4 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<title>Visual Pushbox 2024</title>
</head>
<body>
<main>
<div id="board">
<div id="maze"></div>
<div id="target" class="maze-sqr sqr-target"></div>
<div id="player" class="maze-sqr maze-mv sqr-player"></div>
<div id="box" class="maze-sqr maze-mv sqr-box"></div>
</div>
<div id="control-panel">
<div class="ctrl-title">Analyzer</div>
<table class="full-width info-table"><tbody>
<tr><td>Analyze Status:</td><td id="analyze-status" class="text-right">Not Analyzed</td></tr>
<tr><td>Total Steps:</td><td id="analyze-steps" class="text-right">N/A</td></tr>
</tbody></table>
<div class="btn-group full-width top-margin">
<button id="analyze" class="btn float-left full-width">Analyze</button>
</div>
<div class="ctrl-title top-margin">Playback</div>
<div id="progress-indicator">
<div id="progress-value" class="float-left">415 / 1618</div>
<div id="progress-left" class="float-right">-1203</div>
</div>
<div id="progress-bar" class="full-width top-margin">
<div id="progress-bar-fg" class="full-height"></div>
</div>
<div class="ctrl-title top-margin">Import / Export</div>
<textarea autocomplete="off" spellcheck="false" id="maze_charmap"></textarea>
<div id="charmap_controls" class="btn-group full-width top-margin">
<button id="charmap_import" class="btn float-left">Import</button>
<button id="charmap_export" class="btn float-right">Export</button>
</div>
</div>
</main>
</body>
<script type="module" src="index.js"></script>
<style>
#progress-bar {
background-color: lightgrey;
height: 10px;
}
#progress-bar-fg {
width: 30%;
background-color: orange;
}
.full-height {
height: 100%;
}
.full-width {
width: 100%;
}
.info-table, .info-table tr, .info-table td {
border: none;
padding: 0;
outline: none;
border-spacing: 0;
}
.text-right {
text-align: right;
}
main {
margin: 40px;
}
button {
border-radius: 0px;
border: none;
background-color: lightgray;
}
button:hover {
background-color: grey;
cursor: pointer;
}
button[disabled] {
cursor: not-allowed;
}
textarea {
resize: none;
outline: none;
border-radius: 0px;
}
.ctrl-title {
font-weight: bold;
margin-bottom: 10px;
border-bottom: 1px solid black;
font-size: x-large;
width: 100%;
}
#control-panel {
margin-left: 40px;
display: inline-block;
width: 300px;
height: calc(80vh - 20px);
border: 1px solid black;
padding: 10px;
}
.top-margin {
margin-top: 10px;
}
.btn {
height: 30px;
min-width: 80px;
}
.float-left {
display: inline-block;
float: left;
}
.float-right {
display: inline-block;
float: right;
}
#maze_charmap {
width: calc(100% - 2px);
height: 298px;
display: block;
margin: 0;
padding: 0;
overflow: hidden;
font-size: 13.33px;
font-family: monospace;
}
#board {
width: 80vh;
height: 80vh;
border: 1px solid black;
padding: 0;
display: inline-block;
float: left;
position: relative;
}
.maze-sqr {
position: absolute;
width: 4vh;
height: 4vh;
top: 0;
left: 0;
}
#maze {
position: relative;
z-index: 5;
width: 100%;
height: 100%;
margin: 0;
border: 0;
padding: 0;
}
.maze-mv {
z-index: 10;
transition: top 0.2s, left 0.2s;
}
.sqr-wall {
background-color: grey;
}
.sqr-space {
background-color: rgba(0, 0, 0, 0);
}
.sqr-target {
background-color: lime;
}
.sqr-player {
background-color: lightblue;
}
.sqr-box {
background-color: orange;
}
</style>
</html>