pushbox-quest/analyzer/index.html
2024-01-20 21:10:12 +08:00

220 lines
3.9 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Visual Pushbox 2024</title>
<link rel="stylesheet" href="normalize.css" />
</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><table class="info-table full-width" id="analyze-info-table"><tbody>
<tr><td>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></td>
<td><button id="analyze" class="">Analyze</button></td>
</tr></tbody></table>
<div class="ctrl-title top-margin">Playback</div>
<table class="full-width info-table"><tbody>
<tr>
<td id="progress-value"><span id="current-progress">0</span>/<span id="full-progress">0</span></td>
<td id="progress-remain" class="text-right">-0</td>
</tr>
</tbody></table>
<div id="progress-bar" class="full-width">
<div id="progress-bar-fg" class="full-height"></div>
</div>
<div id="progress-controls" class="full-width">
<a href="javascript:void(0)" class="abtn" id="progressctl-prev">Prev</a>
<a href="javascript:void(0)" class="abtn" id="progressctl-next">Next</a>
<a href="javascript:void(0)" class="abtn" id="progressctl-auto">Play</a>
<a href="javascript:void(0)" class="abtn" id="progressctl-reset">Reset</a>
</div>
<div class="ctrl-title top-margin">Edit</div>
<textarea autocomplete="off" spellcheck="false" id="maze-charmap"></textarea>
<button id="charmap_import" class="btn full-width top-margin">Import</button>
</div>
</main>
</body>
<script type="module" src="index.js"></script>
<style>
#analyze-info-table {
width: 215px;
}
#analyze {
height: 38px;
width: 75px;
float: right;
}
html {
background-color: #f6f6c6;
}
#progress-bar {
background-color: lightgrey;
height: 10px;
}
#progress-bar-fg {
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;
border: none;
}
.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 {
float: left;
}
.float-right {
float: right;
}
#maze-charmap {
width: calc(100%);
height: 300px;
display: block;
margin: 0;
padding: 0;
overflow: hidden;
font-size: 13px;
font-family: monospace;
}
#board {
width: 80vh;
height: 80vh;
border: 1px solid black;
padding: 0;
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>