diff --git a/index.html b/index.html index 799720e..b714351 100644 --- a/index.html +++ b/index.html @@ -2,17 +2,142 @@ - - + Hunt the Wumpus — 1973 cave game, in your browser - Hunt the Wumpus + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + diff --git a/src/App.css b/src/App.css index fb9c7c7..4a5f478 100644 --- a/src/App.css +++ b/src/App.css @@ -635,6 +635,20 @@ html[data-skin='modern'] .btn:active:not(:disabled) { font-size: 12px; } +/* + * The way back. The arrow is a pseudo-element rather than part of the label so + * that it can be the right arrow for the machine you are looking at: a chevron + * under the lamp, and the two ASCII characters a Teletype could actually + * strike on the paper skin. + */ +.controls .back::before { + content: '\2039\00a0'; +} + +:root:not([data-skin='modern']) .controls .back::before { + content: '<-\00a0'; +} + .seed { margin-left: auto; opacity: 0.7; diff --git a/src/App.tsx b/src/App.tsx index 05161d0..c4058aa 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -35,6 +35,17 @@ import './App.css' */ const SOURCE_URL = 'https://github.com/Coffey-Labs/wumpus' +/** + * The way back out. + * + * Absolute rather than `/`, because this game 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. The + * destination is a particular site, and naming it is the honest way to say so. + * The source link next to it works the same way for the same reason. + */ +const GAMES_URL = 'https://games.jcoffey.dev/' + export default function App() { const [seed] = useState(randomSeed) const [state, dispatch] = useReducer(reducer, seed, initialState) @@ -224,6 +235,14 @@ export default function App() { + {/* Leftmost, because that is where a way back belongs. */} + + GAMES + {