From e615726615b69d97378977ca8d5f81d4e44b3ca2 Mon Sep 17 00:00:00 2001 From: John Coffey Date: Wed, 9 Sep 2026 12:00:51 -0700 Subject: [PATCH] Give it a container and a page of its own A Dockerfile that builds the bundle and serves it from nginx, matching the three games already on the site, and the metadata a page needs when it is somewhere rather than on a laptop: canonical, Open Graph, the two JSON-LD blocks, and a noscript that describes the game rather than showing an empty div to anybody who does not run scripts. No dev proxy, unlike its siblings. They post scores to a shared service and this one has nothing to post: a game of Diplomacy is not a number, and a leaderboard reading "reached eleven centres" would be a worse thing to know about somebody than nothing at all. The favicon is seven powers round a board in the seven colours the map uses, with the one supply centre in the middle they are all looking at -- drawn here rather than drafted in a tool, like every other mark in this repository. And a way back out, absolute rather than "/": this is served from a subdirectory in production and from the root in development, so the relative answer is right in one of those and points at the game itself in the other. --- index.html | 132 ++++++++++++++++++++++++++++++++++++- package.json | 10 ++- public/favicon.svg | 16 +++++ src/App.css | 1 + src/components/Landing.tsx | 12 ++++ vite.config.ts | 17 ++--- web/Dockerfile | 24 +++++++ 7 files changed, 198 insertions(+), 14 deletions(-) create mode 100644 public/favicon.svg create mode 100644 web/Dockerfile diff --git a/index.html b/index.html index dcc2887..7d82cf2 100644 --- a/index.html +++ b/index.html @@ -3,11 +3,141 @@ - Great Powers — the classic negotiation game, in your browser + Great Powers — the classic negotiation game, in your browser + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + diff --git a/package.json b/package.json index 8fd14d9..4291eda 100644 --- a/package.json +++ b/package.json @@ -26,5 +26,13 @@ }, "description": "A browser rebuild of the classic seven-power negotiation game, one human against six computer powers.", "license": "AGPL-3.0-or-later", - "author": "John Coffey" + "author": "John Coffey", + "repository": { + "type": "git", + "url": "git+https://github.com/Coffey-Labs/great-powers.git" + }, + "homepage": "https://games.jcoffey.dev/powers/", + "bugs": { + "url": "https://github.com/Coffey-Labs/great-powers/issues" + } } diff --git a/public/favicon.svg b/public/favicon.svg new file mode 100644 index 0000000..5e93b6c --- /dev/null +++ b/public/favicon.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + diff --git a/src/App.css b/src/App.css index f3c0562..92bbd8d 100644 --- a/src/App.css +++ b/src/App.css @@ -471,6 +471,7 @@ header select { color: #8c98ab; } .landing footer p { margin: 0 0 8px; } +.landing footer .ways { font-size: 0.95rem; color: #cbd6e6; margin-bottom: 12px; } /* ----------------------------------------------------------- giving up */ diff --git a/src/components/Landing.tsx b/src/components/Landing.tsx index dea3201..ec64c75 100644 --- a/src/components/Landing.tsx +++ b/src/components/Landing.tsx @@ -105,6 +105,18 @@ export function Landing({