summaryrefslogtreecommitdiff
path: root/web/static
diff options
context:
space:
mode:
Diffstat (limited to 'web/static')
-rw-r--r--web/static/fonts/bootstrap-icons-sub.woff2bin728 -> 1036 bytes
-rw-r--r--web/static/index.html12
-rw-r--r--web/static/style.css3
-rw-r--r--web/static/sw.js15
4 files changed, 14 insertions, 16 deletions
diff --git a/web/static/fonts/bootstrap-icons-sub.woff2 b/web/static/fonts/bootstrap-icons-sub.woff2
index 3f7ef9b..0d765be 100644
--- a/web/static/fonts/bootstrap-icons-sub.woff2
+++ b/web/static/fonts/bootstrap-icons-sub.woff2
Binary files differ
diff --git a/web/static/index.html b/web/static/index.html
index f3dd2ae..2ed654b 100644
--- a/web/static/index.html
+++ b/web/static/index.html
@@ -16,10 +16,10 @@
<div id="main">
<div id="titlebar">
<div>dartboat™</div>
- <div class="input first"><label for="delay">delay</label><input id="delay" data-opt="delay" maxlength="4" value=""></div>
- <div class="input"><label for="stdev">stdev</label><input id="stdev" data-opt="stdev" maxlength="4" value=""></div>
- <div class="button icon" id="flip-controls-button">&#xf1c3;</div>
- <div class="button icon" data-modal="help-modal">&#xf50b;</div>
+ <div title="Delay between computer's darts (ms)" class="input first"><label for="delay" class="icon">&#xf597;</label><input id="delay" data-opt="delay" maxlength="4" value=""></div>
+ <div title="Computer's accuracy (lower is more accurate)" class="input"><label for="stdev" class="icon">&#xf1de;</label><input id="stdev" data-opt="stdev" maxlength="4" value=""></div>
+ <div title="Toggle controls side" class="button icon" id="flip-controls-button">&#xf1c3;</div>
+ <div title="Help and info" class="button icon" data-modal="help-modal">&#xf50b;</div>
</div>
<div id="info">
<div id="oi">oi!</div>
@@ -75,8 +75,8 @@
<h2>dartboat</h2>
<p>dartboat uses an internal representation of a specification dartboard. Darts are thrown following a normal distribution, with the resultant coordinates used to calculate the segments in which they land. The idea is that this provides a more realistic opponent than picking points at random.</p>
<h2>Settings</h2>
- <p><em>stdev</em> — the standard deviation of the bot's throws in millimetres. A value of 24 translates to a three-dart average of roughly 35. A value of 13 would be a 65 average, and a value of 8 a 95 average.</p>
- <p><em>delay</em> — milliseconds it takes the bot to throw each dart.</p>
+ <p><span class="icon">&#xf597;</span> <em>(delay)</em> — milliseconds it takes the computer to throw each dart.</p>
+ <p><span class="icon">&#xf1de;</span> <em>(stdev)</em> — the standard deviation of the computer's throws in millimetres. A value of 24 translates to a three-dart average of roughly 35. A value of 13 would be a 65 average, and a value of 8 a 95 average.</p>
<h2>Interface</h2>
<p>To avoid destructive actions being a misclick away, certain actions require two presses—one to activate the button and another to trigger it.</p>
<p>The controls are designed to be keyboard-friendly. The keys should be fairly intuitive for the most part.</p>
diff --git a/web/static/style.css b/web/static/style.css
index ce2df1a..0d2fbcd 100644
--- a/web/static/style.css
+++ b/web/static/style.css
@@ -60,6 +60,7 @@ body {
.icon {
font-family: 'bootstrap-icons-sub';
+ vertical-align: -0.125em;
}
/* titlebar */
@@ -449,7 +450,7 @@ body {
#visits .p140 { color: #20e018; }
#visits .p180 { color: #20e018; font-weight: bold; }
#visits .throws-first { color: #999; }
-#visits .throws-first:before { content: '\f151'; font-size: 0.75em; }
+#visits .throws-first:before { content: '\f151'; font-size: 0.6em; }
#visits .visit-p1-name { grid-column: 1 / span 2; }
#visits .visit-p2-name { grid-column: 4 / span 2; }
#visits .visit-p1-pts { grid-column: 1; }
diff --git a/web/static/sw.js b/web/static/sw.js
index f5d699a..6359ae5 100644
--- a/web/static/sw.js
+++ b/web/static/sw.js
@@ -1,8 +1,8 @@
const CACHE_PREFIX = 'dartboat-'
-const CACHE_VERSION = '3';
+const CACHE_VERSION = '4';
const CACHE_NAME = `${CACHE_PREFIX}${CACHE_VERSION}`;
-const FILES = [
+const CACHE_FILES = [
'./',
'style.css',
'dartboat.js',
@@ -18,19 +18,16 @@ function swlog(str) {
self.addEventListener('install', e => {
swlog('installing');
-
- e.waitUntil((async() => {
+ e.waitUntil((async () => {
swlog(`initialising cache ${CACHE_NAME}`);
const cache = await caches.open(CACHE_NAME);
- await cache.addAll(FILES);
+ await cache.addAll(CACHE_FILES);
})());
-
- swlog('installed');
});
self.addEventListener('activate', e => {
- e.waitUntil(caches.keys().then((keys) => {
- return Promise.all(keys.map((k) => {
+ e.waitUntil(caches.keys().then(keys => {
+ return Promise.all(keys.map(k => {
if (k === CACHE_NAME || !k.startsWith(CACHE_PREFIX))
return;