diff --git a/NOTICE.md b/NOTICE.md index c2f97ab..fc14218 100644 --- a/NOTICE.md +++ b/NOTICE.md @@ -84,3 +84,10 @@ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. *None of the above is legal advice.* + +## The arcade font + +The headings and buttons on the landing page are set in **Press Start 2P**, +in `src/assets/fonts/`: Copyright 2012 The Press Start 2P Project Authors, +under the SIL Open Font License 1.1, whose text is beside it as +`OFL-PressStart2P.txt`. diff --git a/src/arcade.css b/src/arcade.css new file mode 100644 index 0000000..6849980 --- /dev/null +++ b/src/arcade.css @@ -0,0 +1,124 @@ +/* The arcade look for the page before the table, to match the cabinets on + games.jcoffey.dev. Everything is scoped to .landing, so the table itself + keeps its own look. --neon is this game's marquee color on the arcade floor. */ +@font-face { + font-family: "Press Start 2P"; + src: url("./assets/fonts/PressStart2P-Regular.woff2") format("woff2"); + font-display: swap; +} + +div.landing { + --neon: #4d8dff; + --pixel: "Press Start 2P", ui-monospace, monospace; + --cyan: #22e5ff; + --edge: #2a1d4d; +} +/* The room: dark, lit from above in pink and cyan, and a tube over it all. */ +div.landing::before, +div.landing::after { + content: ""; + position: fixed; + inset: 0; + pointer-events: none; +} +div.landing::before { + z-index: -1; + background: + radial-gradient(60% 40% at 50% 0%, rgba(255, 43, 214, 0.18), transparent 70%), + radial-gradient(50% 35% at 85% 15%, rgba(34, 229, 255, 0.1), transparent 70%), + #07040f; +} +div.landing::after { + z-index: 10; + background: + repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.16) 0 1px, transparent 1px 3px), + radial-gradient(120% 90% at 50% 50%, transparent 62%, rgba(0, 0, 0, 0.5) 100%); +} + +/* ‹ ARCADE, back to the floor, and the credit counter. */ +div.landing .arcade-bar { + display: flex; + justify-content: space-between; + gap: 16px; + margin-bottom: 28px; + font-family: var(--pixel); + font-size: 0.62rem; + letter-spacing: 0.06em; + text-transform: uppercase; +} +div.landing .arcade-bar a { color: var(--cyan); text-decoration: none; } +div.landing .arcade-bar a:hover { color: #ffd23d; } +div.landing .arcade-bar span { color: #ff3b3b; } + +div.landing h1 { + font-family: var(--pixel); + font-weight: 400; + font-size: clamp(1.5rem, 5.5vw, 3rem); + line-height: 1.25; + margin: 0 0 12px; + color: #fff; + text-shadow: + 0 0 6px #fff, + 0 0 16px var(--neon), + 0 0 36px var(--neon), + 5px 5px 0 #24103a; + animation: arcade-flicker 7s infinite; +} +div.landing h2 { + font-family: var(--pixel); + font-weight: 400; + font-size: 0.68rem; + line-height: 1.7; + letter-spacing: 0.04em; + text-transform: uppercase; + color: var(--neon); + text-shadow: 0 0 8px color-mix(in srgb, var(--neon) 60%, transparent); +} +div.landing a { color: var(--cyan); } + +/* The pickers, as rows of arcade buttons. */ +div.landing .choose li button { + font-family: var(--pixel); + font-size: 0.55rem; + text-transform: uppercase; + border-radius: 0; + border: 2px solid var(--edge); + background: #0b0716; + color: #e9e4ff; +} +div.landing .choose li button.on { + background: #0b0716; + border-color: var(--neon); + box-shadow: 0 0 14px color-mix(in srgb, var(--neon) 55%, transparent); +} + +/* 1P START. */ +div.landing .choose .start { + font-family: var(--pixel); + font-weight: 400; + font-size: 0.85rem; + letter-spacing: 0.06em; + text-transform: uppercase; + color: #120a22; + background: var(--neon); + border-radius: 0; + padding: 14px 22px; + box-shadow: 0 0 22px color-mix(in srgb, var(--neon) 60%, transparent), inset 0 -4px 0 rgba(0, 0, 0, 0.25); +} +div.landing .choose .start::before { content: "▶ "; } +div.landing .choose .start:hover, +div.landing .choose .start:focus-visible { + box-shadow: 0 0 36px color-mix(in srgb, var(--neon) 85%, transparent), inset 0 -4px 0 rgba(0, 0, 0, 0.25); +} +div.landing .choose .start:hover::before { animation: arcade-blink 0.6s steps(1) infinite; } + +div.landing footer { border-top: 1px dashed var(--edge); } + +@keyframes arcade-blink { 50% { opacity: 0; } } +@keyframes arcade-flicker { + 0%, 18%, 22%, 25%, 53%, 57%, 100% { opacity: 1; } + 20%, 24%, 55% { opacity: 0.6; } +} +@media (prefers-reduced-motion: reduce) { + div.landing h1, .landing .choose .start:hover::before { animation: none; } +} diff --git a/src/assets/fonts/OFL-PressStart2P.txt b/src/assets/fonts/OFL-PressStart2P.txt new file mode 100644 index 0000000..22796df --- /dev/null +++ b/src/assets/fonts/OFL-PressStart2P.txt @@ -0,0 +1,93 @@ +Copyright 2012 The Press Start 2P Project Authors (cody@zone38.net), with Reserved Font Name "Press Start 2P". + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. \ No newline at end of file diff --git a/src/assets/fonts/PressStart2P-Regular.woff2 b/src/assets/fonts/PressStart2P-Regular.woff2 new file mode 100644 index 0000000..af51624 Binary files /dev/null and b/src/assets/fonts/PressStart2P-Regular.woff2 differ diff --git a/src/components/Landing.tsx b/src/components/Landing.tsx index fff55ac..1c4d703 100644 --- a/src/components/Landing.tsx +++ b/src/components/Landing.tsx @@ -1,6 +1,7 @@ import { COLOURS, POWER_NAMES } from './Board' import { LAST_YEAR } from '../game/game' import { POWERS, SOLO, type Power } from '../game/map' +import '../arcade.css' /** * The page before the map. @@ -25,6 +26,10 @@ export function Landing({ }) { return (
+

Great Powers