planet-wars/backend/templates/visualizer.html.tera

51 lines
1.8 KiB
Text
Raw Normal View History

2020-03-27 15:27:19 +01:00
{% extends "base" %}
{% block content %}
2020-04-01 22:16:55 +02:00
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
2020-03-27 15:27:19 +01:00
<link rel="stylesheet" type="text/css" href="/style/visualizer.css">
2020-04-01 21:36:35 +02:00
<link rel="stylesheet" type="text/css" href="/style/state.css">
2020-03-27 15:27:19 +01:00
<input type="file" id="fileselect" style="display: none">
2020-03-27 17:32:18 +01:00
<div id=wrapper>
2020-03-27 15:27:19 +01:00
2020-03-27 17:32:18 +01:00
<div id="main" class="loading">
2020-03-27 15:27:19 +01:00
<canvas id="c"></canvas>
<div id="name"></div>
<div id="addbutton" class="button"></div>
<div id="meta">
2020-03-27 17:32:18 +01:00
<div id="turnCounter">
2020-03-27 15:27:19 +01:00
0 / 0
2020-03-27 17:32:18 +01:00
</div>
<div>
<span>Ms per frame:&nbsp;</span>
<input type="number" id="speed" value="100">
</div>
<div class="slidecontainer">
<input type="range" min="0" max="1" value="1" class="slider" id="turnSlider">
</div>
2020-03-27 15:27:19 +01:00
</div>
2020-04-01 22:16:55 +02:00
<div class="lds-roller"><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div></div>
2020-03-27 17:32:18 +01:00
</div>
2020-03-27 15:27:19 +01:00
2020-03-27 17:32:18 +01:00
<div class="options">
2020-04-01 21:36:35 +02:00
{% for state in games %}
2020-04-01 22:16:55 +02:00
<div class="option" onclick="visualizer.handle('/games/{{ state.file }}', '{{ state.name }}')">
<p>{{state.name}} ({{ state.map }}) <span style="float: right;">{{state.turns}} turns</span></p>
<div>
<div class="players">
{% for player in state.players %}
<p style="color: {{colours[loop.index]}}" class="{% if player[1] %}winner{% endif %}">{{ player[0] }}</p>
{% endfor %}
</div>
2020-04-01 21:36:35 +02:00
</div>
</div>
2020-03-27 17:32:18 +01:00
{% endfor %}
2020-03-27 15:27:19 +01:00
</div>
2020-03-27 17:32:18 +01:00
</div>
2020-03-27 15:27:19 +01:00
2020-03-27 17:32:18 +01:00
<noscript>This page contains webassembly and javascript content, please enable javascript in your browser.</noscript>
2020-03-27 15:27:19 +01:00
<script src="frontend/bootstrap.js"></script>
{% endblock %}