summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-10-18 02:20:39 +0200
committerTor Andersson <tor@ccxvii.net>2023-10-20 19:00:52 +0200
commit7bf7e9d0b35e8d119ffcd601948ee81bee79085d (patch)
tree7ff3651006594a44c1ad51931badd228a2cd887c
parent53bfb5e35be76a46645db2115d227c5555ce6832 (diff)
downloadfield-cloth-gold-7bf7e9d0b35e8d119ffcd601948ee81bee79085d.tar.gz
Mobile layout.
-rw-r--r--about.html5
-rw-r--r--play.html37
-rw-r--r--rules.js4
3 files changed, 21 insertions, 25 deletions
diff --git a/about.html b/about.html
index 0b0a3e8..afdbbe3 100644
--- a/about.html
+++ b/about.html
@@ -12,14 +12,13 @@ A sort of subversion of the point salad paradigm, The Field of the Cloth of
Gold harkens back to the feel of the classic German games of the 1990s: simple,
elegant, austere, and politely vicious.
-<br clear="left">
-
<p>
Game Design: Amabel Holland.<br>
<p>
Copyright &copy; 2023
-<a href="https://hollandspiele.com/products/the-field-of-the-cloth-of-gold">Hollandspiele</a>
+<a href="https://hollandspiele.com/products/the-field-of-the-cloth-of-gold">Hollandspiele</a>.
+<br>Programming &copy; 2023 by Tor Andersson.
<ul>
<li><a href="/field-cloth-gold/info/rules.html">Laws of Play</a>
diff --git a/play.html b/play.html
index 1b0d91e..83ef648 100644
--- a/play.html
+++ b/play.html
@@ -1,14 +1,15 @@
<!DOCTYPE html>
<!-- vim:set nowrap: -->
-<html>
+<html lang="en">
<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>FIELD OF THE CLOTH OF GOLD</title>
<link rel="icon" href="favicon.svg">
<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">
+<script defer src="/common/client.js"></script>
<script defer src="play.js"></script>
<style>
@@ -237,21 +238,17 @@ body.Observer #hand { display: none }
<header>
<div id="toolbar">
- <div class="menu">
- <div class="menu_title"><img src="/images/cog.svg"></div>
- <div class="menu_popup">
- <a class="menu_item" href="info/rules.html" target="_blank">Rules</a>
- <div class="menu_separator"></div>
- <div id="sort_tiles_menu" class="menu_item unchecked" onclick="toggle_sort()">Sort tiles</div>
- <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</a>
+ <li class="separator">
+ <li id="sort_tiles_menu" class="unchecked" onclick="toggle_sort()">Sort tiles
+ <li class="resign separator">
+ <li class="resign" onclick="confirm_resign()">Resign
+ </menu>
+ </details>
</div>
- <div id="prompt"></div>
- <div id="actions"></div>
</header>
<aside>
@@ -274,8 +271,8 @@ body.Observer #hand { display: none }
<div id="log"></div>
</aside>
-<main>
- <div id="mapwrap" class="fit">
+<main data-min-zoom="1" data-max-zoom="1">
+ <div id="mapwrap">
<div id="map">
<div id="court1" class="red court">Rival Court</div>
<div id="board">
diff --git a/rules.js b/rules.js
index 9efcc19..1fc7734 100644
--- a/rules.js
+++ b/rules.js
@@ -146,7 +146,7 @@ exports.action = function (state, player, action, arg) {
return game
}
-exports.view = function(state, player) {
+exports.view = function (state, player) {
game = state
view = {
@@ -186,7 +186,7 @@ exports.view = function(state, player) {
view.actions.undo = 0
}
- return view;
+ return view
}
exports.resign = function (state, player) {