summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--about.html6
-rw-r--r--play.html43
-rw-r--r--play.js12
3 files changed, 25 insertions, 36 deletions
diff --git a/about.html b/about.html
index caaee1d..3136356 100644
--- a/about.html
+++ b/about.html
@@ -4,11 +4,9 @@ nationalist guerrillas and the French government from 1954 to 1962. During the g
authority of the French colonial authorities and replace their governing structures with his own, to the point that
Algeria makes the transition from being the 10th department of France to national independence.
-<br clear="left">
-
<p>
-Designer: <a href="https://brtrain.wordpress.com/">Brian Train</a>.<br/>
-Programming: Mischa Untaga.
+Designer: <a href="https://brtrain.wordpress.com/">Brian Train</a>.
+<br> Programming: Mischa Untaga.
<ul>
<li><a href="/algeria/info/rules.html">Rules of Play</a>
diff --git a/play.html b/play.html
index 632cd90..7672dc2 100644
--- a/play.html
+++ b/play.html
@@ -2,14 +2,15 @@
<!-- vim:set nowrap: -->
<html>
<head>
-<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1">
+<meta name="viewport" content="width=device-width, height=device-height, user-scalable=no, interactive-widget=resizes-content, viewport-fit=cover">
+<meta name="theme-color" content="#444">
<meta charset="UTF-8">
<title>ALGERIA</title>
<link rel="stylesheet" href="/fonts/fonts.css">
-<link rel="stylesheet" href="/common/play.css">
-<script defer src="/common/play.js"></script>
+<link rel="stylesheet" href="/common/client.css?v=4134">
+<script defer src="/common/client.js?v=4134"></script>
<script defer src="data.js"></script>
-<script defer src="play.js"></script>
+<script defer src="play.js?v=4134"></script>
<style>
:root {
@@ -343,27 +344,21 @@ main { background-color: dimgray }
<header>
<div id="toolbar">
- <div class="menu">
- <div class="menu_title"><img src="/images/cog.svg"></div>
- <div class="menu_popup">
- <div class="menu_item" onclick="send_save()">&#x1F41E; Save</div>
- <div class="menu_item" onclick="send_restore()">&#x1F41E; Restore</div>
- <div class="menu_separator"></div>
-
- <a class="menu_item" href="info/rules.html" target="_blank">Rules of Play</a>
- <a class="menu_item" href="info/charts.html" target="_blank">Charts &amp; Tables</a>
- <a class="menu_item" href="info/charts.html#fln-missions" target="_blank">FLN Missions</a>
- <a class="menu_item" href="info/charts.html#gov-missions" target="_blank">Gov. Missions</a>
-
- <div class="resign menu_separator"></div>
- <div class="resign menu_item" onclick="confirm_resign()">Resign</div>
- </div>
- </div>
- <div class="icon_button" onclick="toggle_zoom()"><img src="/images/magnifying-glass.svg"></div>
- <div class="icon_button" onclick="toggle_log()"><img src="/images/scroll-quill.svg"></div>
+ <details>
+ <summary><img src="/images/cog.svg"></summary>
+ <menu>
+ <li><a href="info/rules.html" target="_blank">Rules of Play</a>
+ <li><a href="info/charts.html" target="_blank">Charts &amp; Tables</a>
+ <li><a href="info/charts.html#fln-missions" target="_blank">FLN Missions</a>
+ <li><a href="info/charts.html#gov-missions" target="_blank">Gov. Missions</a>
+ <li class="debug separator">
+ <li class="debug" onclick="send_save()">&#x1F41E; Save
+ <li class="debug" onclick="send_restore()">&#x1F41E; Restore
+ <li class="resign separator">
+ <li class="resign" onclick="confirm_resign()">Resign
+ </menu>
+ </details>
</div>
- <div id="prompt"></div>
- <div id="actions"></div>
</header>
<aside>
diff --git a/play.js b/play.js
index 4d69287..aa084fb 100644
--- a/play.js
+++ b/play.js
@@ -1,7 +1,5 @@
"use strict"
-/* global view, data, send_action, action_button, scroll_with_middle_mouse */
-
const SCALE = 1.8033333333333332
const FLN = 0
@@ -555,7 +553,7 @@ Node.prototype.appendChildAnimated = function(e) {
e.animate([
{ transform: transformFrom },
{ transform: transformTo },
- ], {
+ ], {
duration: 1000,
easing: 'ease',
})
@@ -732,7 +730,7 @@ function on_update() { // eslint-disable-line no-unused-vars
action_button("undo", "Undo")
// XXX debug
- action_button("restart", "Restart")
+ action_button("restart", "Restart")
action_button("reset", "Reset")
}
@@ -766,7 +764,7 @@ function on_blur_area_tip(x) { // eslint-disable-line no-unused-vars
}
function on_click_area_tip(x) { // eslint-disable-line no-unused-vars
- ui.areas[x].scrollIntoView({ block:"center", inline:"center", behavior:"smooth" })
+ scroll_into_view(ui.areas[x])
}
function sub_area_name(_match, p1, _offset, _string) {
@@ -784,7 +782,7 @@ function on_blur_unit_tip(x) { // eslint-disable-line no-unused-vars
}
function on_click_unit_tip(x) { // eslint-disable-line no-unused-vars
- ui.units[x].scrollIntoView({ block:"center", inline:"center", behavior:"smooth" })
+ scroll_into_view(ui.units[x])
}
function sub_unit_name(_match, p1, _offset, _string) {
@@ -834,5 +832,3 @@ function on_log(text) { // eslint-disable-line no-unused-vars
p.innerHTML = text
return p
}
-
-scroll_with_middle_mouse("main")