Website: the Blocks look, a blocky Minecraft-like design in Horizon's purple

horizon-theme gains the Blocks palettes (light and dark, WCAG AA on every panel and on the stone),
Pixelify Sans (OFL) and Pixelarticons (MIT); tokens.css now carries the Blocks colours, the pixel
font and the block edges. The site sets headings, navigation and buttons in Pixelify Sans, turns
the index lists into stacks of panels with an outline, a bevel and a lip, puts a stone texture
behind the page and Horizon's pixel landscape (a dawn or a sunset) behind the hero, both drawn in
code by scripts/art.mjs. Light and dark still follow the system, with the toggle.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Ludovic Marie
2026-10-22 19:29:41 +02:00
parent 022600481e
commit 70c06224fe
60 changed files with 1019 additions and 59 deletions
+131 -3
View File
@@ -1,8 +1,7 @@
/* Horizon's design language (docs/design-system.md), set as a page. The tokens come from
crates/horizon-theme through src/tokens.css, which build.mjs puts before this file: the
same palette, type, spacing and motion as the launcher and the game's menus. Type is the
interface; content is numbered index lists with one-pixel rules; one violet accent for the
main action, links and focus; space instead of borders; quiet motion. */
launcher's Blocks palettes, type, spacing and motion. The base below lays out the page; the
"Blocks" section at the end gives it the launcher's blocky, Minecraft-like look. */
@font-face { font-family: "Geist"; src: url("/fonts/Geist-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Geist"; src: url("/fonts/Geist-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@@ -499,3 +498,132 @@ figcaption span { font-family: var(--mono); font-size: var(--text-micro); letter
@media (pointer: coarse) {
.docs-nav li a, .docs-toc a, .docs-bar-title, .docs-bar-link { display: flex; align-items: center; min-height: 44px; }
}
/* --- Blocks: the launcher's look on the page (docs/design-system.md, "Blocks") -------------
Pixel type for headings and controls, square panels with a dark outline, a light bevel on top
and a darker lip below, the violet face for the main action, sunk wells, a stone texture
behind the page and Horizon's pixel landscape behind the hero. The art is drawn in code
(scripts/art.mjs, like launcher/src/art.rs); nothing in it comes from Minecraft. */
@font-face { font-family: "Pixelify Sans"; src: url("/fonts/PixelifySans-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Pixelify Sans"; src: url("/fonts/PixelifySans-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Pixelify Sans"; src: url("/fonts/PixelifySans-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
:root {
--stone: url("/media/stone-light.png");
--scene: url("/media/scene-light.png");
--sky: #8d7fd8;
--panel-edges: inset 0 var(--block-bevel) 0 var(--bevel), inset 0 calc(-1 * var(--block-bevel)) 0 var(--lip);
--radius: 0px; --radius-plate: 0px; --radius-pill: 0px;
}
:root[data-theme="dark"] { --stone: url("/media/stone-dark.png"); --scene: url("/media/scene-dark.png"); --sky: #0a0f2c; }
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) { --stone: url("/media/stone-dark.png"); --scene: url("/media/scene-dark.png"); --sky: #0a0f2c; }
}
/* The stone: 64 texels of the page colour in close shades, each texel 4 px. */
body { position: relative; isolation: isolate; }
body::before {
content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
background: var(--stone) 0 0 / 256px 256px repeat; image-rendering: pixelated;
}
/* Pixel type for what names and what you act on; paragraphs stay in Geist. */
.display, .title, .statement, .row-name, .card-title, .release-version, .release-tag, .count,
.fact h3, .features h3, .system h3, .contributors-title, .footer-disclaimer, .footer-word,
.nav-mark, .docs-prose h2, .docs-prose h3, .prose h2, .prose h3, .prose h4, .menu nav a {
font-family: var(--pixel); font-weight: 600; letter-spacing: 0;
}
.display, .count, .footer-word { font-weight: 700; }
.nav-mark { font-size: 18px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
code { border-radius: 0; background: var(--well); box-shadow: 0 0 0 1px var(--outline); }
/* Buttons: blocks with an outline, a bevel and a lip; they sink a pixel when pressed. */
.button {
border: var(--block-outline) solid var(--outline); border-radius: 0;
font: 500 var(--text-ui) / 1 var(--pixel);
box-shadow: inset 0 var(--block-bevel) 0 var(--button-bevel), inset 0 calc(-1 * var(--block-lip)) 0 var(--lip);
padding-bottom: 2px;
}
.button.large { font-size: 18px; }
.button.primary { background: var(--face); color: var(--on-face); box-shadow: inset 0 var(--block-bevel) 0 var(--face-bevel), inset 0 calc(-1 * var(--block-lip)) 0 var(--face-lip); }
.button.primary:hover { opacity: 1; filter: brightness(1.08); }
.button.secondary { background: var(--button); }
.button.secondary:hover { background: var(--button); filter: brightness(1.06); }
.button.ghost { border-color: transparent; box-shadow: none; }
.button:active { opacity: 1; transform: translateY(1px); box-shadow: inset 0 var(--block-bevel) 0 var(--lip); }
:focus-visible { border-radius: 0; }
/* The top bar: the sidebar colour with an outline under it, tabs with an accent underline. */
.nav.is-scrolled, .nav.is-menu { background: var(--side); -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: 0 var(--block-outline) 0 var(--outline); }
.nav-links a, .nav-github, .theme-toggle { border-radius: 0; font-family: var(--pixel); font-weight: 500; font-size: 15px; }
.nav-links a:hover, .nav-github:hover, .theme-toggle:hover { background: var(--raised); }
.nav-links a[aria-current] { background: var(--raised); box-shadow: inset 0 -3px 0 var(--accent); }
.theme-toggle { text-transform: none; letter-spacing: 0; }
.menu { background: var(--side); }
.menu nav a { border-bottom: 0; }
/* Lists become stacks of panels. */
.index, .systems, .contributors-list { border-top: 0; display: grid; gap: 8px; }
.row, .system, .release, .release:last-of-type, .contributor { border-bottom: 0; border-top: 0; }
.row > a, .row.card, .fact.row, .features li, .system, .release, .contributor, .docs-pager a {
background: var(--panel); border: var(--block-outline) solid var(--outline); box-shadow: var(--panel-edges);
border-radius: 0;
}
.row > a, .row.card, .fact.row, .features li, .system { padding-left: 20px; padding-right: 20px; }
.row > a::before, .row.card::before { display: none; }
.row > a:hover, .row.card:hover, .contributor:hover, .docs-pager a:hover { background: var(--raised); }
.row > a:hover .row-index { color: var(--accent); }
.row-name { font-size: clamp(20px, 2.2vw, 28px); }
.release { padding: 0 20px; }
.release + .release { margin-top: 8px; }
.release .prose { padding-left: 12rem; }
.contributor { padding: 12px 14px; }
.contributors-list { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.contributor-avatar { border-radius: 0; box-shadow: 0 0 0 2px var(--outline); image-rendering: pixelated; }
.release-latest { border-top: 0; padding: 28px; background: var(--panel); border: var(--block-outline) solid var(--outline); box-shadow: var(--panel-edges); }
.system.is-full .system-state { color: var(--success); }
/* Screenshots and the launcher's screens: square, outlined. */
.zoom, .screen, .lightbox, .prose pre, .docs-prose figure img { border-radius: 0; box-shadow: 0 0 0 var(--block-outline) var(--outline); }
.tabs { border-radius: 0; background: var(--well); box-shadow: 0 0 0 var(--block-outline) var(--outline); }
.tabs button { border-radius: 0; font-family: var(--pixel); font-weight: 500; font-size: 15px; }
.tabs button[aria-selected="true"] { color: var(--on-face); }
.tab-pill { border-radius: 0; background: var(--face); box-shadow: inset 0 var(--block-bevel) 0 var(--face-bevel), inset 0 calc(-1 * var(--block-bevel)) 0 var(--face-lip); }
/* The hero: Horizon's landscape under a veil of the page colour, the words on the left. */
.hero {
position: relative; isolation: isolate; overflow: hidden;
background: var(--scene) 70% 100% / clamp(1200px, 135vw, 2400px) auto no-repeat, var(--sky); image-rendering: pixelated;
border-bottom: var(--block-outline) solid var(--outline);
}
.hero::before {
content: ""; position: absolute; inset: 0; z-index: -1;
background:
linear-gradient(90deg, color-mix(in srgb, var(--page) 92%, transparent) 0%, color-mix(in srgb, var(--page) 78%, transparent) 45%, color-mix(in srgb, var(--page) 0%, transparent) 78%),
linear-gradient(180deg, color-mix(in srgb, var(--page) 0%, transparent) 55%, color-mix(in srgb, var(--page) 70%, transparent) 100%);
}
.hero .kicker span, .hero .kicker { color: var(--ink-soft); }
.hero .lede { color: var(--ink-soft); }
.hero { padding-bottom: clamp(160px, 18vw, 280px); }
.hero-after { padding-top: 40px; }
.hero-after .hero-index { margin-top: 0; max-width: 860px; }
.hero-after .disclaimer { margin-top: 24px; }
@media (max-width: 900px) {
.hero::before { background: color-mix(in srgb, var(--page) 84%, transparent); }
}
/* Documentation. */
.docs-bar { background: var(--side); -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: 0 var(--block-outline) 0 var(--outline); }
.docs-nav li a { border-radius: 0; }
.docs-nav li a[aria-current] { background: var(--raised); box-shadow: inset 4px 0 0 var(--accent); }
.docs-toc a { border-radius: 0; background: var(--button); box-shadow: 0 0 0 var(--block-outline) var(--outline); }
.docs-pager a { box-shadow: var(--panel-edges); }
.docs-prose h2 { border-top: var(--block-outline) solid var(--outline); }
.docs-prose blockquote { border-left: 4px solid var(--accent); background: var(--panel); padding: 10px 16px; box-shadow: 0 0 0 var(--block-outline) var(--outline); }
/* The footer: the giant wordmark in pixels. */
.footer { background: var(--side); border-top: var(--block-outline) solid var(--outline); margin-top: 48px; }
.footer-word { color: var(--raised); letter-spacing: 0.02em; }
:root[data-theme="dark"] .footer-word { color: var(--panel); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .footer-word { color: var(--panel); } }