diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..7fa7114 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,100 @@ +name: release + +# On a v* tag, pushes every theme version that is not published yet to +# ghcr.io/gameplanepanel/gameplane-themes/: and signs it with +# the project cosign key (the same key pair as the official modules; the public +# half is signing/cosign.pub in GameplanePanel/Gameplane). A theme whose +# version is already published is left alone: change the theme, bump its +# version in theme.yaml, then tag. +# +# Needs in this repository: the `release-signing` environment with the secrets +# COSIGN_PRIVATE_KEY and COSIGN_PASSWORD. + +on: + push: + tags: + - "v*" + +permissions: + contents: read + +concurrency: + group: release + cancel-in-progress: false + +env: + GAMEPLANE_REF: 380e2718d1859e68e2d7b9a476b2f64557764860 # master + +jobs: + themes: + name: push & sign theme packages + runs-on: ubuntu-latest + timeout-minutes: 20 + permissions: + contents: read + packages: write + environment: release-signing + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + + # Signing is mandatory: fail rather than publish unsigned themes. + - name: require signing key + env: + COSIGN_PRIVATE_KEY: ${{ secrets.COSIGN_PRIVATE_KEY }} + run: | + if [ -z "$COSIGN_PRIVATE_KEY" ]; then + echo "::error::COSIGN_PRIVATE_KEY is required for official theme publishing" + exit 1 + fi + + - name: check out Gameplane (gp-module source) + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + repository: GameplanePanel/Gameplane + ref: ${{ env.GAMEPLANE_REF }} + path: .gameplane + persist-credentials: false + + - uses: actions/setup-go@d8cbb8045d7f43706b9177cceb36c1f91a6644d5 # v7.1.0 + with: + go-version-file: .gameplane/gp-module/go.mod + cache-dependency-path: .gameplane/gp-module/go.sum + + - name: build gp-module + run: | + cd .gameplane/gp-module + GOWORK=off go build -o "$RUNNER_TEMP/gp-module" ./cmd/gp-module + + - name: install oras + uses: oras-project/setup-oras@ac735097e22fe643015b0d19645f7c9a69942128 # v2.0.4 + + - name: install cosign + uses: sigstore/cosign-installer@881c63bd87e38389154debd8331404ce7ca8a3ab # v4.1.4 + with: + cosign-release: 'v3.1.2' + + - name: refresh sigstore trust root + run: cosign initialize + + - name: login to registry + uses: docker/login-action@8aa5831fb8d48d8f76594c7ddde61ae58019f550 # v4.8.0 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + # --tlog-upload records each signature in the public Rekor transparency + # log, as the module release does. + - name: push & sign themes + env: + COSIGN_PRIVATE_KEY: ${{ secrets.COSIGN_PRIVATE_KEY }} + COSIGN_PASSWORD: ${{ secrets.COSIGN_PASSWORD }} + GP_MODULE: ${{ runner.temp }}/gp-module + REPOSITORY_OWNER: ${{ github.repository_owner }} + run: | + owner_lc="$(echo "$REPOSITORY_OWNER" | tr '[:upper:]' '[:lower:]')" + ./build.sh push \ + --registry "ghcr.io/${owner_lc}/gameplane-themes" \ + --sign --tlog-upload --skip-existing diff --git a/.github/workflows/validate.yaml b/.github/workflows/validate.yaml new file mode 100644 index 0000000..578126d --- /dev/null +++ b/.github/workflows/validate.yaml @@ -0,0 +1,55 @@ +name: validate themes + +# Runs every theme folder through `gp-module theme validate` (the same rules +# the panel applies when it indexes and installs a theme), on every pull +# request and on pushes to master. gp-module is built from the pinned +# GameplanePanel/Gameplane commit below; bump GAMEPLANE_REF when the theme +# package rules change there. + +on: + pull_request: + push: + branches: [master] + +permissions: + contents: read + +concurrency: + group: validate-${{ github.ref }} + cancel-in-progress: true + +env: + GAMEPLANE_REF: 380e2718d1859e68e2d7b9a476b2f64557764860 # master + +jobs: + validate: + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + + - name: check out Gameplane (gp-module source) + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + repository: GameplanePanel/Gameplane + ref: ${{ env.GAMEPLANE_REF }} + path: .gameplane + persist-credentials: false + + - uses: actions/setup-go@d8cbb8045d7f43706b9177cceb36c1f91a6644d5 # v7.1.0 + with: + go-version-file: .gameplane/gp-module/go.mod + cache-dependency-path: .gameplane/gp-module/go.sum + + - name: build gp-module + run: | + cd .gameplane/gp-module + GOWORK=off go build -o "$RUNNER_TEMP/gp-module" ./cmd/gp-module + + - name: check build.sh syntax + run: bash -n build.sh + + - name: validate every theme + run: GP_MODULE="$RUNNER_TEMP/gp-module" ./build.sh validate diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6990464 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.gameplane/ +node_modules/ diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..1837617 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,21 @@ +# themes — AI assistant guide + +This repository holds the official themes of the [GameplanePanel/Gameplane](https://github.com/GameplanePanel/Gameplane) theme marketplace (spec 043 there). It is content only: one folder per theme, no application code. Default branch: `master`. What a theme package is and how to work on one: [`README.md`](README.md). + +## How it fits into Gameplane + +- **Package rules live in Gameplane:** `specs/043-theme-marketplace/contracts/theme-package.md`, enforced by the `themepkg` module and the `gp-module theme` commands. Nothing here re-implements them. +- **CI** is `.github/workflows/validate.yaml`: it builds `gp-module` from the Gameplane commit pinned in `GAMEPLANE_REF` and runs `./build.sh validate`. Bump the pin (in both workflows) when the package rules change. +- **Release** is `.github/workflows/release.yaml`: a `v*` tag pushes every unpublished theme version to `ghcr.io/gameplanepanel/gameplane-themes/:` and signs it with the project cosign key (the module key pair). Sessions cannot push tags: the maintainer tags. +- **The list of official themes ships in the Gameplane chart** (`themes.officialSource.themes`). A new theme needs a Gameplane PR that adds its name there, with a `changelog/unreleased/` entry. + +## Rules + +Gameplane's [`AGENTS.md`](https://github.com/GameplanePanel/Gameplane/blob/master/AGENTS.md) core rules apply here. The ones that matter most in this repository: + +- **Validate, never bypass:** every theme passes `./build.sh validate`. Fix the theme; never loosen the check or skip a theme. +- **A published version is immutable:** any change to a released theme bumps `version` in its `theme.yaml` and adds a `changelog` line. +- **Folder name = `name` in `theme.yaml`.** No file other than `theme.yaml`, `theme.css` and `previews/{light,dark}.{png,webp}` in a theme folder. +- **Previews are real:** regenerate them with `hack/capture-previews.ts` after any token or CSS change; never hand-edit or reuse another theme's preview. +- **No remote content in `theme.css`:** no `@import`, no remote `url()`, no fonts fetched from the network. +- **Git:** signed commits (`git commit -s`), conventional prefixes (`feat:`, `fix:`, `chore:`, `docs:` …), one branch per unit of work, never amend pushed commits; delete the branch after merge. diff --git a/CLAUDE.md b/CLAUDE.md new file mode 120000 index 0000000..47dc3e3 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1 @@ +AGENTS.md \ No newline at end of file diff --git a/README.md b/README.md index 20db306..e7dd3ea 100644 --- a/README.md +++ b/README.md @@ -1 +1,97 @@ -# themes \ No newline at end of file +# Gameplane official themes + +The official themes of the [Gameplane](https://github.com/GameplanePanel/Gameplane) theme marketplace. Every Gameplane install lists them in the **Theme catalog** (Settings → Theme), from the built-in `official` source (`ghcr.io/gameplanepanel/gameplane-themes`). + +A theme is one folder: + +``` +/ + theme.yaml name, version, author, license, and the 14 color tokens per mode + theme.css optional extra CSS (sanitized: no @import, no remote url()) + previews/light.png one preview per mode that has tokens (PNG or WebP, + previews/dark.png at most 1600x1000 px and 512 KiB) +``` + +The package rules live in Gameplane: [`contracts/theme-package.md`](https://github.com/GameplanePanel/Gameplane/blob/master/specs/043-theme-marketplace/contracts/theme-package.md). The same validator runs here in CI, in the panel when it indexes a source, and again at install. + +## Themes + +| Theme | What it does | +|---|---| +| [Arcade Neon](arcade-neon/) | Electric violet with a cyan focus ring, in both modes. | +| [Arctic Blue](arctic-blue/) | Cool slate surfaces and glacial blue. | +| [Blueprint Board](blueprint-board/) | Drafting grid, ruled panels, and dashed focus rings. | +| [Brutalist](brutalist/) | Square corners, 2px borders, hard offset shadows. | +| [Catppuccin](catppuccin/) | Catppuccin Latte in light mode and Mocha in dark mode. | +| [Compact Density](compact-density/) | Scales the whole interface down through the root font size. No color changes. | +| [Cyberpunk Neon](cyberpunk-neon/) | Neon magenta and cyan on near-black, with a restrained glow in dark mode. | +| [Dashboard Bento](dashboard-bento/) | Asymmetric 12-column layout for metrics and fleet panels. | +| [Deep Ocean](deep-ocean/) | Midnight blue surfaces and sea-glass teal. | +| [Dracula](dracula/) | Dracula in dark mode and a lightened paper variant in light mode. | +| [Elegant Serif](elegant-serif/) | Serif body text, no color changes. | +| [Ember Forge](ember-forge/) | Charcoal, kiln orange, and squared corners. | +| [Flat Workbench](flat-workbench/) | Removes card boxes and organizes content with dividers. | +| [Forest Camp](forest-camp/) | Pine, fern, and natural warmth. | +| [Glass Observatory](glass-observatory/) | Translucent panels, blur, and atmospheric light. | +| [Gruvbox](gruvbox/) | Gruvbox warm retro colors in both modes. | +| [High Contrast Focus](high-contrast-focus/) | Stronger borders and muted text, a global focus ring, and underlined content links. | +| [Kinetic Hover](kinetic-hover/) | Responsive hover and press feedback with reduced-motion support. | +| [Large Type](large-type/) | Scales the whole interface up through the root font size. No color changes. | +| [Lavender Dream](lavender-dream/) | Lilac surfaces, violet controls, and generous corners. | +| [No Motion](no-motion/) | Turns off nearly all transitions and animations across the app. | +| [Nord](nord/) | Nord: Snow Storm in light mode and Polar Night in dark mode. | +| [Ocean Deep](ocean-deep/) | Dark-first abyssal navy with a cyan accent. | +| [Paper Map](paper-map/) | Parchment surfaces, ink, and compact corners. | +| [Pastel Sakura](pastel-sakura/) | Light-first soft cherry-blossom pastel. | +| [Phosphor Terminal](phosphor-terminal/) | Green-phosphor CRT: green palette, monospace type, square corners, scanlines and glow. | +| [Rounded Playful](rounded-playful/) | Maximum roundness: pill buttons and 20px cards. No color changes. | +| [Sepia Paper](sepia-paper/) | Warm e-reader paper tones. | +| [Sidebar Right](sidebar-right/) | Moves the desktop sidebar to the right edge. No color changes. | +| [Soft 3D Controls](soft-3d-controls/) | Raised cards, inset fields, and tactile button presses. | +| [Solarized](solarized/) | The Solarized palette in both modes. | +| [Terminal Green](terminal-green/) | Phosphor green, monospace, and compact corners. | +| [Top Nav Blue](top-nav-blue/) | Moves the desktop sidebar into a horizontal bar above the header, with a blue accent. | + +Every theme ships light and dark tokens. The themes that only change layout, shape, type or motion keep the Modern Pink colors. + +## Work on a theme + +You need `gp-module`, built from a Gameplane checkout: + +```sh +cd /gp-module && go build -o ~/bin/gp-module ./cmd/gp-module +``` + +Then, from this repository: + +```sh +gp-module theme init my-theme --light --dark # scaffold a new theme +gp-module theme preview my-theme # local sample page, nothing is published +./build.sh validate --name my-theme # every package rule +./build.sh validate # every theme +``` + +Previews are screenshots of the real dashboard with the theme applied. `hack/capture-previews.ts` starts the dashboard in mock mode (no cluster needed) and writes `previews/light.png` and `previews/dark.png`: + +```sh +(cd /web && npm ci) +node hack/capture-previews.ts --web /web my-theme +``` + +Changing a published theme means bumping `version` in its `theme.yaml`: a published version is never overwritten. Add a line to `changelog` in `theme.yaml` to say what changed. + +## Release + +A `v*` tag runs `.github/workflows/release.yaml`. It pushes every theme version that is not published yet to `ghcr.io/gameplanepanel/gameplane-themes/:` and signs it with the project cosign key, the same key pair as the official modules (public half: [`signing/cosign.pub`](https://github.com/GameplanePanel/Gameplane/blob/master/signing/cosign.pub)). + +The panel indexes the theme names listed in the Gameplane chart (`themes.officialSource.themes` in `charts/gameplane/values.yaml`). A new theme shows up in installs once its name is added there. + +To push to your own registry: + +```sh +./build.sh push --registry localhost:5001/themes --plain-http +``` + +## License + +The themes are licensed under AGPL-3.0-only, like Gameplane. Catppuccin, Dracula, Gruvbox, Nord and Solarized follow the color palettes of those projects. diff --git a/arcade-neon/previews/dark.png b/arcade-neon/previews/dark.png new file mode 100644 index 0000000..2db756e Binary files /dev/null and b/arcade-neon/previews/dark.png differ diff --git a/arcade-neon/previews/light.png b/arcade-neon/previews/light.png new file mode 100644 index 0000000..fe8b5fd Binary files /dev/null and b/arcade-neon/previews/light.png differ diff --git a/arcade-neon/theme.css b/arcade-neon/theme.css new file mode 100644 index 0000000..78f4247 --- /dev/null +++ b/arcade-neon/theme.css @@ -0,0 +1,57 @@ +/* Arcade Neon: official Gameplane theme. */ +html.dark[data-theme][data-theme-preset][data-theme-type] { + --background: #100b1d; + --foreground: #f6edff; + --surface: #1b1030; + --surface-secondary: #160d27; + --surface-tertiary: #24143a; + --overlay: #281740; + --accent: #e879f9; + --accent-foreground: #21072b; + --accent-soft: #3a1550; + --accent-soft-foreground: #f0abfc; + --default: #291b3b; + --default-foreground: #f6edff; + --border: #4b2862; + --separator: #352047; + --muted: #b8a3cb; + --field-background: #160d27; + --field-border: #59316f; + --field-foreground: #fff7ff; + --field-placeholder: #a68bbd; + --focus: #22d3ee; + --link: #67e8f9; + --radius: 12px; + --radius-md: var(--radius); + --radius-lg: calc(var(--radius) + 2px); + --field-radius: 8px; +} +html.light[data-theme][data-theme-preset][data-theme-type] { + --background: #faf5ff; + --foreground: #271033; + --surface: #fffaff; + --surface-secondary: #f5eafd; + --surface-tertiary: #eeddf8; + --overlay: #fffaff; + --accent: #a21caf; + --accent-foreground: #fff; + --accent-soft: #f5d0fe; + --accent-soft-foreground: #701a75; + --default: #f1e5f7; + --default-foreground: #341143; + --border: #ddc4eb; + --separator: #e9d9f1; + --muted: #70567c; + --field-background: #fffaff; + --field-border: #d5b5e3; + --field-foreground: #271033; + --field-placeholder: #80678b; + --focus: #a21caf; + --link: #86198f; +} + +/* Cyan focus gives the neon accent a second, arcade-like signal. */ +html.dark[data-theme][data-theme-preset][data-theme-type] :focus-visible { + outline: 2px solid #22d3ee; + outline-offset: 2px; +} diff --git a/arcade-neon/theme.yaml b/arcade-neon/theme.yaml new file mode 100644 index 0000000..f220d3a --- /dev/null +++ b/arcade-neon/theme.yaml @@ -0,0 +1,41 @@ +# Theme package. Run `gp-module theme validate ` after editing. +apiVersion: gameplane.local/theme/v1 +name: arcade-neon +version: 1.0.0 +displayName: Arcade Neon +author: Gameplane +description: "Electric violet with a cyan focus ring, in both modes." +tags: [palette, light, dark] +license: AGPL-3.0-only +homepage: https://github.com/GameplanePanel/themes +tokens: + light: + background: "#faf5ff" + foreground: "#271033" + surface: "#fffaff" + surface-secondary: "#f5eafd" + surface-tertiary: "#eeddf8" + overlay: "#fffaff" + accent: "#a21caf" + accent-foreground: "#ffffff" + accent-soft: "#f5d0fe" + accent-soft-foreground: "#701a75" + muted: "#70567c" + border: "#ddc4eb" + focus: "#a21caf" + link: "#86198f" + dark: + background: "#100b1d" + foreground: "#f6edff" + surface: "#1b1030" + surface-secondary: "#160d27" + surface-tertiary: "#24143a" + overlay: "#281740" + accent: "#e879f9" + accent-foreground: "#21072b" + accent-soft: "#3a1550" + accent-soft-foreground: "#f0abfc" + muted: "#b8a3cb" + border: "#4b2862" + focus: "#22d3ee" + link: "#67e8f9" diff --git a/arctic-blue/previews/dark.png b/arctic-blue/previews/dark.png new file mode 100644 index 0000000..0ef2f42 Binary files /dev/null and b/arctic-blue/previews/dark.png differ diff --git a/arctic-blue/previews/light.png b/arctic-blue/previews/light.png new file mode 100644 index 0000000..8fe1c4b Binary files /dev/null and b/arctic-blue/previews/light.png differ diff --git a/arctic-blue/theme.css b/arctic-blue/theme.css new file mode 100644 index 0000000..a21a652 --- /dev/null +++ b/arctic-blue/theme.css @@ -0,0 +1,51 @@ +/* Arctic Blue: official Gameplane theme. */ +html.dark[data-theme][data-theme-preset][data-theme-type] { + --background: #101821; + --foreground: #edf5fc; + --surface: #182430; + --surface-secondary: #131e29; + --surface-tertiary: #202e3c; + --overlay: #293b4b; + --accent: #7dc8ff; + --accent-foreground: #09243a; + --accent-soft: #203d54; + --accent-soft-foreground: #a6dcff; + --default: #263543; + --default-foreground: #edf5fc; + --border: #3a5062; + --separator: #2a3b4a; + --muted: #adbfcd; + --field-background: #131e29; + --field-border: #425a6d; + --field-foreground: #f6fbff; + --field-placeholder: #879cab; + --focus: #8bd4ff; + --link: #91d5ff; + --radius: 10px; + --radius-md: var(--radius); + --radius-lg: calc(var(--radius) + 2px); + --field-radius: 5px; +} +html.light[data-theme][data-theme-preset][data-theme-type] { + --background: #f1f6fa; + --foreground: #1d3040; + --surface: #fbfdff; + --surface-secondary: #eaf1f6; + --surface-tertiary: #dce7ef; + --overlay: #fbfdff; + --accent: #176ba0; + --accent-foreground: #fff; + --accent-soft: #d2ecfb; + --accent-soft-foreground: #15557d; + --default: #e5edf3; + --default-foreground: #23394a; + --border: #c4d4df; + --separator: #d8e3eb; + --muted: #5b7180; + --field-background: #fff; + --field-border: #bfd0dc; + --field-foreground: #1d3040; + --field-placeholder: #687f8e; + --focus: #176ba0; + --link: #155e8e; +} diff --git a/arctic-blue/theme.yaml b/arctic-blue/theme.yaml new file mode 100644 index 0000000..2bacd1f --- /dev/null +++ b/arctic-blue/theme.yaml @@ -0,0 +1,41 @@ +# Theme package. Run `gp-module theme validate ` after editing. +apiVersion: gameplane.local/theme/v1 +name: arctic-blue +version: 1.0.0 +displayName: Arctic Blue +author: Gameplane +description: "Cool slate surfaces and glacial blue." +tags: [palette, light, dark] +license: AGPL-3.0-only +homepage: https://github.com/GameplanePanel/themes +tokens: + light: + background: "#f1f6fa" + foreground: "#1d3040" + surface: "#fbfdff" + surface-secondary: "#eaf1f6" + surface-tertiary: "#dce7ef" + overlay: "#fbfdff" + accent: "#176ba0" + accent-foreground: "#ffffff" + accent-soft: "#d2ecfb" + accent-soft-foreground: "#15557d" + muted: "#5b7180" + border: "#c4d4df" + focus: "#176ba0" + link: "#155e8e" + dark: + background: "#101821" + foreground: "#edf5fc" + surface: "#182430" + surface-secondary: "#131e29" + surface-tertiary: "#202e3c" + overlay: "#293b4b" + accent: "#7dc8ff" + accent-foreground: "#09243a" + accent-soft: "#203d54" + accent-soft-foreground: "#a6dcff" + muted: "#adbfcd" + border: "#3a5062" + focus: "#8bd4ff" + link: "#91d5ff" diff --git a/blueprint-board/previews/dark.png b/blueprint-board/previews/dark.png new file mode 100644 index 0000000..a3f8e1e Binary files /dev/null and b/blueprint-board/previews/dark.png differ diff --git a/blueprint-board/previews/light.png b/blueprint-board/previews/light.png new file mode 100644 index 0000000..72399c3 Binary files /dev/null and b/blueprint-board/previews/light.png differ diff --git a/blueprint-board/theme.css b/blueprint-board/theme.css new file mode 100644 index 0000000..012ee52 --- /dev/null +++ b/blueprint-board/theme.css @@ -0,0 +1,24 @@ +/* Blueprint Board: official Gameplane theme. */ +main { + background-image: + linear-gradient(color-mix(in srgb, var(--border) 19%, transparent) 1px, transparent 1px), + linear-gradient(90deg, color-mix(in srgb, var(--border) 19%, transparent) 1px, transparent 1px) !important; + background-size: 28px 28px; + background-attachment: fixed; +} + +main .card { + border-radius: 3px !important; + box-shadow: 5px 5px 0 color-mix(in srgb, var(--foreground) 8%, transparent); +} + +main .card h2, +main .card h3 { + padding-bottom: 0.65rem; + border-bottom: 1px dashed var(--border); +} + +main :is(button, a):focus-visible { + outline: 2px dashed var(--focus); + outline-offset: 3px; +} diff --git a/blueprint-board/theme.yaml b/blueprint-board/theme.yaml new file mode 100644 index 0000000..f12a7a6 --- /dev/null +++ b/blueprint-board/theme.yaml @@ -0,0 +1,41 @@ +# Theme package. Run `gp-module theme validate ` after editing. +apiVersion: gameplane.local/theme/v1 +name: blueprint-board +version: 1.0.0 +displayName: Blueprint Board +author: Gameplane +description: "Drafting grid, ruled panels, and dashed focus rings." +tags: [treatment, light, dark] +license: AGPL-3.0-only +homepage: https://github.com/GameplanePanel/themes +tokens: + light: + background: "#ffffff" + foreground: "#2a0f1e" + surface: "#fff7fb" + surface-secondary: "#f8dde9" + surface-tertiary: "#f8dde9" + overlay: "#fff7fb" + accent: "#db2777" + accent-foreground: "#ffffff" + accent-soft: "#ffffff" + accent-soft-foreground: "#be185d" + muted: "#6e5262" + border: "#efc3d6" + focus: "#db2777" + link: "#2563eb" + dark: + background: "#121114" + foreground: "#f5f3f7" + surface: "#1c1a20" + surface-secondary: "#17151a" + surface-tertiary: "#141317" + overlay: "#201e24" + accent: "#ff4fa3" + accent-foreground: "#ffffff" + accent-soft: "#331525" + accent-soft-foreground: "#ff8ac4" + muted: "#9e98a6" + border: "#2c2932" + focus: "#ff4fa3" + link: "#7db4ff" diff --git a/brutalist/previews/dark.png b/brutalist/previews/dark.png new file mode 100644 index 0000000..b6875f4 Binary files /dev/null and b/brutalist/previews/dark.png differ diff --git a/brutalist/previews/light.png b/brutalist/previews/light.png new file mode 100644 index 0000000..eef4053 Binary files /dev/null and b/brutalist/previews/light.png differ diff --git a/brutalist/theme.css b/brutalist/theme.css new file mode 100644 index 0000000..8ec8797 --- /dev/null +++ b/brutalist/theme.css @@ -0,0 +1,178 @@ +/* Brutalist: official Gameplane theme. */ +/* ---------------------------------------------------------------- */ +/* 1. Stronger structure tokens — border & separator, both modes */ +/* ---------------------------------------------------------------- */ + +/* Only the two structure tokens are touched. Values are picked against + the app backgrounds (light #FFFFFF, dark #121114) to clear the 3:1 + WCAG non-text contrast floor for component boundaries with room to + spare — ratios noted per line. `!important` is required because these + blocks must outrank the app's own preset token blocks, the + higher-specificity legacy-preset variants restated below, and the + never-`!important` Custom Colors injection. */ +:root, +.light { + --border: #374151 !important; /* gray-700 — ~10.5:1 on white */ + --separator: #6b7280 !important; /* gray-500 — ~4.8:1 on white */ +} +.dark { + --border: #d1d5db !important; /* gray-300 — ~11:1 on #121114 */ + --separator: #6b7280 !important; /* gray-500 — ~3.9:1 on #121114 */ +} + +/* Legacy preset variants redeclare these tokens with an extra attribute + selector that outranks the plain class selectors above — restate the + same values so the overlay wins there too (same pattern as the + high-contrast-focus example). */ +.light[data-theme-preset="legacy"], +[data-theme="light"][data-theme-preset="legacy"] { + --border: #374151 !important; + --separator: #6b7280 !important; +} +.dark[data-theme-preset="legacy"], +[data-theme="dark"][data-theme-preset="legacy"] { + --border: #d1d5db !important; + --separator: #6b7280 !important; +} + +/* ---------------------------------------------------------------- */ +/* 2. Shape tokens — rebind the whole radius scale to 2px */ +/* ---------------------------------------------------------------- */ + +/* The app pins per-family radii at the component selector (6px buttons, + 12px cards/dialogs, 999px tab pills), so rebinding --radius alone + does nothing for those families — section 3 repins them. But every + other consumer of the scale (and any component added later) should + stay square too, so the whole scale drops to 2px here. */ +:root, +.light, +.dark { + --radius: 2px !important; + --field-radius: 2px !important; + --radius-md: 2px !important; + --radius-lg: 2px !important; +} + +/* ---------------------------------------------------------------- */ +/* 3. Square corners — repinned per component family */ +/* ---------------------------------------------------------------- */ + +/* Repin every family the app rounds: .button:not(.rounded-full), + .tabs__tab/.tabs__indicator/.menu-item/.list-box-item/.select__trigger + (6px), .chip (4px), .card/.modal__dialog (12px), .dropdown__popover + (8px), .tabs__list (999px), .table-root--primary (12px). The + `!important` is needed because some pins carry a more specific + selector than a single class can match (.modal__dialog .input at + 0,2,0, .card[data-danger-zone] at 0,2,0) — an !important declaration + beats any non-important one regardless of specificity — and so the + .rounded-full pill CTAs ("Sign in", "Create server") square off + against HeroUI's pill styles outright. */ +.button:not(.rounded-full), +.button.rounded-full, /* the pill CTAs go square too — no pills here */ +.chip:not(.rounded-full), +.chip.rounded-full, +.card, +.card[data-danger-zone], /* keeps its red stroke, loses its 6px corners */ +.modal__dialog, +.alert-dialog__dialog, /* confirm dialogs share the dialog family */ +.dropdown__popover, +.tabs__list, +.tabs__tab, +.tabs__indicator, +.menu-item, +.list-box-item, +.input, /* also covers .modal__dialog .input via !important */ +.select__trigger, +.table-root--primary { + border-radius: 2px !important; +} + +/* ---------------------------------------------------------------- */ +/* 4. Thick 2px borders on every component family */ +/* ---------------------------------------------------------------- */ + +/* No `!important` needed here: the app's own border declarations live + at component selectors with the same or lower specificity and are + unlayered like this overlay, so being appended last in wins + the tie; HeroUI's defaults sit inside @layer components and lose to + any unlayered rule. Note the color switches from --field-border to + --border — fields join the same heavy-stroke system as everything + else. Danger cards keep their semantic red stroke (a more specific + rule, deliberately left alone). */ +.card, +.button, /* every variant: primary, secondary, outline, ghost, ... */ +.input, +.select__trigger, +.chip, +.modal__dialog, +.alert-dialog__dialog, +.dropdown__popover, +.tabs__list, +.table-root--primary { + border: 2px solid var(--border); +} + +/* Dialogs normally draw their stroke as a 1px inner outline (outline + with -1px offset, per globals.css, so content does not move and + HeroUI's elevation shadow is untouched). With a real 2px border that + inner line would double the stroke — restate it at 2px/-2px so it + lands exactly on the new border and keeps the no-layout-shift trick. */ +.modal__dialog, +.alert-dialog__dialog { + outline: 2px solid var(--border); + outline-offset: -2px; +} + +/* ---------------------------------------------------------------- */ +/* 5. Hard offset shadows — light mode (solid black ink) */ +/* ---------------------------------------------------------------- */ + +/* box-shadow with ZERO blur: 4px right, 4px down — the classic + print/poster offset. These replace HeroUI's soft elevation shadows + (layered component styles, so unlayered rules win the tie). Light + mode is the app's default state, so these are unscoped; dark mode + overrides them in section 6. WARNING: offset shadows extend 4px + right and 4px below the element box — content flush against a + viewport edge or inside an overflow-hidden container will clip them. + Static paint: no animation, so prefers-reduced-motion loses nothing. */ +.card, +.modal__dialog, +.alert-dialog__dialog, +.dropdown__popover, +.button[data-variant="primary"] { + box-shadow: 4px 4px 0 #000000; +} + +/* ---------------------------------------------------------------- */ +/* 6. Hard offset shadows — dark mode (white / accent-tinted ink) */ +/* ---------------------------------------------------------------- */ + +/* On the near-black dark background (#121114) a black shadow would be + invisible, so the ink flips to white for the surface components. + Primary buttons get the accent color instead: it is whatever the + active preset or Custom Colors pick says (untouched by this theme), + so the button shadow stays in-palette. With a very light accent the + primary shadow reads as a color halo rather than a cast shadow — + that is intentional. */ +.dark .card, +.dark .modal__dialog, +.dark .alert-dialog__dialog, +.dark .dropdown__popover { + box-shadow: 4px 4px 0 #ffffff; +} +.dark .button[data-variant="primary"] { + box-shadow: 4px 4px 0 var(--accent); +} + +/* ---------------------------------------------------------------- */ +/* 7. Button voice — uppercase, tracked out */ +/* ---------------------------------------------------------------- */ + +/* The brutalist poster look: every button label goes uppercase with a + slight tracking increase. Scoped to .button (HeroUI's stable class, + which also covers router s styled via buttonVariants) so table + headers, chips, and nav labels are unaffected. */ +.button { + letter-spacing: 0.05em; + text-transform: uppercase; +} diff --git a/brutalist/theme.yaml b/brutalist/theme.yaml new file mode 100644 index 0000000..33204c9 --- /dev/null +++ b/brutalist/theme.yaml @@ -0,0 +1,41 @@ +# Theme package. Run `gp-module theme validate ` after editing. +apiVersion: gameplane.local/theme/v1 +name: brutalist +version: 1.0.0 +displayName: Brutalist +author: Gameplane +description: "Square corners, 2px borders, hard offset shadows." +tags: [shape, light, dark] +license: AGPL-3.0-only +homepage: https://github.com/GameplanePanel/themes +tokens: + light: + background: "#ffffff" + foreground: "#2a0f1e" + surface: "#fff7fb" + surface-secondary: "#f8dde9" + surface-tertiary: "#f8dde9" + overlay: "#fff7fb" + accent: "#db2777" + accent-foreground: "#ffffff" + accent-soft: "#ffffff" + accent-soft-foreground: "#be185d" + muted: "#6e5262" + border: "#374151" + focus: "#db2777" + link: "#2563eb" + dark: + background: "#121114" + foreground: "#f5f3f7" + surface: "#1c1a20" + surface-secondary: "#17151a" + surface-tertiary: "#141317" + overlay: "#201e24" + accent: "#ff4fa3" + accent-foreground: "#ffffff" + accent-soft: "#331525" + accent-soft-foreground: "#ff8ac4" + muted: "#9e98a6" + border: "#d1d5db" + focus: "#ff4fa3" + link: "#7db4ff" diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..1b2d66b --- /dev/null +++ b/build.sh @@ -0,0 +1,201 @@ +#!/usr/bin/env bash +# build.sh — validate, push and sign Gameplane theme packages. +# +# Each theme lives in /{theme.yaml, theme.css, previews/}. This script +# wraps `gp-module theme validate` and `gp-module theme package --push`, so a +# theme reaches a registry only after it passes every package rule. +# +# Usage: +# ./build.sh validate # every theme +# ./build.sh validate --name nord +# ./build.sh push --registry ghcr.io/gameplanepanel/gameplane-themes +# ./build.sh push --registry localhost:5001/themes --name nord --plain-http +# ./build.sh push --registry $REG --sign --tlog-upload --skip-existing # official release +# +# A theme is pushed to /:, the version read from its +# theme.yaml. +# +# Required: gp-module in PATH (or GP_MODULE=/path/to/gp-module), built from +# GameplanePanel/Gameplane (go build ./gp-module/cmd/gp-module). +# For push: oras >= 1.2.0 (https://oras.land/docs/installation) +# For --sign: cosign >= 2.0 (https://docs.sigstore.dev/cosign/installation) +# Signing stays on cosign's classic signature format +# (--new-bundle-format=false --use-signing-config=false) because that is the +# format the panel's keyed verifier reads. It is the same key pair and the +# same flags as the official modules. + +set -euo pipefail + +GP_MODULE="${GP_MODULE:-gp-module}" + +usage() { + cat < [flags] + +Commands: + validate Run every theme package rule; no registry needed + push Validate, then push each theme to /: + +Flags: + --name Only this theme (default: every folder with a theme.yaml) + --registry Registry prefix, e.g. ghcr.io/gameplanepanel/gameplane-themes [push, required] + --plain-http Use plain HTTP (for local registries) [push] + --skip-existing Leave a theme alone when /: is already + published, so a release only pushes new versions [push] + --sign cosign-sign each pushed theme by its manifest digest [push] + --tlog-upload With --sign, also record the signature in the public Rekor + transparency log (for official releases) [push] + +With --sign, set COSIGN_PRIVATE_KEY to the PEM private key (and COSIGN_PASSWORD +if it is encrypted). Without --tlog-upload the signature is offline, which the +panel verifies with the source's public key. +USAGE +} + +cmd="${1:-}" +shift || true +case "$cmd" in + validate|push) ;; + ""|-h|--help) usage; exit 0 ;; + *) echo "unknown command: $cmd" >&2; usage; exit 2 ;; +esac + +REGISTRY="" +TARGET="" +PLAIN_HTTP=0 +SKIP_EXISTING=0 +SIGN=0 +TLOG_UPLOAD=0 + +while [[ $# -gt 0 ]]; do + case "$1" in + --registry) + [[ $# -ge 2 ]] || { echo "--registry needs a value" >&2; exit 2; } + REGISTRY="${2%/}"; shift 2 ;; + --name) + [[ $# -ge 2 ]] || { echo "--name needs a value" >&2; exit 2; } + TARGET="${2%/}"; shift 2 ;; + --plain-http) PLAIN_HTTP=1; shift ;; + --skip-existing) SKIP_EXISTING=1; shift ;; + --sign) SIGN=1; shift ;; + --tlog-upload) TLOG_UPLOAD=1; shift ;; + -h|--help) usage; exit 0 ;; + *) echo "unknown flag: $1" >&2; usage; exit 2 ;; + esac +done + +command -v "$GP_MODULE" >/dev/null || { echo "gp-module not in PATH (set GP_MODULE to its path)" >&2; exit 2; } + +if [[ "$cmd" == "push" ]]; then + [[ -n "$REGISTRY" ]] || { echo "--registry required" >&2; exit 2; } + command -v oras >/dev/null || { echo "oras not in PATH" >&2; exit 2; } + if (( SIGN )); then + command -v cosign >/dev/null || { echo "cosign not in PATH (required for --sign)" >&2; exit 2; } + [[ -n "${COSIGN_PRIVATE_KEY:-}" ]] || { echo "--sign requires COSIGN_PRIVATE_KEY (PEM private key) in the environment" >&2; exit 2; } + elif (( TLOG_UPLOAD )); then + echo "--tlog-upload has no effect without --sign" >&2; exit 2 + fi +else + if [[ -n "$REGISTRY" ]] || (( PLAIN_HTTP || SKIP_EXISTING || SIGN || TLOG_UPLOAD )); then + echo "validate takes only --name" >&2; exit 2 + fi +fi + +# Resolve the themes dir from the script's location, so callers can run this +# from anywhere. +THEMES_DIR="$(cd "$(dirname "$0")" && pwd)" + +# ymv: extract a top-level YAML scalar by key. Good enough for the name and +# version of a theme.yaml, which gp-module has already decoded strictly. +ymv() { + local file="$1" key="$2" + awk -v k="^$key:" '$0 ~ k {sub(/^[^:]+:[ \t]*/, ""); sub(/[ \t]+#.*$/, ""); gsub(/^["'"'"']|["'"'"']$/, ""); print; exit}' "$file" +} + +validate_one() { + local name="$1" + local dir="$THEMES_DIR/$name" + [[ -f "$dir/theme.yaml" ]] || { echo "$name: no theme.yaml" >&2; return 1; } + local declared + declared="$(ymv "$dir/theme.yaml" name)" + [[ "$declared" == "$name" ]] || { + echo "$name: theme.yaml#name=$declared does not match directory $name" >&2 + return 1 + } + "$GP_MODULE" theme validate "$dir" +} + +push_one() { + local name="$1" + local dir="$THEMES_DIR/$name" + validate_one "$name" + + local version + version="$(ymv "$dir/theme.yaml" version)" + [[ -n "$version" ]] || { echo "$name: theme.yaml is missing version" >&2; return 1; } + local ref="$REGISTRY/$name:$version" + + if (( SKIP_EXISTING )); then + # A published version is never overwritten: change the theme, bump its version. + local eargs=( resolve ) + (( PLAIN_HTTP )) && eargs+=( --plain-http ) + if oras "${eargs[@]}" "$ref" >/dev/null 2>&1; then + echo ">> $ref is already published, skipping" + return 0 + fi + fi + + echo ">> pushing $ref" + local pargs=( theme package "$dir" --push "$REGISTRY" ) + (( PLAIN_HTTP )) && pargs+=( --plain-http ) + "$GP_MODULE" "${pargs[@]}" + + if (( SIGN )); then + # Sign the manifest digest, never the tag: a tag can be moved. + local rargs=( resolve ) + (( PLAIN_HTTP )) && rargs+=( --plain-http ) + local digest + digest="$(oras "${rargs[@]}" "$ref")" + [[ "$digest" =~ ^sha256:[0-9a-f]{64}$ ]] || { echo "$name: could not resolve the pushed manifest digest of $ref" >&2; return 1; } + echo ">> signing $REGISTRY/$name@$digest" + local sargs=( sign --key env://COSIGN_PRIVATE_KEY --yes + --new-bundle-format=false --use-signing-config=false ) + if (( TLOG_UPLOAD )); then + echo ">> (recording signature in the public Rekor transparency log)" + else + sargs+=( --tlog-upload=false ) + fi + (( PLAIN_HTTP )) && sargs+=( --allow-http-registry ) + cosign "${sargs[@]}" "$REGISTRY/$name@$digest" + fi +} + +run_one() { + if [[ "$cmd" == "push" ]]; then push_one "$1"; else validate_one "$1"; fi +} + +if [[ -n "$TARGET" ]]; then + run_one "$TARGET" + exit 0 +fi + +failed=0 +count=0 +for d in "$THEMES_DIR"/*/; do + name="$(basename "$d")" + [[ -f "$d/theme.yaml" ]] || continue + count=$((count + 1)) + if [[ "$cmd" == "push" ]]; then + # A failed push stops the release: later themes are not published half-signed. + push_one "$name" + else + validate_one "$name" || failed=$((failed + 1)) + fi +done + +(( count > 0 )) || { echo "no theme folders found under $THEMES_DIR" >&2; exit 1; } +if (( failed > 0 )); then + echo "$failed of $count themes are invalid" >&2 + exit 1 +fi +echo "$count themes ok" diff --git a/catppuccin/previews/dark.png b/catppuccin/previews/dark.png new file mode 100644 index 0000000..463a220 Binary files /dev/null and b/catppuccin/previews/dark.png differ diff --git a/catppuccin/previews/light.png b/catppuccin/previews/light.png new file mode 100644 index 0000000..dff48ab Binary files /dev/null and b/catppuccin/previews/light.png differ diff --git a/catppuccin/theme.css b/catppuccin/theme.css new file mode 100644 index 0000000..4ed3c1d --- /dev/null +++ b/catppuccin/theme.css @@ -0,0 +1,223 @@ +/* Catppuccin: official Gameplane theme. */ +/* ---------------------------------------------------------------- */ +/* 1. Catppuccin Latte — light mode */ +/* ---------------------------------------------------------------- */ + +/* Latte is the light flavor: a warm off-white base with cool gray + * surfaces and near-black text. Mauve is Latte's darkest accent, so it + * keeps white text at ~5.4:1 (AA). Cards pop pure white above the base + * tint; fields and segments use the mantle/crust grays. Muted text is + * the palette's own subtext0 — ~4.9:1 on white cards (4.4:1 on the + * base tint; kept canonical, and muted text renders on cards). */ + +:root, +.light { + --background: #eff1f5 !important; /* base */ + --foreground: #4c4f69 !important; /* text, ~7:1 on base */ + --surface: #ffffff !important; /* cards, brighter than the base tint */ + --surface-secondary: #e6e9ef !important; /* mantle */ + --surface-tertiary: #dce0e8 !important; /* crust */ + --overlay: #ffffff !important; + --accent: #8839ef !important; /* mauve */ + --accent-foreground: #ffffff !important; /* ~5.4:1 on mauve */ + --accent-soft: #eee6fa !important; /* mauve-tinted base */ + --accent-soft-foreground: #6d28c9 !important; /* mauve, darkened, ~6.2:1 */ + --default: #e6e9ef !important; /* mantle */ + --default-foreground: #4c4f69 !important; /* ~6.5:1 */ + --default-soft: #dce0e8 !important; /* crust */ + --default-soft-foreground: #5c5f77 !important; /* subtext1, ~4.7:1 */ + --muted: #6c6f85 !important; /* subtext0, ~4.9:1 on cards */ + --border: #ccd0da !important; /* surface0 */ + --separator: #dce0e8 !important; /* crust */ + --field-background: #ffffff !important; + --field-border: #bcc0cc !important; /* surface1 */ + --field-foreground: #4c4f69 !important; + --field-placeholder: #9ca0b0 !important; /* overlay2 */ + --segment: #e6e9ef !important; /* mantle */ + --segment-foreground: #4c4f69 !important; + --focus: #8839ef !important; + --link: #1e66f5 !important; /* blue, ~4.9:1 on cards */ + --chart-stat: #ea76cb !important; /* pink */ + --sleep: #ea76cb !important; + --success: #40a02b !important; /* green */ + --success-soft: #e0f0d9 !important; /* green-tinted base */ + --success-soft-foreground: #33721d !important; /* green, darkened, ~5:1 */ + --warning: #df8e1d !important; /* yellow */ + --warning-soft: #faebcd !important; /* yellow-tinted base */ + --warning-soft-foreground: #8a5a0c !important; /* yellow, darkened, ~5:1 */ + --danger: #d20f39 !important; /* red */ + --danger-soft: #f9dce3 !important; /* red-tinted base */ + --danger-soft-foreground: #a30f31 !important; /* red, darkened, ~6.1:1 */ +} + +/* ---------------------------------------------------------------- */ +/* 2. Catppuccin Mocha — dark mode */ +/* ---------------------------------------------------------------- */ + +/* Mocha is the dark flavor: a deep blue-black base, gray-violet + * surfaces, and soft text. The palette's own pairings clear AA with + * headroom — crust on mauve ~9:1, text on base ~11:1, subtext0 on + * base ~7:1 — so dark mode keeps the canonical hues verbatim and only + * tints the soft surfaces toward each status hue. */ + +.dark { + --background: #1e1e2e !important; /* base */ + --foreground: #cdd6f4 !important; /* text, ~11:1 on base */ + --surface: #313244 !important; /* surface0 */ + --surface-secondary: #181825 !important; /* mantle */ + --surface-tertiary: #11111b !important; /* crust */ + --overlay: #313244 !important; /* surface0 */ + --accent: #cba6f9 !important; /* mauve */ + --accent-foreground: #11111b !important; /* crust, ~9:1 on mauve */ + --accent-soft: #322f49 !important; /* mauve-tinted surface */ + --accent-soft-foreground: #cba6f9 !important; /* ~6.4:1 on the tint */ + --default: #45475a !important; /* surface1 */ + --default-foreground: #cdd6f4 !important; /* ~6.4:1 */ + --default-soft: #313244 !important; /* surface0 */ + --default-soft-foreground: #bac2de !important; /* subtext1, ~7.1:1 */ + --muted: #a6adc8 !important; /* subtext0, ~7.2:1 on base */ + --border: #45475a !important; /* surface1 */ + --separator: #313244 !important; /* surface0 */ + --field-background: #313244 !important; /* surface0 */ + --field-border: #585b70 !important; /* surface2 */ + --field-foreground: #cdd6f4 !important; + --field-placeholder: #9399b2 !important; /* overlay1, ~4.5:1 */ + --segment: #313244 !important; /* surface0 */ + --segment-foreground: #cdd6f4 !important; + --focus: #cba6f9 !important; + --link: #89b4fa !important; /* blue, ~7.7:1 on base */ + --chart-stat: #f5c2e7 !important; /* pink */ + --sleep: #f5c2e7 !important; + --success: #a6e3a1 !important; /* green */ + --success-soft: #22302a !important; /* green-tinted surface */ + --success-soft-foreground: #a6e3a1 !important; /* ~9:1 */ + --warning: #f9e2af !important; /* yellow */ + --warning-soft: #2e2a1f !important; /* yellow-tinted surface */ + --warning-soft-foreground: #f9e2af !important; /* ~11:1 */ + --danger: #f38ba8 !important; /* red */ + --danger-soft: #34232a !important; /* red-tinted surface */ + --danger-soft-foreground: #f38ba8 !important; /* ~6.4:1 */ +} + +/* ---------------------------------------------------------------- */ +/* 3. Legacy preset variants */ +/* ---------------------------------------------------------------- */ + +/* The legacy preset pins its own copies of the token blocks under + * attribute selectors — .light[data-theme-preset="legacy"] and + * [data-theme="light"][data-theme-preset="legacy"] — that beat the + * plain class selectors above on specificity regardless of source + * order. Restate the FULL token list under those selectors (not just + * accent and link) so none of the preset's own colors leak through + * when the legacy preset is active. */ + +.light[data-theme-preset="legacy"], +[data-theme="light"][data-theme-preset="legacy"] { + --background: #eff1f5 !important; + --foreground: #4c4f69 !important; + --surface: #ffffff !important; + --surface-secondary: #e6e9ef !important; + --surface-tertiary: #dce0e8 !important; + --overlay: #ffffff !important; + --accent: #8839ef !important; + --accent-foreground: #ffffff !important; + --accent-soft: #eee6fa !important; + --accent-soft-foreground: #6d28c9 !important; + --default: #e6e9ef !important; + --default-foreground: #4c4f69 !important; + --default-soft: #dce0e8 !important; + --default-soft-foreground: #5c5f77 !important; + --muted: #6c6f85 !important; + --border: #ccd0da !important; + --separator: #dce0e8 !important; + --field-background: #ffffff !important; + --field-border: #bcc0cc !important; + --field-foreground: #4c4f69 !important; + --field-placeholder: #9ca0b0 !important; + --segment: #e6e9ef !important; + --segment-foreground: #4c4f69 !important; + --focus: #8839ef !important; + --link: #1e66f5 !important; + --chart-stat: #ea76cb !important; + --sleep: #ea76cb !important; + --success: #40a02b !important; + --success-soft: #e0f0d9 !important; + --success-soft-foreground: #33721d !important; + --warning: #df8e1d !important; + --warning-soft: #faebcd !important; + --warning-soft-foreground: #8a5a0c !important; + --danger: #d20f39 !important; + --danger-soft: #f9dce3 !important; + --danger-soft-foreground: #a30f31 !important; +} +.dark[data-theme-preset="legacy"], +[data-theme="dark"][data-theme-preset="legacy"] { + --background: #1e1e2e !important; + --foreground: #cdd6f4 !important; + --surface: #313244 !important; + --surface-secondary: #181825 !important; + --surface-tertiary: #11111b !important; + --overlay: #313244 !important; + --accent: #cba6f9 !important; + --accent-foreground: #11111b !important; + --accent-soft: #322f49 !important; + --accent-soft-foreground: #cba6f9 !important; + --default: #45475a !important; + --default-foreground: #cdd6f4 !important; + --default-soft: #313244 !important; + --default-soft-foreground: #bac2de !important; + --muted: #a6adc8 !important; + --border: #45475a !important; + --separator: #313244 !important; + --field-background: #313244 !important; + --field-border: #585b70 !important; + --field-foreground: #cdd6f4 !important; + --field-placeholder: #9399b2 !important; + --segment: #313244 !important; + --segment-foreground: #cdd6f4 !important; + --focus: #cba6f9 !important; + --link: #89b4fa !important; + --chart-stat: #f5c2e7 !important; + --sleep: #f5c2e7 !important; + --success: #a6e3a1 !important; + --success-soft: #22302a !important; + --success-soft-foreground: #a6e3a1 !important; + --warning: #f9e2af !important; + --warning-soft: #2e2a1f !important; + --warning-soft-foreground: #f9e2af !important; + --danger: #f38ba8 !important; + --danger-soft: #34232a !important; + --danger-soft-foreground: #f38ba8 !important; +} + +/* ---------------------------------------------------------------- */ +/* 4. Legacy --gp-* HSL triplets */ +/* ---------------------------------------------------------------- */ + +/* Legacy HSL triplets, for any not-yet-rebuilt screen still reading + * the --gp-* variables. Plain class selectors and no !important, like + * the app's own legacy blocks: nothing else writes these anymore, so + * simple late source order is enough. Values are the HSL equivalents + * of the hex tokens above (base/mantle/surface grays, subtext0 muted, + * mauve primary). */ + +.light { + --gp-bg: 220 23% 95%; /* base */ + --gp-surface: 220 22% 92%; /* mantle */ + --gp-card: 0 0% 100%; /* cards, like --surface */ + --gp-border: 223 16% 83%; /* surface0 */ + --gp-muted: 233 10% 47%; /* subtext0 */ + --gp-fg: 234 16% 35%; /* text */ + --gp-primary: 266 85% 58%; /* mauve */ + --gp-primary-fg: 0 0% 100%; +} +.dark { + --gp-bg: 240 21% 15%; /* base */ + --gp-surface: 240 21% 12%; /* mantle */ + --gp-card: 237 16% 23%; /* surface0 */ + --gp-border: 234 13% 31%; /* surface1 */ + --gp-muted: 228 24% 72%; /* subtext0 */ + --gp-fg: 226 64% 88%; /* text */ + --gp-primary: 267 87% 81%; /* mauve */ + --gp-primary-fg: 240 23% 9%; /* crust */ +} diff --git a/catppuccin/theme.yaml b/catppuccin/theme.yaml new file mode 100644 index 0000000..8470841 --- /dev/null +++ b/catppuccin/theme.yaml @@ -0,0 +1,41 @@ +# Theme package. Run `gp-module theme validate ` after editing. +apiVersion: gameplane.local/theme/v1 +name: catppuccin +version: 1.0.0 +displayName: Catppuccin +author: Gameplane +description: "Catppuccin Latte in light mode and Mocha in dark mode." +tags: [palette, light, dark] +license: AGPL-3.0-only +homepage: https://github.com/GameplanePanel/themes +tokens: + light: + background: "#eff1f5" + foreground: "#4c4f69" + surface: "#ffffff" + surface-secondary: "#e6e9ef" + surface-tertiary: "#dce0e8" + overlay: "#ffffff" + accent: "#8839ef" + accent-foreground: "#ffffff" + accent-soft: "#eee6fa" + accent-soft-foreground: "#6d28c9" + muted: "#6c6f85" + border: "#ccd0da" + focus: "#8839ef" + link: "#1e66f5" + dark: + background: "#1e1e2e" + foreground: "#cdd6f4" + surface: "#313244" + surface-secondary: "#181825" + surface-tertiary: "#11111b" + overlay: "#313244" + accent: "#cba6f9" + accent-foreground: "#11111b" + accent-soft: "#322f49" + accent-soft-foreground: "#cba6f9" + muted: "#a6adc8" + border: "#45475a" + focus: "#cba6f9" + link: "#89b4fa" diff --git a/compact-density/previews/dark.png b/compact-density/previews/dark.png new file mode 100644 index 0000000..750bd08 Binary files /dev/null and b/compact-density/previews/dark.png differ diff --git a/compact-density/previews/light.png b/compact-density/previews/light.png new file mode 100644 index 0000000..ca45a59 Binary files /dev/null and b/compact-density/previews/light.png differ diff --git a/compact-density/theme.css b/compact-density/theme.css new file mode 100644 index 0000000..9e2f59d --- /dev/null +++ b/compact-density/theme.css @@ -0,0 +1,33 @@ +/* Compact Density: official Gameplane theme. */ +/* ---------------------------------------------------------------- */ +/* 1. Global scale — shrink every rem-based utility at once */ +/* ---------------------------------------------------------------- */ + +html { + font-size: 14px; /* default is 16px; 14/16 = 0.875x everywhere */ +} + +/* ---------------------------------------------------------------- */ +/* 2. Px-pinned geometry that does not follow the root font size */ +/* ---------------------------------------------------------------- */ + +/* Modal dialog geometry (pinned to 20px padding / 16px gaps in + globals.css for the design scale) — re-pin proportionally tighter. */ +.modal__dialog { + padding: 14px; +} +.modal__body { + gap: 12px; + padding: 12px 0 0; +} +.modal__footer { + padding: 14px 0 0; + gap: 6px; +} + +/* Dialog field controls are pinned to 36px tall in globals.css for the + design scale — drop them to 32px to match the denser dialogs. */ +.modal__dialog .input, +.modal__dialog .select__trigger { + height: 32px; +} diff --git a/compact-density/theme.yaml b/compact-density/theme.yaml new file mode 100644 index 0000000..004211b --- /dev/null +++ b/compact-density/theme.yaml @@ -0,0 +1,41 @@ +# Theme package. Run `gp-module theme validate ` after editing. +apiVersion: gameplane.local/theme/v1 +name: compact-density +version: 1.0.0 +displayName: Compact Density +author: Gameplane +description: "Scales the whole interface down through the root font size. No color changes." +tags: [density, light, dark] +license: AGPL-3.0-only +homepage: https://github.com/GameplanePanel/themes +tokens: + light: + background: "#ffffff" + foreground: "#2a0f1e" + surface: "#fff7fb" + surface-secondary: "#f8dde9" + surface-tertiary: "#f8dde9" + overlay: "#fff7fb" + accent: "#db2777" + accent-foreground: "#ffffff" + accent-soft: "#ffffff" + accent-soft-foreground: "#be185d" + muted: "#6e5262" + border: "#efc3d6" + focus: "#db2777" + link: "#2563eb" + dark: + background: "#121114" + foreground: "#f5f3f7" + surface: "#1c1a20" + surface-secondary: "#17151a" + surface-tertiary: "#141317" + overlay: "#201e24" + accent: "#ff4fa3" + accent-foreground: "#ffffff" + accent-soft: "#331525" + accent-soft-foreground: "#ff8ac4" + muted: "#9e98a6" + border: "#2c2932" + focus: "#ff4fa3" + link: "#7db4ff" diff --git a/cyberpunk-neon/previews/dark.png b/cyberpunk-neon/previews/dark.png new file mode 100644 index 0000000..2ce6c9f Binary files /dev/null and b/cyberpunk-neon/previews/dark.png differ diff --git a/cyberpunk-neon/previews/light.png b/cyberpunk-neon/previews/light.png new file mode 100644 index 0000000..a014728 Binary files /dev/null and b/cyberpunk-neon/previews/light.png differ diff --git a/cyberpunk-neon/theme.css b/cyberpunk-neon/theme.css new file mode 100644 index 0000000..2835b35 --- /dev/null +++ b/cyberpunk-neon/theme.css @@ -0,0 +1,254 @@ +/* Cyberpunk Neon: official Gameplane theme. */ +/* ---------------------------------------------------------------- */ +/* 1. Cyberpunk palette — light mode ("day city") */ +/* ---------------------------------------------------------------- */ + +:root, +.light { + --background: #f6f6fa !important; /* cool off-white, keeps the blue-violet cast */ + --foreground: #1a1a2e !important; /* near-black indigo, 15.7:1 on background */ + --surface: #ffffff !important; + --surface-secondary: #efeff6 !important; + --surface-tertiary: #e6e5f0 !important; + --overlay: #ffffff !important; + --accent: #c2185b !important; /* neon magenta darkened to deep pink: 5.9:1 with white text */ + --accent-foreground: #ffffff !important; + --accent-soft: #fce4ef !important; + --accent-soft-foreground: #9d174d !important; /* 6.6:1 on accent-soft */ + --default: #e6e5f0 !important; + --default-foreground: #1a1a2e !important; + --default-soft: #fce4ef !important; + --default-soft-foreground: #9d174d !important; + --muted: #4a4a60 !important; /* 7.9:1 on background */ + --border: #d5d3e6 !important; + --separator: #e3e1ef !important; + --field-background: #ffffff !important; + --field-border: #c9c7dd !important; + --field-foreground: #1a1a2e !important; + --field-placeholder: #6d6d85 !important; /* 5.0:1 on white */ + --segment: #ffffff !important; + --segment-foreground: #1a1a2e !important; + --focus: #057180 !important; /* electric cyan darkened to teal, 5.3:1 */ + --link: #057180 !important; /* 5.3:1 on background */ + --chart-stat: #7e22ce !important; /* neon violet darkened to purple, 7.0:1 */ + --sleep: #7e22ce !important; + --success: #15803d !important; /* neon green darkened, 5.0:1 */ + --success-soft: #e2f4e8 !important; + --success-soft-foreground: #14532d !important; /* 6.9:1 on success-soft */ + --warning: #8a6d03 !important; /* acid yellow darkened, 4.9:1 */ + --warning-soft: #f5edcb !important; + --warning-soft-foreground: #6d5603 !important; /* 6.0:1 on warning-soft */ + --danger: #c81e1e !important; /* red line darkened, 5.7:1 */ + --danger-soft: #fce5e5 !important; + --danger-soft-foreground: #a11212 !important; /* 6.7:1 on danger-soft */ + /* No --radius / --field-radius overrides on purpose: shape stays + at the app defaults. */ +} + +/* ---------------------------------------------------------------- */ +/* 2. Cyberpunk palette — dark mode (neon night) */ +/* ---------------------------------------------------------------- */ + +.dark { + --background: #0a0a12 !important; /* near-black blue-violet */ + --foreground: #e6e6f2 !important; /* 15.9:1 on background */ + --surface: #12121f !important; + --surface-secondary: #0e0e19 !important; + --surface-tertiary: #08080f !important; + --overlay: #181828 !important; + --accent: #ff2a6d !important; /* neon magenta */ + --accent-foreground: #0f0008 !important; /* near-black, 5.7:1 on the accent */ + --accent-soft: #33101f !important; + --accent-soft-foreground: #ff8ac4 !important; /* 7.9:1 on accent-soft */ + --default: #1c1c2e !important; + --default-foreground: #e6e6f2 !important; + --default-soft: #20203a !important; + --default-soft-foreground: #b8b8d9 !important; + --muted: #9a9ac0 !important; /* 7.3:1 on background */ + --border: #2e2e4a !important; + --separator: #1e1e33 !important; + --field-background: #0e0e19 !important; + --field-border: #2e2e4a !important; + --field-foreground: #f0f0fa !important; + --field-placeholder: #6f6f95 !important; /* 4.0:1 on field bg — placeholder text is supplemental */ + --segment: #161624 !important; + --segment-foreground: #e6e6f2 !important; + --focus: #05d9e8 !important; /* electric cyan */ + --link: #05d9e8 !important; /* 11.3:1 on background */ + --chart-stat: #b967ff !important; /* neon violet, 6.0:1 */ + --sleep: #b967ff !important; + --success: #39ff14 !important; /* neon green, 14.5:1 on background */ + --success-soft: #0e2a0a !important; + --success-soft-foreground: #7dff6a !important; /* 12.1:1 on success-soft */ + --warning: #f9f002 !important; /* acid yellow, 16.3:1 on background */ + --warning-soft: #2e2c04 !important; + --warning-soft-foreground: #f5e96a !important; /* 11.3:1 on warning-soft */ + --danger: #ff3131 !important; /* red line, 5.5:1 on background */ + --danger-soft: #33101a !important; + --danger-soft-foreground: #ff8a8a !important; /* 7.5:1 on danger-soft */ +} + +/* Legacy preset variants carry an extra attribute selector that beats + the plain class selectors above on specificity — restate the tokens + for them so the overlay still wins if the legacy preset is active. */ +.light[data-theme-preset="legacy"], +[data-theme="light"][data-theme-preset="legacy"] { + --background: #f6f6fa !important; + --foreground: #1a1a2e !important; + --surface: #ffffff !important; + --surface-secondary: #efeff6 !important; + --surface-tertiary: #e6e5f0 !important; + --overlay: #ffffff !important; + --accent: #c2185b !important; + --accent-foreground: #ffffff !important; + --accent-soft: #fce4ef !important; + --accent-soft-foreground: #9d174d !important; + --default: #e6e5f0 !important; + --default-foreground: #1a1a2e !important; + --default-soft: #fce4ef !important; + --default-soft-foreground: #9d174d !important; + --muted: #4a4a60 !important; + --border: #d5d3e6 !important; + --separator: #e3e1ef !important; + --field-background: #ffffff !important; + --field-border: #c9c7dd !important; + --field-foreground: #1a1a2e !important; + --field-placeholder: #6d6d85 !important; + --segment: #ffffff !important; + --segment-foreground: #1a1a2e !important; + --focus: #057180 !important; + --link: #057180 !important; + --chart-stat: #7e22ce !important; + --sleep: #7e22ce !important; + --success: #15803d !important; + --success-soft: #e2f4e8 !important; + --success-soft-foreground: #14532d !important; + --warning: #8a6d03 !important; + --warning-soft: #f5edcb !important; + --warning-soft-foreground: #6d5603 !important; + --danger: #c81e1e !important; + --danger-soft: #fce5e5 !important; + --danger-soft-foreground: #a11212 !important; +} +.dark[data-theme-preset="legacy"], +[data-theme="dark"][data-theme-preset="legacy"] { + --background: #0a0a12 !important; + --foreground: #e6e6f2 !important; + --surface: #12121f !important; + --surface-secondary: #0e0e19 !important; + --surface-tertiary: #08080f !important; + --overlay: #181828 !important; + --accent: #ff2a6d !important; + --accent-foreground: #0f0008 !important; + --accent-soft: #33101f !important; + --accent-soft-foreground: #ff8ac4 !important; + --default: #1c1c2e !important; + --default-foreground: #e6e6f2 !important; + --default-soft: #20203a !important; + --default-soft-foreground: #b8b8d9 !important; + --muted: #9a9ac0 !important; + --border: #2e2e4a !important; + --separator: #1e1e33 !important; + --field-background: #0e0e19 !important; + --field-border: #2e2e4a !important; + --field-foreground: #f0f0fa !important; + --field-placeholder: #6f6f95 !important; + --segment: #161624 !important; + --segment-foreground: #e6e6f2 !important; + --focus: #05d9e8 !important; + --link: #05d9e8 !important; + --chart-stat: #b967ff !important; + --sleep: #b967ff !important; + --success: #39ff14 !important; + --success-soft: #0e2a0a !important; + --success-soft-foreground: #7dff6a !important; + --warning: #f9f002 !important; + --warning-soft: #2e2c04 !important; + --warning-soft-foreground: #f5e96a !important; + --danger: #ff3131 !important; + --danger-soft: #33101a !important; + --danger-soft-foreground: #ff8a8a !important; +} + +/* Legacy HSL triplets, for any not-yet-rebuilt screen still reading + the --gp-* variables. Plain .light/.dark, deliberately NO + !important — these mirror the token blocks above. */ +.light { + --gp-bg: 240 29% 97%; + --gp-surface: 0 0% 100%; + --gp-card: 0 0% 100%; + --gp-border: 246 28% 87%; + --gp-muted: 240 13% 33%; + --gp-fg: 240 11% 14%; + --gp-primary: 336 78% 43%; + --gp-primary-fg: 0 0% 100%; +} +.dark { + --gp-bg: 240 29% 5%; + --gp-surface: 240 27% 10%; + --gp-card: 240 27% 10%; + --gp-border: 240 21% 24%; + --gp-muted: 240 23% 68%; + --gp-fg: 240 31% 93%; + --gp-primary: 341 100% 58%; + --gp-primary-fg: 341 6% 3%; +} + +/* ---------------------------------------------------------------- */ +/* 3. Neon halo — primary buttons (dark mode only) */ +/* ---------------------------------------------------------------- */ +/* A static magenta halo around the primary action. Implemented as a + box-shadow: the app paints button focus rings with outline, so + nothing here is overridden and no !important is needed (this + overlay style element is appended last in the document head and wins ties). Scoped + to .dark — a magenta halo reads as neon against the near-black + background but as a smudge on the light "day city" palette. The + alpha stays around 0.3: a glow you notice, not a light source. */ +.dark .button[data-variant="primary"] { + box-shadow: + 0 0 12px rgba(255, 42, 109, 0.3), + 0 0 3px rgba(255, 42, 109, 0.3); +} + +/* ---------------------------------------------------------------- */ +/* 4. Cyan focus aura — inputs (dark mode only) */ +/* ---------------------------------------------------------------- */ +/* The app's input focus ring is `outline: 2px solid var(--accent)` + (globals.css), i.e. magenta under this palette. We leave that ring + untouched and add a soft cyan aura behind it via box-shadow, which + is possible precisely because the ring is outline-based and not a + shadow — the aura can sit underneath without clobbering it. The + result is a deliberate two-tone magenta-ring / cyan-glow focus. */ +.dark .input:focus-visible { + box-shadow: + 0 0 0 3px rgba(5, 217, 232, 0.2), + 0 0 12px rgba(5, 217, 232, 0.25); +} + +/* ---------------------------------------------------------------- */ +/* 5. Two-tone card aura (dark mode only) */ +/* ---------------------------------------------------------------- */ +/* A faint cyan hairline plus a wider violet halo — magenta, cyan and + violet are this theme's three notes. A glow was chosen over a + literal gradient border: border-image ignores the card's 12px + radius, and the background-clip padding-box trick would have to + re-declare the card fill, fighting the token-driven background. + Note this rule takes over the element's box-shadow (HeroUI's card + elevation), trading elevation for the aura; the card keeps its + default radius. */ +.dark .card { + box-shadow: + 0 0 0 1px rgba(5, 217, 232, 0.15), + 0 0 18px rgba(185, 103, 255, 0.15); +} + +/* Respect users who ask for reduced motion/effects: every aura above + switches off. (The card goes fully flat too — this overlay also + took over HeroUI's elevation shadow in dark mode.) */ +@media (prefers-reduced-motion: reduce) { + .dark .button[data-variant="primary"], + .dark .input:focus-visible, + .dark .card { + box-shadow: none; + } +} diff --git a/cyberpunk-neon/theme.yaml b/cyberpunk-neon/theme.yaml new file mode 100644 index 0000000..a659f13 --- /dev/null +++ b/cyberpunk-neon/theme.yaml @@ -0,0 +1,41 @@ +# Theme package. Run `gp-module theme validate ` after editing. +apiVersion: gameplane.local/theme/v1 +name: cyberpunk-neon +version: 1.0.0 +displayName: Cyberpunk Neon +author: Gameplane +description: "Neon magenta and cyan on near-black, with a restrained glow in dark mode." +tags: [overhaul, light, dark] +license: AGPL-3.0-only +homepage: https://github.com/GameplanePanel/themes +tokens: + light: + background: "#f6f6fa" + foreground: "#1a1a2e" + surface: "#ffffff" + surface-secondary: "#efeff6" + surface-tertiary: "#e6e5f0" + overlay: "#ffffff" + accent: "#c2185b" + accent-foreground: "#ffffff" + accent-soft: "#fce4ef" + accent-soft-foreground: "#9d174d" + muted: "#4a4a60" + border: "#d5d3e6" + focus: "#057180" + link: "#057180" + dark: + background: "#0a0a12" + foreground: "#e6e6f2" + surface: "#12121f" + surface-secondary: "#0e0e19" + surface-tertiary: "#08080f" + overlay: "#181828" + accent: "#ff2a6d" + accent-foreground: "#0f0008" + accent-soft: "#33101f" + accent-soft-foreground: "#ff8ac4" + muted: "#9a9ac0" + border: "#2e2e4a" + focus: "#05d9e8" + link: "#05d9e8" diff --git a/dashboard-bento/previews/dark.png b/dashboard-bento/previews/dark.png new file mode 100644 index 0000000..acd1ad7 Binary files /dev/null and b/dashboard-bento/previews/dark.png differ diff --git a/dashboard-bento/previews/light.png b/dashboard-bento/previews/light.png new file mode 100644 index 0000000..2b8ee80 Binary files /dev/null and b/dashboard-bento/previews/light.png differ diff --git a/dashboard-bento/theme.css b/dashboard-bento/theme.css new file mode 100644 index 0000000..2908b81 --- /dev/null +++ b/dashboard-bento/theme.css @@ -0,0 +1,49 @@ +/* Dashboard Bento: official Gameplane theme. */ +@media (min-width: 1100px) { + /* Anchor this layout to the dashboard root by its page heading. */ + main > div:has(> div h1) { + display: grid !important; + grid-template-columns: repeat(12, minmax(0, 1fr)); + align-content: start; + gap: 1rem 1.25rem !important; + } + + main > div:has(> div h1) > * { + min-width: 0; + margin-block: 0 !important; + } + + /* Title and fleet scope become the full-width masthead. */ + main > div:has(> div h1) > :nth-child(1), + main > div:has(> div h1) > :nth-child(2) { + grid-column: 1 / -1; + } + + /* The three coverage notices form a single slim row. */ + main > div:has(> div h1) > :nth-child(3), + main > div:has(> div h1) > :nth-child(4), + main > div:has(> div h1) > :nth-child(5) { + grid-column: span 4; + } + + /* Keep the five headline metrics together, then give the two lower + dashboard regions an asymmetric 7 / 5 split. */ + main > div:has(> div h1) > :nth-child(6) { + grid-column: 1 / -1; + grid-template-columns: repeat(5, minmax(0, 1fr)); + } + main > div:has(> div h1) > :nth-child(7) { grid-column: span 7; } + main > div:has(> div h1) > :nth-child(8) { grid-column: span 5; } +} + +@media (min-width: 1100px) and (max-width: 1350px) { + main > div:has(> div h1) > :nth-child(6) { + grid-template-columns: repeat(3, minmax(0, 1fr)); + } +} + +@media (max-width: 1099px) { + main > div:has(> div h1) { + gap: 1rem !important; + } +} diff --git a/dashboard-bento/theme.yaml b/dashboard-bento/theme.yaml new file mode 100644 index 0000000..06bc756 --- /dev/null +++ b/dashboard-bento/theme.yaml @@ -0,0 +1,41 @@ +# Theme package. Run `gp-module theme validate ` after editing. +apiVersion: gameplane.local/theme/v1 +name: dashboard-bento +version: 1.0.0 +displayName: Dashboard Bento +author: Gameplane +description: "Asymmetric 12-column layout for metrics and fleet panels." +tags: [layout, light, dark] +license: AGPL-3.0-only +homepage: https://github.com/GameplanePanel/themes +tokens: + light: + background: "#ffffff" + foreground: "#2a0f1e" + surface: "#fff7fb" + surface-secondary: "#f8dde9" + surface-tertiary: "#f8dde9" + overlay: "#fff7fb" + accent: "#db2777" + accent-foreground: "#ffffff" + accent-soft: "#ffffff" + accent-soft-foreground: "#be185d" + muted: "#6e5262" + border: "#efc3d6" + focus: "#db2777" + link: "#2563eb" + dark: + background: "#121114" + foreground: "#f5f3f7" + surface: "#1c1a20" + surface-secondary: "#17151a" + surface-tertiary: "#141317" + overlay: "#201e24" + accent: "#ff4fa3" + accent-foreground: "#ffffff" + accent-soft: "#331525" + accent-soft-foreground: "#ff8ac4" + muted: "#9e98a6" + border: "#2c2932" + focus: "#ff4fa3" + link: "#7db4ff" diff --git a/deep-ocean/previews/dark.png b/deep-ocean/previews/dark.png new file mode 100644 index 0000000..8015817 Binary files /dev/null and b/deep-ocean/previews/dark.png differ diff --git a/deep-ocean/previews/light.png b/deep-ocean/previews/light.png new file mode 100644 index 0000000..8ad6f75 Binary files /dev/null and b/deep-ocean/previews/light.png differ diff --git a/deep-ocean/theme.css b/deep-ocean/theme.css new file mode 100644 index 0000000..d3c46e9 --- /dev/null +++ b/deep-ocean/theme.css @@ -0,0 +1,51 @@ +/* Deep Ocean: official Gameplane theme. */ +html.dark[data-theme][data-theme-preset][data-theme-type] { + --background: #07131f; + --foreground: #e6f6ff; + --surface: #0d1d2b; + --surface-secondary: #0a1825; + --surface-tertiary: #122637; + --overlay: #173044; + --accent: #45d6c5; + --accent-foreground: #05221f; + --accent-soft: #103b3a; + --accent-soft-foreground: #86f0df; + --default: #172b3b; + --default-foreground: #e6f6ff; + --border: #244355; + --separator: #192f40; + --muted: #9ab5c4; + --field-background: #0a1825; + --field-border: #315365; + --field-foreground: #f0fbff; + --field-placeholder: #7f9bab; + --focus: #45d6c5; + --link: #70d9ff; + --radius: 16px; + --radius-md: var(--radius); + --radius-lg: calc(var(--radius) + 2px); + --field-radius: 10px; +} +html.light[data-theme][data-theme-preset][data-theme-type] { + --background: #f1f8fb; + --foreground: #102b3b; + --surface: #fbfeff; + --surface-secondary: #e8f2f6; + --surface-tertiary: #d9e8ee; + --overlay: #fbfeff; + --accent: #087f78; + --accent-foreground: #fff; + --accent-soft: #c8f2ec; + --accent-soft-foreground: #075c58; + --default: #e3eef3; + --default-foreground: #153548; + --border: #bfd4de; + --separator: #d5e4ea; + --muted: #526d7b; + --field-background: #fff; + --field-border: #b7ced9; + --field-foreground: #102b3b; + --field-placeholder: #617c89; + --focus: #087f78; + --link: #096b9b; +} diff --git a/deep-ocean/theme.yaml b/deep-ocean/theme.yaml new file mode 100644 index 0000000..346922e --- /dev/null +++ b/deep-ocean/theme.yaml @@ -0,0 +1,41 @@ +# Theme package. Run `gp-module theme validate ` after editing. +apiVersion: gameplane.local/theme/v1 +name: deep-ocean +version: 1.0.0 +displayName: Deep Ocean +author: Gameplane +description: "Midnight blue surfaces and sea-glass teal." +tags: [palette, light, dark] +license: AGPL-3.0-only +homepage: https://github.com/GameplanePanel/themes +tokens: + light: + background: "#f1f8fb" + foreground: "#102b3b" + surface: "#fbfeff" + surface-secondary: "#e8f2f6" + surface-tertiary: "#d9e8ee" + overlay: "#fbfeff" + accent: "#087f78" + accent-foreground: "#ffffff" + accent-soft: "#c8f2ec" + accent-soft-foreground: "#075c58" + muted: "#526d7b" + border: "#bfd4de" + focus: "#087f78" + link: "#096b9b" + dark: + background: "#07131f" + foreground: "#e6f6ff" + surface: "#0d1d2b" + surface-secondary: "#0a1825" + surface-tertiary: "#122637" + overlay: "#173044" + accent: "#45d6c5" + accent-foreground: "#05221f" + accent-soft: "#103b3a" + accent-soft-foreground: "#86f0df" + muted: "#9ab5c4" + border: "#244355" + focus: "#45d6c5" + link: "#70d9ff" diff --git a/dracula/previews/dark.png b/dracula/previews/dark.png new file mode 100644 index 0000000..0f52ba0 Binary files /dev/null and b/dracula/previews/dark.png differ diff --git a/dracula/previews/light.png b/dracula/previews/light.png new file mode 100644 index 0000000..8695989 Binary files /dev/null and b/dracula/previews/light.png differ diff --git a/dracula/theme.css b/dracula/theme.css new file mode 100644 index 0000000..d6810f0 --- /dev/null +++ b/dracula/theme.css @@ -0,0 +1,202 @@ +/* Dracula: official Gameplane theme. */ +/* ---------------------------------------------------------------- */ +/* 1. Dracula Dark (canonical) */ +/* ---------------------------------------------------------------- */ + +.dark { + --background: #282a36 !important; /* Dracula background */ + --foreground: #f8f8f2 !important; /* 13.4:1 on background */ + --surface: #1e1f29 !important; /* darker than background, per spec */ + --surface-secondary: #191a23 !important; + --surface-tertiary: #14151d !important; + --overlay: #44475a !important; /* current line */ + --accent: #bd93f9 !important; /* purple */ + --accent-foreground: #282a36 !important; /* 5.9:1 on accent */ + --accent-soft: #403b55 !important; /* translucent purple on dark */ + --accent-soft-foreground: #ccb9f9 !important; /* 6.0:1 on accent-soft */ + --default: #393a45 !important; + --default-foreground: #f8f8f2 !important; /* 10.6:1 on default */ + --default-soft: #3b384f !important; + --default-soft-foreground: #ccb9f9 !important; /* 6.4:1 on default-soft */ + --muted: #8a93c6 !important; /* comment #6272a4 brightened, 4.8:1 */ + --border: #373a4a !important; /* current line, dimmed */ + --separator: #323443 !important; + --field-background: #1e1f29 !important; + --field-border: #44475a !important; /* current line */ + --field-foreground: #f8f8f2 !important; + --field-placeholder: #7c86b8 !important; /* 4.6:1 on field bg */ + --segment: #1e1f29 !important; + --segment-foreground: #f8f8f2 !important; + --focus: #bd93f9 !important; + --link: #8be9fd !important; /* cyan, 10.3:1 on background */ + --chart-stat: #ff79c6 !important; /* pink, 6.0:1 */ + --sleep: #ff79c6 !important; + --success: #50fa7b !important; /* green, 10.4:1 on background */ + --success-soft: #2e4740 !important; + --success-soft-foreground: #8df0ab !important; /* 7.3:1 on soft */ + --warning: #ffb86c !important; /* orange, 8.4:1 on background */ + --warning-soft: #463e3e !important; + --warning-soft-foreground: #ffca96 !important; /* 7.0:1 on soft */ + --danger: #ff5555 !important; /* red, 4.5:1 on background (AA) */ + --danger-soft: #48303b !important; + --danger-soft-foreground: #ff9d9d !important; /* 6.0:1 on soft */ +} + +/* ---------------------------------------------------------------- */ +/* 2. Dracula Light (daylight paper) */ +/* ---------------------------------------------------------------- */ + +:root, +.light { + --background: #f8f8f2 !important; /* Dracula foreground as paper */ + --foreground: #282a36 !important; /* 13.4:1 on background */ + --surface: #e6e6e6 !important; + --surface-secondary: #dcdcdc !important; + --surface-tertiary: #d2d2d2 !important; + --overlay: #e6e6e6 !important; /* current line, lightened */ + --accent: #7b5fc7 !important; /* purple deepened for paper */ + --accent-foreground: #ffffff !important; /* 4.9:1 on accent */ + --accent-soft: #efecf8 !important; /* pale purple tint */ + --accent-soft-foreground: #5a3fa8 !important; /* 6.7:1 on accent-soft */ + --default: #e6e6e6 !important; + --default-foreground: #282a36 !important; /* 11.4:1 on default */ + --default-soft: #efecf8 !important; + --default-soft-foreground: #5a3fa8 !important; + --muted: #4a5480 !important; /* comment #6272a4 darkened, 6.9:1 */ + --border: #bebfc5 !important; + --separator: #d6d7db !important; + --field-background: #ffffff !important; + --field-border: #bebfc5 !important; + --field-foreground: #282a36 !important; + --field-placeholder: #6b7392 !important; /* 4.7:1 on white */ + --segment: #e6e6e6 !important; + --segment-foreground: #282a36 !important; + --focus: #7b5fc7 !important; + --link: #0a6a83 !important; /* cyan darkened, 5.8:1 on background */ + --chart-stat: #b32772 !important; /* pink darkened, 5.7:1 */ + --sleep: #b32772 !important; + --success: #0f6b36 !important; /* green darkened, 6.2:1 on background */ + --success-soft: #e7f0eb !important; + --success-soft-foreground: #0f6b36 !important; /* 5.7:1 on soft */ + --warning: #8f4c00 !important; /* orange darkened, 6.2:1 on background */ + --warning-soft: #f4ede6 !important; + --warning-soft-foreground: #8f4c00 !important; /* 5.7:1 on soft */ + --danger: #c21f1f !important; /* red darkened, 5.6:1 on background */ + --danger-soft: #fbeded !important; + --danger-soft-foreground: #8f1414 !important; /* 8.1:1 on soft */ +} + +/* ---------------------------------------------------------------- */ +/* 3. Legacy preset variants */ +/* ---------------------------------------------------------------- */ +/* Legacy preset variants carry an extra attribute selector that beats + * the plain class selectors above on specificity — restate the tokens + * for them so the overlay still wins if the legacy preset is active. */ + +.light[data-theme-preset="legacy"], +[data-theme="light"][data-theme-preset="legacy"] { + --background: #f8f8f2 !important; + --foreground: #282a36 !important; + --surface: #e6e6e6 !important; + --surface-secondary: #dcdcdc !important; + --surface-tertiary: #d2d2d2 !important; + --overlay: #e6e6e6 !important; + --accent: #7b5fc7 !important; + --accent-foreground: #ffffff !important; + --accent-soft: #efecf8 !important; + --accent-soft-foreground: #5a3fa8 !important; + --default: #e6e6e6 !important; + --default-foreground: #282a36 !important; + --default-soft: #efecf8 !important; + --default-soft-foreground: #5a3fa8 !important; + --muted: #4a5480 !important; + --border: #bebfc5 !important; + --separator: #d6d7db !important; + --field-background: #ffffff !important; + --field-border: #bebfc5 !important; + --field-foreground: #282a36 !important; + --field-placeholder: #6b7392 !important; + --segment: #e6e6e6 !important; + --segment-foreground: #282a36 !important; + --focus: #7b5fc7 !important; + --link: #0a6a83 !important; + --chart-stat: #b32772 !important; + --sleep: #b32772 !important; + --success: #0f6b36 !important; + --success-soft: #e7f0eb !important; + --success-soft-foreground: #0f6b36 !important; + --warning: #8f4c00 !important; + --warning-soft: #f4ede6 !important; + --warning-soft-foreground: #8f4c00 !important; + --danger: #c21f1f !important; + --danger-soft: #fbeded !important; + --danger-soft-foreground: #8f1414 !important; +} +.dark[data-theme-preset="legacy"], +[data-theme="dark"][data-theme-preset="legacy"] { + --background: #282a36 !important; + --foreground: #f8f8f2 !important; + --surface: #1e1f29 !important; + --surface-secondary: #191a23 !important; + --surface-tertiary: #14151d !important; + --overlay: #44475a !important; + --accent: #bd93f9 !important; + --accent-foreground: #282a36 !important; + --accent-soft: #403b55 !important; + --accent-soft-foreground: #ccb9f9 !important; + --default: #393a45 !important; + --default-foreground: #f8f8f2 !important; + --default-soft: #3b384f !important; + --default-soft-foreground: #ccb9f9 !important; + --muted: #8a93c6 !important; + --border: #373a4a !important; + --separator: #323443 !important; + --field-background: #1e1f29 !important; + --field-border: #44475a !important; + --field-foreground: #f8f8f2 !important; + --field-placeholder: #7c86b8 !important; + --segment: #1e1f29 !important; + --segment-foreground: #f8f8f2 !important; + --focus: #bd93f9 !important; + --link: #8be9fd !important; + --chart-stat: #ff79c6 !important; + --sleep: #ff79c6 !important; + --success: #50fa7b !important; + --success-soft: #2e4740 !important; + --success-soft-foreground: #8df0ab !important; + --warning: #ffb86c !important; + --warning-soft: #463e3e !important; + --warning-soft-foreground: #ffca96 !important; + --danger: #ff5555 !important; + --danger-soft: #48303b !important; + --danger-soft-foreground: #ff9d9d !important; +} + +/* ---------------------------------------------------------------- */ +/* 4. Legacy --gp-* HSL triplets */ +/* ---------------------------------------------------------------- */ +/* Legacy HSL triplets, for any not-yet-rebuilt screen still reading + * the --gp-* variables. Plain .light/.dark, deliberately WITHOUT + * !important: these are a compatibility fallback, so a user's Custom + * Colors pick (also never !important, at higher specificity) can still + * override them. */ +.light { + --gp-bg: 60 30% 96%; + --gp-surface: 0 0% 90%; + --gp-card: 0 0% 90%; + --gp-border: 231 6% 76%; + --gp-muted: 229 27% 44%; + --gp-fg: 231 15% 18%; + --gp-primary: 256 48% 58%; + --gp-primary-fg: 0 0% 100%; +} +.dark { + --gp-bg: 231 15% 18%; + --gp-surface: 235 15% 14%; + --gp-card: 235 15% 14%; + --gp-border: 231 15% 25%; + --gp-muted: 231 34% 66%; + --gp-fg: 60 30% 96%; + --gp-primary: 265 89% 78%; + --gp-primary-fg: 231 15% 18%; +} diff --git a/dracula/theme.yaml b/dracula/theme.yaml new file mode 100644 index 0000000..d7ec4ab --- /dev/null +++ b/dracula/theme.yaml @@ -0,0 +1,41 @@ +# Theme package. Run `gp-module theme validate ` after editing. +apiVersion: gameplane.local/theme/v1 +name: dracula +version: 1.0.0 +displayName: Dracula +author: Gameplane +description: "Dracula in dark mode and a lightened paper variant in light mode." +tags: [palette, light, dark] +license: AGPL-3.0-only +homepage: https://github.com/GameplanePanel/themes +tokens: + light: + background: "#f8f8f2" + foreground: "#282a36" + surface: "#e6e6e6" + surface-secondary: "#dcdcdc" + surface-tertiary: "#d2d2d2" + overlay: "#e6e6e6" + accent: "#7b5fc7" + accent-foreground: "#ffffff" + accent-soft: "#efecf8" + accent-soft-foreground: "#5a3fa8" + muted: "#4a5480" + border: "#bebfc5" + focus: "#7b5fc7" + link: "#0a6a83" + dark: + background: "#f8f8f2" + foreground: "#282a36" + surface: "#e6e6e6" + surface-secondary: "#dcdcdc" + surface-tertiary: "#d2d2d2" + overlay: "#e6e6e6" + accent: "#7b5fc7" + accent-foreground: "#ffffff" + accent-soft: "#efecf8" + accent-soft-foreground: "#5a3fa8" + muted: "#4a5480" + border: "#bebfc5" + focus: "#7b5fc7" + link: "#0a6a83" diff --git a/elegant-serif/previews/dark.png b/elegant-serif/previews/dark.png new file mode 100644 index 0000000..3d5a091 Binary files /dev/null and b/elegant-serif/previews/dark.png differ diff --git a/elegant-serif/previews/light.png b/elegant-serif/previews/light.png new file mode 100644 index 0000000..428fc98 Binary files /dev/null and b/elegant-serif/previews/light.png differ diff --git a/elegant-serif/theme.css b/elegant-serif/theme.css new file mode 100644 index 0000000..0eb222f --- /dev/null +++ b/elegant-serif/theme.css @@ -0,0 +1,71 @@ +/* Elegant Serif: official Gameplane theme. */ +/* ---------------------------------------------------------------- */ +/* 1. Serif rebinding — redirect every --font-sans consumer */ +/* ---------------------------------------------------------------- */ +/* --font-sans is declared inside the app's @theme block + (web/src/styles/globals.css), which the Tailwind v4 compiler turns + into the font-sans utility used by the body and components. + Rebinding the custom property on :root/.light/.dark — a later, + equal-specificity declaration — redirects every consumer without a + single component rule. The !important matches the phosphor-terminal + example: token rebinds must outrank the app's own @theme emission + regardless of source order, and stay effective if a future preset + ever re-pins the token. Georgia leads because it is a system serif + (zero download, hinted for screen), Times New Roman is the + fallback, ui-serif lets tuned platforms (e.g. SF/Charter on Apple) + offer a better face, and generic serif is the last resort. */ +:root, +.light, +.dark { + --font-sans: Georgia, "Times New Roman", ui-serif, serif !important; +} + +/* --font-mono stays exactly as the app ships it (JetBrains Mono): + console, logs, and any tabular monospace output must keep fixed + glyph widths so columns align. */ + +/* ---------------------------------------------------------------- */ +/* 2. Body polish — comfortable leading + real ligatures */ +/* ---------------------------------------------------------------- */ +/* line-height on body only reaches text that does not set its own + leading; components with explicit leading utilities keep their + designed metrics, so this mainly relaxes paragraphs, descriptions, + and table cells. 1.6 is a common book-prose value; the app's + default inherits Tailwind's tighter 1.5-ish rhythm, which feels + cramped once serifs replace the geometric sans. Neither property + needs !important: the overlay style element is appended last in the document head + and is unlayered, while the app rules these tie with (Tailwind + preflight) live in @layer base — unlayered wins. */ +body { + line-height: 1.6; + font-feature-settings: "liga" 1; +} + +/* ---------------------------------------------------------------- */ +/* 3. Italic helper text — stable HeroUI hook only */ +/* ---------------------------------------------------------------- */ +/* The one safe, version-stable selector for "muted helper text" is + HeroUI's Description component, which renders with + data-slot="description" and is used for form field hints. We do + NOT target the generated text-muted utility class (house rule: + never Tailwind utilities — they are hashed build artifacts). + Consequence, stated honestly: only Description-based hints go + italic; ad-hoc muted paragraphs elsewhere keep their upright + style. font-style alone is changed — size and color (and therefore + contrast ratios) are untouched. */ +[data-slot="description"] { + font-style: italic; +} + +/* ---------------------------------------------------------------- */ +/* 4. Display headings — a whisper of tracking */ +/* ---------------------------------------------------------------- */ +/* Large serif glyphs benefit from slightly open tracking; 0.015em is + roughly a quarter of a pixel at a 24px heading — felt, not seen. + Element selectors are the most stable hooks in the app (no classes + involved), and headings are not used inside console/log surfaces, + so nothing monospace is affected. */ +h1, +h2 { + letter-spacing: 0.015em; +} diff --git a/elegant-serif/theme.yaml b/elegant-serif/theme.yaml new file mode 100644 index 0000000..800e5bc --- /dev/null +++ b/elegant-serif/theme.yaml @@ -0,0 +1,41 @@ +# Theme package. Run `gp-module theme validate ` after editing. +apiVersion: gameplane.local/theme/v1 +name: elegant-serif +version: 1.0.0 +displayName: Elegant Serif +author: Gameplane +description: "Serif body text, no color changes." +tags: [typography, light, dark] +license: AGPL-3.0-only +homepage: https://github.com/GameplanePanel/themes +tokens: + light: + background: "#ffffff" + foreground: "#2a0f1e" + surface: "#fff7fb" + surface-secondary: "#f8dde9" + surface-tertiary: "#f8dde9" + overlay: "#fff7fb" + accent: "#db2777" + accent-foreground: "#ffffff" + accent-soft: "#ffffff" + accent-soft-foreground: "#be185d" + muted: "#6e5262" + border: "#efc3d6" + focus: "#db2777" + link: "#2563eb" + dark: + background: "#121114" + foreground: "#f5f3f7" + surface: "#1c1a20" + surface-secondary: "#17151a" + surface-tertiary: "#141317" + overlay: "#201e24" + accent: "#ff4fa3" + accent-foreground: "#ffffff" + accent-soft: "#331525" + accent-soft-foreground: "#ff8ac4" + muted: "#9e98a6" + border: "#2c2932" + focus: "#ff4fa3" + link: "#7db4ff" diff --git a/ember-forge/previews/dark.png b/ember-forge/previews/dark.png new file mode 100644 index 0000000..c4cd09f Binary files /dev/null and b/ember-forge/previews/dark.png differ diff --git a/ember-forge/previews/light.png b/ember-forge/previews/light.png new file mode 100644 index 0000000..d4274c1 Binary files /dev/null and b/ember-forge/previews/light.png differ diff --git a/ember-forge/theme.css b/ember-forge/theme.css new file mode 100644 index 0000000..067677d --- /dev/null +++ b/ember-forge/theme.css @@ -0,0 +1,51 @@ +/* Ember Forge: official Gameplane theme. */ +html.dark[data-theme][data-theme-preset][data-theme-type] { + --background: #171311; + --foreground: #f7eee8; + --surface: #211b17; + --surface-secondary: #1b1613; + --surface-tertiary: #2b211b; + --overlay: #35271f; + --accent: #ff8a3d; + --accent-foreground: #301306; + --accent-soft: #482719; + --accent-soft-foreground: #ffb47e; + --default: #30251e; + --default-foreground: #f7eee8; + --border: #554031; + --separator: #3a2d24; + --muted: #c2ada0; + --field-background: #1b1613; + --field-border: #634733; + --field-foreground: #fff8f3; + --field-placeholder: #9c8374; + --focus: #ff8a3d; + --link: #ffad70; + --radius: 3px; + --radius-md: var(--radius); + --radius-lg: calc(var(--radius) + 2px); + --field-radius: 2px; +} +html.light[data-theme][data-theme-preset][data-theme-type] { + --background: #faf5f1; + --foreground: #302117; + --surface: #fffdfa; + --surface-secondary: #f3e9e0; + --surface-tertiary: #ead9ca; + --overlay: #fffdfa; + --accent: #bd4e12; + --accent-foreground: #fff; + --accent-soft: #ffe0c7; + --accent-soft-foreground: #87370e; + --default: #f0e3d7; + --default-foreground: #38261a; + --border: #ddc5b1; + --separator: #ead9c9; + --muted: #715845; + --field-background: #fffdfa; + --field-border: #d7bda7; + --field-foreground: #302117; + --field-placeholder: #836b57; + --focus: #bd4e12; + --link: #9d3c0c; +} diff --git a/ember-forge/theme.yaml b/ember-forge/theme.yaml new file mode 100644 index 0000000..c6fa1e4 --- /dev/null +++ b/ember-forge/theme.yaml @@ -0,0 +1,41 @@ +# Theme package. Run `gp-module theme validate ` after editing. +apiVersion: gameplane.local/theme/v1 +name: ember-forge +version: 1.0.0 +displayName: Ember Forge +author: Gameplane +description: "Charcoal, kiln orange, and squared corners." +tags: [palette, light, dark] +license: AGPL-3.0-only +homepage: https://github.com/GameplanePanel/themes +tokens: + light: + background: "#faf5f1" + foreground: "#302117" + surface: "#fffdfa" + surface-secondary: "#f3e9e0" + surface-tertiary: "#ead9ca" + overlay: "#fffdfa" + accent: "#bd4e12" + accent-foreground: "#ffffff" + accent-soft: "#ffe0c7" + accent-soft-foreground: "#87370e" + muted: "#715845" + border: "#ddc5b1" + focus: "#bd4e12" + link: "#9d3c0c" + dark: + background: "#171311" + foreground: "#f7eee8" + surface: "#211b17" + surface-secondary: "#1b1613" + surface-tertiary: "#2b211b" + overlay: "#35271f" + accent: "#ff8a3d" + accent-foreground: "#301306" + accent-soft: "#482719" + accent-soft-foreground: "#ffb47e" + muted: "#c2ada0" + border: "#554031" + focus: "#ff8a3d" + link: "#ffad70" diff --git a/flat-workbench/previews/dark.png b/flat-workbench/previews/dark.png new file mode 100644 index 0000000..d215460 Binary files /dev/null and b/flat-workbench/previews/dark.png differ diff --git a/flat-workbench/previews/light.png b/flat-workbench/previews/light.png new file mode 100644 index 0000000..2fb8f12 Binary files /dev/null and b/flat-workbench/previews/light.png differ diff --git a/flat-workbench/theme.css b/flat-workbench/theme.css new file mode 100644 index 0000000..bf980fb --- /dev/null +++ b/flat-workbench/theme.css @@ -0,0 +1,21 @@ +/* Flat Workbench: official Gameplane theme. */ +main .card { + background: transparent !important; + border: 0 !important; + border-bottom: 1px solid var(--border) !important; + border-radius: 0 !important; + box-shadow: none !important; +} + +main .card h2, +main .card h3 { + letter-spacing: -0.025em; +} + +main .card > * + * { + border-color: var(--separator); +} + +main .card:hover { + box-shadow: none !important; +} diff --git a/flat-workbench/theme.yaml b/flat-workbench/theme.yaml new file mode 100644 index 0000000..0cc2939 --- /dev/null +++ b/flat-workbench/theme.yaml @@ -0,0 +1,41 @@ +# Theme package. Run `gp-module theme validate ` after editing. +apiVersion: gameplane.local/theme/v1 +name: flat-workbench +version: 1.0.0 +displayName: Flat Workbench +author: Gameplane +description: "Removes card boxes and organizes content with dividers." +tags: [treatment, light, dark] +license: AGPL-3.0-only +homepage: https://github.com/GameplanePanel/themes +tokens: + light: + background: "#ffffff" + foreground: "#2a0f1e" + surface: "#fff7fb" + surface-secondary: "#f8dde9" + surface-tertiary: "#f8dde9" + overlay: "#fff7fb" + accent: "#db2777" + accent-foreground: "#ffffff" + accent-soft: "#ffffff" + accent-soft-foreground: "#be185d" + muted: "#6e5262" + border: "#efc3d6" + focus: "#db2777" + link: "#2563eb" + dark: + background: "#121114" + foreground: "#f5f3f7" + surface: "#1c1a20" + surface-secondary: "#17151a" + surface-tertiary: "#141317" + overlay: "#201e24" + accent: "#ff4fa3" + accent-foreground: "#ffffff" + accent-soft: "#331525" + accent-soft-foreground: "#ff8ac4" + muted: "#9e98a6" + border: "#2c2932" + focus: "#ff4fa3" + link: "#7db4ff" diff --git a/forest-camp/previews/dark.png b/forest-camp/previews/dark.png new file mode 100644 index 0000000..d747793 Binary files /dev/null and b/forest-camp/previews/dark.png differ diff --git a/forest-camp/previews/light.png b/forest-camp/previews/light.png new file mode 100644 index 0000000..370b580 Binary files /dev/null and b/forest-camp/previews/light.png differ diff --git a/forest-camp/theme.css b/forest-camp/theme.css new file mode 100644 index 0000000..1184fa9 --- /dev/null +++ b/forest-camp/theme.css @@ -0,0 +1,51 @@ +/* Forest Camp: official Gameplane theme. */ +html.dark[data-theme][data-theme-preset][data-theme-type] { + --background: #101710; + --foreground: #edf4e8; + --surface: #19221a; + --surface-secondary: #141c15; + --surface-tertiary: #202b20; + --overlay: #29372a; + --accent: #a3d977; + --accent-foreground: #1a2a10; + --accent-soft: #293c23; + --accent-soft-foreground: #c5ed9f; + --default: #273127; + --default-foreground: #edf4e8; + --border: #3a4b39; + --separator: #2a382b; + --muted: #b0bea9; + --field-background: #141c15; + --field-border: #465944; + --field-foreground: #f4f8ef; + --field-placeholder: #8f9f89; + --focus: #b8e986; + --link: #b5e7a0; + --radius: 9px; + --radius-md: var(--radius); + --radius-lg: calc(var(--radius) + 2px); + --field-radius: 6px; +} +html.light[data-theme][data-theme-preset][data-theme-type] { + --background: #f4f6ed; + --foreground: #1d2c1d; + --surface: #fbfcf6; + --surface-secondary: #edf1e4; + --surface-tertiary: #e0e8d6; + --overlay: #fbfcf6; + --accent: #477c2c; + --accent-foreground: #fff; + --accent-soft: #dceecb; + --accent-soft-foreground: #345c23; + --default: #e7ecdf; + --default-foreground: #243624; + --border: #cbd7bf; + --separator: #dce5d3; + --muted: #5c6d58; + --field-background: #fff; + --field-border: #c4d1b8; + --field-foreground: #1d2c1d; + --field-placeholder: #687762; + --focus: #477c2c; + --link: #356b27; +} diff --git a/forest-camp/theme.yaml b/forest-camp/theme.yaml new file mode 100644 index 0000000..34be5be --- /dev/null +++ b/forest-camp/theme.yaml @@ -0,0 +1,41 @@ +# Theme package. Run `gp-module theme validate ` after editing. +apiVersion: gameplane.local/theme/v1 +name: forest-camp +version: 1.0.0 +displayName: Forest Camp +author: Gameplane +description: "Pine, fern, and natural warmth." +tags: [palette, light, dark] +license: AGPL-3.0-only +homepage: https://github.com/GameplanePanel/themes +tokens: + light: + background: "#f4f6ed" + foreground: "#1d2c1d" + surface: "#fbfcf6" + surface-secondary: "#edf1e4" + surface-tertiary: "#e0e8d6" + overlay: "#fbfcf6" + accent: "#477c2c" + accent-foreground: "#ffffff" + accent-soft: "#dceecb" + accent-soft-foreground: "#345c23" + muted: "#5c6d58" + border: "#cbd7bf" + focus: "#477c2c" + link: "#356b27" + dark: + background: "#101710" + foreground: "#edf4e8" + surface: "#19221a" + surface-secondary: "#141c15" + surface-tertiary: "#202b20" + overlay: "#29372a" + accent: "#a3d977" + accent-foreground: "#1a2a10" + accent-soft: "#293c23" + accent-soft-foreground: "#c5ed9f" + muted: "#b0bea9" + border: "#3a4b39" + focus: "#b8e986" + link: "#b5e7a0" diff --git a/glass-observatory/previews/dark.png b/glass-observatory/previews/dark.png new file mode 100644 index 0000000..661a78c Binary files /dev/null and b/glass-observatory/previews/dark.png differ diff --git a/glass-observatory/previews/light.png b/glass-observatory/previews/light.png new file mode 100644 index 0000000..c3159b8 Binary files /dev/null and b/glass-observatory/previews/light.png differ diff --git a/glass-observatory/theme.css b/glass-observatory/theme.css new file mode 100644 index 0000000..1264ebd --- /dev/null +++ b/glass-observatory/theme.css @@ -0,0 +1,32 @@ +/* Glass Observatory: official Gameplane theme. */ +main { + background-image: + radial-gradient(ellipse at 12% 8%, color-mix(in srgb, var(--accent) 13%, transparent), transparent 34rem), + radial-gradient(ellipse at 88% 68%, color-mix(in srgb, var(--link) 10%, transparent), transparent 38rem) !important; + background-attachment: fixed; +} + +main .card, +[data-testid="app-shell-sidebar"] > aside[aria-label="Sidebar"], +header { + background-color: color-mix(in srgb, var(--surface) 78%, transparent) !important; + -webkit-backdrop-filter: blur(18px) saturate(135%); + backdrop-filter: blur(18px) saturate(135%); + border-color: color-mix(in srgb, var(--border) 72%, transparent) !important; + box-shadow: 0 16px 40px color-mix(in srgb, var(--foreground) 9%, transparent); +} + +main .card { + border-radius: 20px !important; + transition: transform 180ms ease, box-shadow 180ms ease; +} + +main .card:hover { + transform: translateY(-2px); + box-shadow: 0 22px 48px color-mix(in srgb, var(--foreground) 13%, transparent); +} + +@media (prefers-reduced-motion: reduce) { + main .card { transition: none; } + main .card:hover { transform: none; } +} diff --git a/glass-observatory/theme.yaml b/glass-observatory/theme.yaml new file mode 100644 index 0000000..1ca5b92 --- /dev/null +++ b/glass-observatory/theme.yaml @@ -0,0 +1,41 @@ +# Theme package. Run `gp-module theme validate ` after editing. +apiVersion: gameplane.local/theme/v1 +name: glass-observatory +version: 1.0.0 +displayName: Glass Observatory +author: Gameplane +description: "Translucent panels, blur, and atmospheric light." +tags: [treatment, light, dark] +license: AGPL-3.0-only +homepage: https://github.com/GameplanePanel/themes +tokens: + light: + background: "#ffffff" + foreground: "#2a0f1e" + surface: "#fff7fb" + surface-secondary: "#f8dde9" + surface-tertiary: "#f8dde9" + overlay: "#fff7fb" + accent: "#db2777" + accent-foreground: "#ffffff" + accent-soft: "#ffffff" + accent-soft-foreground: "#be185d" + muted: "#6e5262" + border: "#efc3d6" + focus: "#db2777" + link: "#2563eb" + dark: + background: "#121114" + foreground: "#f5f3f7" + surface: "#1c1a20" + surface-secondary: "#17151a" + surface-tertiary: "#141317" + overlay: "#201e24" + accent: "#ff4fa3" + accent-foreground: "#ffffff" + accent-soft: "#331525" + accent-soft-foreground: "#ff8ac4" + muted: "#9e98a6" + border: "#2c2932" + focus: "#ff4fa3" + link: "#7db4ff" diff --git a/gruvbox/previews/dark.png b/gruvbox/previews/dark.png new file mode 100644 index 0000000..eca2976 Binary files /dev/null and b/gruvbox/previews/dark.png differ diff --git a/gruvbox/previews/light.png b/gruvbox/previews/light.png new file mode 100644 index 0000000..fbc8cb1 Binary files /dev/null and b/gruvbox/previews/light.png differ diff --git a/gruvbox/theme.css b/gruvbox/theme.css new file mode 100644 index 0000000..be2dd16 --- /dev/null +++ b/gruvbox/theme.css @@ -0,0 +1,200 @@ +/* Gruvbox: official Gameplane theme. */ +/* ---------------------------------------------------------------- */ +/* 1. Gruvbox Light (gruvbox light mode: warm cream paper) */ +/* ---------------------------------------------------------------- */ + +:root, +.light { + /* Canvas ramp: bg0 canvas -> soft card fill -> bg1 -> bg2 wells, so + cards lift off the canvas instead of sinking the way they do in + the dark ramp below. */ + --background: #fbf1c7 !important; /* bg0 */ + --foreground: #3c3836 !important; /* fg1, ~10.2:1 on bg0 */ + --surface: #f2e5bc !important; /* bg0_soft-ish card fill */ + --surface-secondary: #ebdbb2 !important; /* bg1 */ + --surface-tertiary: #d5c4a1 !important; /* bg2 wells */ + --overlay: #f2e5bc !important; + /* Orange accent. White on this orange is ~3.9:1 — the best any + foreground manages against #d65d0e (dark gruvbox text is ~3.0:1), + and button labels are bold enough for the AA 3:1 large-text + threshold. A strict 4.5:1 pairing would need a darker orange than + the palette ships. */ + --accent: #d65d0e !important; + --accent-foreground: #ffffff !important; /* ~3.9:1, best on this orange */ + --accent-soft: #f5dcae !important; /* orange tint wash */ + --accent-soft-foreground: #8a3c05 !important; /* ~5.8:1 on accent-soft */ + --default: #ebdbb2 !important; + --default-foreground: #3c3836 !important; + --default-soft: #f5dcae !important; /* matches --accent-soft, mirroring the app's own default preset */ + --default-soft-foreground: #8a3c05 !important; + /* Canonical gruvbox fg4 gray, ~4.3:1 on bg0 — a hair under the 4.5:1 + AA floor for small text. No lighter gruvbox gray passes either; + fg3 (#665c54) would, at ~5.7:1 — swap it in here if the stricter + floor matters. --muted renders secondary labels and hints. */ + --muted: #7c6f64 !important; + --border: #d5c4a1 !important; /* bg2 stroke */ + --separator: #ebdbb2 !important; /* bg1 hairline */ + --field-background: #fbf1c7 !important; /* fields inset like the canvas */ + --field-border: #d5c4a1 !important; + --field-foreground: #3c3836 !important; + --field-placeholder: #928374 !important; /* shared gray, ~3.2:1 */ + --segment: #fbf1c7 !important; + --segment-foreground: #3c3836 !important; + --focus: #d65d0e !important; + --link: #076678 !important; /* aqua, ~5.8:1 on bg0 */ + /* Purple for stat icons / sleep dots. At ~2.4:1 on bg0 it is a + decorative icon color only, same as the app's own pastel stat + accents — never status text. */ + --chart-stat: #d3869b !important; + --sleep: #d3869b !important; + /* Status hues straight from the palette. Bare --success (~4.3:1) and + --warning (~3.3:1) on bg0 are borderline for small text, so they + are reserved for icons and borders; status text sits on the + *-soft washes below, all >= 5.0:1. */ + --success: #79740e !important; + --success-soft: #e3e2b0 !important; + --success-soft-foreground: #4a4a06 !important; /* ~6.9:1 */ + --warning: #b57614 !important; + --warning-soft: #f0dd9f !important; + --warning-soft-foreground: #6b4c06 !important; /* ~5.0:1 */ + --danger: #9d0006 !important; /* ~7.6:1 on bg0 */ + --danger-soft: #f2cfc7 !important; + --danger-soft-foreground: #8a1f14 !important; /* ~6.4:1 */ +} + +/* ---------------------------------------------------------------- */ +/* 2. Gruvbox Dark (gruvbox dark mode: warm charcoal) */ +/* ---------------------------------------------------------------- */ + +.dark { + /* Canvas ramp inverted vs light mode: bg0 canvas -> bg1 card -> + bg2 raised -> bg0_hard wells. Warm, low-chroma browns keep the + retro feel without the blue cast of most dark themes. */ + --background: #282828 !important; /* bg0 */ + --foreground: #ebdbb2 !important; /* fg0, ~11.1:1 on bg0 */ + --surface: #3c3836 !important; /* bg1 */ + --surface-secondary: #504945 !important; /* bg2 */ + --surface-tertiary: #1d2021 !important; /* bg0_hard wells */ + --overlay: #3c3836 !important; + /* Bright orange. Dark bg0 text on it is ~5.8:1 — a clean AA pass, + so primary buttons stay readable at any size. */ + --accent: #fe8019 !important; + --accent-foreground: #282828 !important; /* ~5.8:1 on accent */ + --accent-soft: #4a320f !important; /* orange ember wash */ + --accent-soft-foreground: #febc7a !important; /* ~7.2:1 on accent-soft */ + --default: #504945 !important; + --default-foreground: #ebdbb2 !important; /* ~6.6:1 on default */ + --default-soft: #4a320f !important; /* matches --accent-soft, mirroring the app's own default preset */ + --default-soft-foreground: #febc7a !important; + --muted: #a89984 !important; /* fg3, ~5.3:1 on bg0 */ + --border: #504945 !important; /* bg2 stroke */ + --separator: #3c3836 !important; /* bg1 hairline */ + --field-background: #282828 !important; /* fields inset like the canvas */ + --field-border: #504945 !important; + --field-foreground: #ebdbb2 !important; + --field-placeholder: #928374 !important; /* shared gray, ~4.0:1 */ + --segment: #3c3836 !important; + --segment-foreground: #ebdbb2 !important; + --focus: #fe8019 !important; + --link: #83a598 !important; /* aqua, ~5.5:1 on bg0 */ + --chart-stat: #d3869b !important; /* purple, ~5.4:1 on bg0 */ + --sleep: #d3869b !important; + --success: #b8bb26 !important; /* ~7.1:1 on bg0 */ + --success-soft: #3a3d0d !important; + --success-soft-foreground: #c6c96a !important; /* ~6.5:1 */ + --warning: #fabd2f !important; /* ~8.7:1 on bg0 */ + --warning-soft: #453608 !important; + --warning-soft-foreground: #e6c258 !important; /* ~6.9:1 */ + --danger: #fb4934 !important; /* ~4.3:1 on bg0; text uses danger-soft */ + --danger-soft: #4a2420 !important; + --danger-soft-foreground: #f79689 !important; /* ~6.2:1 */ +} + +/* ---------------------------------------------------------------- */ +/* 3. Legacy preset variants */ +/* ---------------------------------------------------------------- */ + +/* Legacy preset variants carry an extra attribute selector that beats + the plain class selectors above on specificity — restate the tokens + for them so the overlay still wins if the legacy preset is active. + Subset: the tokens the legacy preset itself redefines. */ +.light[data-theme-preset="legacy"], +[data-theme="light"][data-theme-preset="legacy"] { + --background: #fbf1c7 !important; + --foreground: #3c3836 !important; + --surface: #f2e5bc !important; + --surface-secondary: #ebdbb2 !important; + --surface-tertiary: #d5c4a1 !important; + --overlay: #f2e5bc !important; + --accent: #d65d0e !important; + --accent-foreground: #ffffff !important; + --accent-soft: #f5dcae !important; + --accent-soft-foreground: #8a3c05 !important; + --default: #ebdbb2 !important; + --default-foreground: #3c3836 !important; + --muted: #7c6f64 !important; + --border: #d5c4a1 !important; + --separator: #ebdbb2 !important; + --field-background: #fbf1c7 !important; + --field-border: #d5c4a1 !important; + --field-foreground: #3c3836 !important; + --field-placeholder: #928374 !important; + --segment: #fbf1c7 !important; + --segment-foreground: #3c3836 !important; + --focus: #d65d0e !important; + --link: #076678 !important; +} +.dark[data-theme-preset="legacy"], +[data-theme="dark"][data-theme-preset="legacy"] { + --background: #282828 !important; + --foreground: #ebdbb2 !important; + --surface: #3c3836 !important; + --surface-secondary: #504945 !important; + --surface-tertiary: #1d2021 !important; + --overlay: #3c3836 !important; + --accent: #fe8019 !important; + --accent-foreground: #282828 !important; + --accent-soft: #4a320f !important; + --accent-soft-foreground: #febc7a !important; + --default: #504945 !important; + --default-foreground: #ebdbb2 !important; + --muted: #a89984 !important; + --border: #504945 !important; + --separator: #3c3836 !important; + --field-background: #282828 !important; + --field-border: #504945 !important; + --field-foreground: #ebdbb2 !important; + --field-placeholder: #928374 !important; + --segment: #3c3836 !important; + --segment-foreground: #ebdbb2 !important; + --focus: #fe8019 !important; + --link: #83a598 !important; +} + +/* ---------------------------------------------------------------- */ +/* 4. Legacy --gp-* HSL triplets */ +/* ---------------------------------------------------------------- */ + +/* Legacy HSL triplets, for any not-yet-rebuilt screen still reading + the --gp-* variables. They mirror the token values above and are + deliberately plain (no !important): they only fill a fallback. */ +.light { + --gp-bg: 48 87% 88%; /* #fbf1c7 */ + --gp-surface: 46 68% 84%; /* #f2e5bc */ + --gp-card: 46 68% 84%; /* #f2e5bc */ + --gp-border: 40 44% 73%; /* #d5c4a1 */ + --gp-muted: 27 11% 44%; /* #7c6f64 */ + --gp-fg: 20 5% 22%; /* #3c3836 */ + --gp-primary: 24 88% 45%; /* #d65d0e */ + --gp-primary-fg: 0 0% 100%; /* white */ +} +.dark { + --gp-bg: 0 0% 16%; /* #282828 */ + --gp-surface: 20 5% 22%; /* #3c3836 */ + --gp-card: 20 5% 22%; /* #3c3836 */ + --gp-border: 22 10% 29%; /* #504945 */ + --gp-muted: 35 17% 59%; /* #a89984 */ + --gp-fg: 43 59% 81%; /* #ebdbb2 */ + --gp-primary: 27 99% 55%; /* #fe8019 */ + --gp-primary-fg: 0 0% 16%; /* #282828 */ +} diff --git a/gruvbox/theme.yaml b/gruvbox/theme.yaml new file mode 100644 index 0000000..e4fe2dd --- /dev/null +++ b/gruvbox/theme.yaml @@ -0,0 +1,41 @@ +# Theme package. Run `gp-module theme validate ` after editing. +apiVersion: gameplane.local/theme/v1 +name: gruvbox +version: 1.0.0 +displayName: Gruvbox +author: Gameplane +description: "Gruvbox warm retro colors in both modes." +tags: [palette, light, dark] +license: AGPL-3.0-only +homepage: https://github.com/GameplanePanel/themes +tokens: + light: + background: "#fbf1c7" + foreground: "#3c3836" + surface: "#f2e5bc" + surface-secondary: "#ebdbb2" + surface-tertiary: "#d5c4a1" + overlay: "#f2e5bc" + accent: "#d65d0e" + accent-foreground: "#ffffff" + accent-soft: "#f5dcae" + accent-soft-foreground: "#8a3c05" + muted: "#7c6f64" + border: "#d5c4a1" + focus: "#d65d0e" + link: "#076678" + dark: + background: "#282828" + foreground: "#ebdbb2" + surface: "#3c3836" + surface-secondary: "#504945" + surface-tertiary: "#1d2021" + overlay: "#3c3836" + accent: "#fe8019" + accent-foreground: "#282828" + accent-soft: "#4a320f" + accent-soft-foreground: "#febc7a" + muted: "#a89984" + border: "#504945" + focus: "#fe8019" + link: "#83a598" diff --git a/hack/capture-previews.ts b/hack/capture-previews.ts new file mode 100644 index 0000000..3d942ae --- /dev/null +++ b/hack/capture-previews.ts @@ -0,0 +1,214 @@ +// capture-previews.ts — render previews/light.png and previews/dark.png for themes. +// +// It starts the Gameplane dashboard in mock mode (no cluster), applies each +// theme the way an installed theme is applied (tokens plus theme.css), and +// takes one 1280x800 screenshot of the dashboard per mode. +// +// Needs a Gameplane checkout with `npm ci` done in its web/ folder; Playwright +// and its browser come from there. +// +// Usage: +// node hack/capture-previews.ts --web ../Gameplane/web # every theme +// node hack/capture-previews.ts --web ../Gameplane/web nord dracula +// node hack/capture-previews.ts --web ../Gameplane/web --browser /path/to/chromium +// +// --browser uses that Chromium instead of the one Playwright downloaded. +// +// Node 22.18 or newer runs this file directly (type stripping). +// +// theme.yaml is read with a small line reader, not a YAML parser: write the +// tokens one per line, as `gp-module theme init` does. + +import { spawn, type ChildProcess } from "node:child_process"; +import { existsSync, mkdirSync, readdirSync, readFileSync, statSync } from "node:fs"; +import { createRequire } from "node:module"; +import { dirname, join, resolve } from "node:path"; +import { fileURLToPath } from "node:url"; + +const ROOT = resolve(dirname(fileURLToPath(import.meta.url)), ".."); +const PORT = 5199; +const BASE = `http://localhost:${PORT}`; +const VIEWPORT = { width: 1280, height: 800 }; +const MAX_BYTES = 512 * 1024; +const MODES = ["light", "dark"] as const; +type Mode = (typeof MODES)[number]; +type Tokens = Record; + +interface Theme { + name: string; + version: string; + tokens: Partial>; + css: string | null; +} + +function fail(message: string): never { + console.error(message); + process.exit(1); +} + +function parseArgs(argv: string[]): { web: string; browser: string | undefined; names: string[] } { + let web = resolve(ROOT, "..", "Gameplane", "web"); + let browser: string | undefined; + const names: string[] = []; + for (let i = 0; i < argv.length; i += 1) { + const arg = argv[i]; + if (arg === "--web") { + const value = argv[i + 1]; + if (!value) fail("--web needs a path"); + web = resolve(value); + i += 1; + } else if (arg === "--browser") { + const value = argv[i + 1]; + if (!value) fail("--browser needs a path"); + browser = resolve(value); + i += 1; + } else if (arg.startsWith("-")) { + fail(`unknown flag: ${arg}`); + } else { + names.push(arg.replace(/\/$/, "")); + } + } + return { web, browser, names }; +} + +function themeNames(): string[] { + return readdirSync(ROOT) + .filter((entry) => existsSync(join(ROOT, entry, "theme.yaml"))) + .sort(); +} + +function readTheme(name: string): Theme { + const dir = join(ROOT, name); + const lines = readFileSync(join(dir, "theme.yaml"), "utf8").split("\n"); + const tokens: Partial> = {}; + let version = ""; + let inTokens = false; + let mode: Mode | null = null; + for (const line of lines) { + const top = /^([A-Za-z]+):\s*(.*)$/.exec(line); + if (top) { + inTokens = top[1] === "tokens"; + mode = null; + if (top[1] === "version") version = top[2].replace(/^["']|["']$/g, ""); + continue; + } + if (!inTokens) continue; + const modeLine = /^ {2}(light|dark):\s*$/.exec(line); + if (modeLine) { + mode = modeLine[1] as Mode; + tokens[mode] = {}; + continue; + } + const token = /^ {4}([a-z-]+):\s*["']?(#[0-9a-f]{6})["']?\s*$/.exec(line); + if (token && mode) tokens[mode]![token[1]] = token[2]; + } + if (!version) fail(`${name}: no version in theme.yaml`); + if (!tokens.light && !tokens.dark) fail(`${name}: no tokens read from theme.yaml`); + const cssPath = join(dir, "theme.css"); + const css = existsSync(cssPath) ? readFileSync(cssPath, "utf8") : ""; + return { name, version, tokens, css: css.trim() ? css : null }; +} + +async function waitForServer(server: ChildProcess): Promise { + const deadline = Date.now() + 90_000; + while (Date.now() < deadline) { + if (server.exitCode !== null) fail(`the dashboard dev server exited with code ${server.exitCode}`); + try { + const res = await fetch(BASE); + if (res.ok) return; + } catch { + // not listening yet + } + await new Promise((done) => setTimeout(done, 500)); + } + fail("the dashboard dev server did not start within 90 seconds"); +} + +async function main(): Promise { + const { web, browser: browserPath, names } = parseArgs(process.argv.slice(2)); + if (!existsSync(join(web, "node_modules", "playwright"))) { + fail(`${web} has no node_modules/playwright: pass --web /web and run npm ci there first`); + } + const wanted = names.length > 0 ? names : themeNames(); + const themes = wanted.map(readTheme); + + const { chromium } = createRequire(join(web, "package.json"))("playwright") as typeof import("playwright"); + + const server = spawn("npx", ["vite", "--mode", "mock", "--port", String(PORT), "--strictPort"], { + cwd: web, + stdio: "ignore", + detached: true, + }); + const stopServer = (): void => { + if (server.pid !== undefined && server.exitCode === null) { + try { + process.kill(-server.pid); + } catch { + // already gone + } + } + }; + process.on("exit", stopServer); + + let failed = false; + try { + await waitForServer(server); + const browser = await chromium.launch(browserPath ? { executablePath: browserPath } : {}); + try { + for (const theme of themes) { + for (const mode of MODES) { + if (!theme.tokens[mode]) continue; + const prefs = { + themeType: "installed", + presetId: "pink", + appearanceMode: mode, + customColors: null, + customCssEnabled: false, + customCss: null, + installedThemeId: 1, + installedTheme: { tokens: theme.tokens, css: theme.css, version: theme.version }, + }; + const context = await browser.newContext({ + viewport: VIEWPORT, + deviceScaleFactor: 1, + colorScheme: mode, + timezoneId: "UTC", + reducedMotion: "reduce", + }); + await context.addInitScript(() => { + window.localStorage.setItem("gameplane-e2e-dataset", "screenshots"); + }); + const page = await context.newPage(); + await page.goto(`${BASE}/`); + await page.getByRole("main").first().waitFor({ timeout: 30_000 }); + await page.waitForLoadState("networkidle"); + // The dev server serves the dashboard's own modules, so this is the + // same function the dashboard calls for an installed theme. + await page.evaluate(async (stored) => { + const lib = (await import(/* @vite-ignore */ "/src/lib/useThemePreferences.ts" as string)) as { + applyThemePreferences: (prefs: unknown) => void; + }; + lib.applyThemePreferences(stored); + }, prefs); + await page.waitForSelector('html[data-theme-type="installed"]', { state: "attached", timeout: 10_000 }); + await page.waitForTimeout(500); + const out = join(ROOT, theme.name, "previews", `${mode}.png`); + mkdirSync(dirname(out), { recursive: true }); + await page.screenshot({ path: out, type: "png", fullPage: false }); + await context.close(); + const size = statSync(out).size; + const tooBig = size > MAX_BYTES; + if (tooBig) failed = true; + console.log(`${theme.name}/previews/${mode}.png ${Math.round(size / 1024)} KiB${tooBig ? " (over the 512 KiB limit)" : ""}`); + } + } + } finally { + await browser.close(); + } + } finally { + stopServer(); + } + if (failed) process.exit(1); +} + +await main(); diff --git a/high-contrast-focus/previews/dark.png b/high-contrast-focus/previews/dark.png new file mode 100644 index 0000000..b54caea Binary files /dev/null and b/high-contrast-focus/previews/dark.png differ diff --git a/high-contrast-focus/previews/light.png b/high-contrast-focus/previews/light.png new file mode 100644 index 0000000..7946755 Binary files /dev/null and b/high-contrast-focus/previews/light.png differ diff --git a/high-contrast-focus/theme.css b/high-contrast-focus/theme.css new file mode 100644 index 0000000..76b4546 --- /dev/null +++ b/high-contrast-focus/theme.css @@ -0,0 +1,86 @@ +/* High Contrast Focus: official Gameplane theme. */ +/* ---------------------------------------------------------------- */ +/* 1. Stronger borders and muted text — both modes */ +/* ---------------------------------------------------------------- */ + +:root, +.light { + --border: #9ca3af !important; /* gray-400 — clearly visible on white */ + --separator: #9ca3af !important; + --field-border: #6b7280 !important; /* gray-500 — inputs read as fields */ + --muted: #4b5563 !important; /* gray-600 — 7.0:1 on white */ +} +.dark { + --border: #6b7280 !important; /* gray-500 — clearly visible on near-black */ + --separator: #6b7280 !important; + --field-border: #9ca3af !important; + --muted: #c9ccd3 !important; /* ~10:1 on the dark background */ +} +/* Legacy preset variants redeclare these tokens with an extra + attribute selector that outranks the plain class selectors above — + restate them so the overlay wins there too. */ +.light[data-theme-preset="legacy"], +[data-theme="light"][data-theme-preset="legacy"] { + --border: #9ca3af !important; + --separator: #9ca3af !important; + --field-border: #6b7280 !important; + --muted: #4b5563 !important; +} +.dark[data-theme-preset="legacy"], +[data-theme="dark"][data-theme-preset="legacy"] { + --border: #6b7280 !important; + --separator: #6b7280 !important; + --field-border: #9ca3af !important; + --muted: #c9ccd3 !important; +} + +/* ---------------------------------------------------------------- */ +/* 2. Unmissable keyboard focus */ +/* ---------------------------------------------------------------- */ +/* A single global ring on every focusable element, in the theme's own + --focus color. outline (not box-shadow) so it also shows up in + forced-colors mode as a system-painted outline. */ +a:focus-visible, +button:focus-visible, +input:focus-visible, +select:focus-visible, +textarea:focus-visible, +[role="button"]:focus-visible, +[role="link"]:focus-visible, +[role="tab"]:focus-visible, +[role="menuitem"]:focus-visible, +[role="option"]:focus-visible, +[role="switch"]:focus-visible, +[role="checkbox"]:focus-visible, +[tabindex]:focus-visible { + outline: 3px solid var(--focus) !important; + outline-offset: 2px !important; +} + +/* Table rows are focused by react-aria with a data attribute rather + than :focus-visible; the app already gives them a 2px ring — thicken + it to match. */ +.table__row:is(:focus-visible, [data-focus-visible="true"]) { + outline: 3px solid var(--focus) !important; + outline-offset: -2px !important; +} + +/* Dialog inputs paint their focus as border + inset ring instead of an + outline (an outer outline would be clipped by the modal body) — + keep that pattern but make it 2px so it reads at the same weight. */ +.modal__dialog .input:focus-visible { + outline: none !important; + border-color: var(--accent) !important; + box-shadow: inset 0 0 0 2px var(--accent) !important; +} + +/* ---------------------------------------------------------------- */ +/* 3. Underlined text links in page content */ +/* ---------------------------------------------------------------- */ +/* Scoped to
so sidebar/topbar navigation links stay clean, and + excluding .button anchors ("Create server" and friends) which are + already visually buttons. */ +main a:not(.button):not([role="button"]) { + text-decoration: underline; + text-underline-offset: 2px; +} diff --git a/high-contrast-focus/theme.yaml b/high-contrast-focus/theme.yaml new file mode 100644 index 0000000..905a1e3 --- /dev/null +++ b/high-contrast-focus/theme.yaml @@ -0,0 +1,41 @@ +# Theme package. Run `gp-module theme validate ` after editing. +apiVersion: gameplane.local/theme/v1 +name: high-contrast-focus +version: 1.0.0 +displayName: High Contrast Focus +author: Gameplane +description: "Stronger borders and muted text, a global focus ring, and underlined content links." +tags: [accessibility, light, dark] +license: AGPL-3.0-only +homepage: https://github.com/GameplanePanel/themes +tokens: + light: + background: "#ffffff" + foreground: "#2a0f1e" + surface: "#fff7fb" + surface-secondary: "#f8dde9" + surface-tertiary: "#f8dde9" + overlay: "#fff7fb" + accent: "#db2777" + accent-foreground: "#ffffff" + accent-soft: "#ffffff" + accent-soft-foreground: "#be185d" + muted: "#4b5563" + border: "#9ca3af" + focus: "#db2777" + link: "#2563eb" + dark: + background: "#121114" + foreground: "#f5f3f7" + surface: "#1c1a20" + surface-secondary: "#17151a" + surface-tertiary: "#141317" + overlay: "#201e24" + accent: "#ff4fa3" + accent-foreground: "#ffffff" + accent-soft: "#331525" + accent-soft-foreground: "#ff8ac4" + muted: "#c9ccd3" + border: "#6b7280" + focus: "#ff4fa3" + link: "#7db4ff" diff --git a/kinetic-hover/previews/dark.png b/kinetic-hover/previews/dark.png new file mode 100644 index 0000000..7a67d35 Binary files /dev/null and b/kinetic-hover/previews/dark.png differ diff --git a/kinetic-hover/previews/light.png b/kinetic-hover/previews/light.png new file mode 100644 index 0000000..053be14 Binary files /dev/null and b/kinetic-hover/previews/light.png differ diff --git a/kinetic-hover/theme.css b/kinetic-hover/theme.css new file mode 100644 index 0000000..5c77c50 --- /dev/null +++ b/kinetic-hover/theme.css @@ -0,0 +1,43 @@ +/* Kinetic Hover: official Gameplane theme. */ +a, +button, +[role="button"], +main .card { + transition: transform 150ms cubic-bezier(.2, .8, .2, 1), box-shadow 150ms ease; +} + +a:hover, +button:hover, +[role="button"]:hover { + transform: translateY(-2px); +} + +main .card:hover { + transform: translateY(-3px) scale(1.006); + box-shadow: 0 14px 28px color-mix(in srgb, var(--foreground) 14%, transparent); +} + +a:active, +button:active, +[role="button"]:active { + transform: translateY(1px) scale(.99); +} + +:is(a, button, [role="button"]):focus-visible { + outline: 2px solid var(--focus); + outline-offset: 3px; +} + +@media (prefers-reduced-motion: reduce) { + a, + button, + [role="button"], + main .card { transition: none; } + a:hover, + button:hover, + [role="button"]:hover, + main .card:hover, + a:active, + button:active, + [role="button"]:active { transform: none; } +} diff --git a/kinetic-hover/theme.yaml b/kinetic-hover/theme.yaml new file mode 100644 index 0000000..11c3a17 --- /dev/null +++ b/kinetic-hover/theme.yaml @@ -0,0 +1,41 @@ +# Theme package. Run `gp-module theme validate ` after editing. +apiVersion: gameplane.local/theme/v1 +name: kinetic-hover +version: 1.0.0 +displayName: Kinetic Hover +author: Gameplane +description: "Responsive hover and press feedback with reduced-motion support." +tags: [motion, light, dark] +license: AGPL-3.0-only +homepage: https://github.com/GameplanePanel/themes +tokens: + light: + background: "#ffffff" + foreground: "#2a0f1e" + surface: "#fff7fb" + surface-secondary: "#f8dde9" + surface-tertiary: "#f8dde9" + overlay: "#fff7fb" + accent: "#db2777" + accent-foreground: "#ffffff" + accent-soft: "#ffffff" + accent-soft-foreground: "#be185d" + muted: "#6e5262" + border: "#efc3d6" + focus: "#db2777" + link: "#2563eb" + dark: + background: "#121114" + foreground: "#f5f3f7" + surface: "#1c1a20" + surface-secondary: "#17151a" + surface-tertiary: "#141317" + overlay: "#201e24" + accent: "#ff4fa3" + accent-foreground: "#ffffff" + accent-soft: "#331525" + accent-soft-foreground: "#ff8ac4" + muted: "#9e98a6" + border: "#2c2932" + focus: "#ff4fa3" + link: "#7db4ff" diff --git a/large-type/previews/dark.png b/large-type/previews/dark.png new file mode 100644 index 0000000..8c74524 Binary files /dev/null and b/large-type/previews/dark.png differ diff --git a/large-type/previews/light.png b/large-type/previews/light.png new file mode 100644 index 0000000..5b4de5c Binary files /dev/null and b/large-type/previews/light.png differ diff --git a/large-type/theme.css b/large-type/theme.css new file mode 100644 index 0000000..4910411 --- /dev/null +++ b/large-type/theme.css @@ -0,0 +1,34 @@ +/* Large Type: official Gameplane theme. */ +/* ---------------------------------------------------------------- */ +/* 1. Global scale — enlarge every rem-based utility at once */ +/* ---------------------------------------------------------------- */ + +html { + font-size: 18px; /* default is 16px; 18/16 = 1.125x everywhere */ +} + +/* ---------------------------------------------------------------- */ +/* 2. Px-pinned geometry that does not follow the root font size */ +/* ---------------------------------------------------------------- */ + +/* Modal dialog geometry (pinned to 20px padding / 16px gaps in + globals.css for the design scale) — re-pin proportionally larger. */ +.modal__dialog { + padding: 22px; +} +.modal__body { + gap: 18px; + padding: 14px 0 0; +} +.modal__footer { + padding: 18px 0 0; + gap: 8px; +} + +/* Dialog field controls are pinned to 36px tall in globals.css for the + design scale — raise them to 40px to match the roomier dialogs (and + to stay a comfortable touch/click target at the larger scale). */ +.modal__dialog .input, +.modal__dialog .select__trigger { + height: 40px; +} diff --git a/large-type/theme.yaml b/large-type/theme.yaml new file mode 100644 index 0000000..e6bd4f8 --- /dev/null +++ b/large-type/theme.yaml @@ -0,0 +1,41 @@ +# Theme package. Run `gp-module theme validate ` after editing. +apiVersion: gameplane.local/theme/v1 +name: large-type +version: 1.0.0 +displayName: Large Type +author: Gameplane +description: "Scales the whole interface up through the root font size. No color changes." +tags: [density, light, dark] +license: AGPL-3.0-only +homepage: https://github.com/GameplanePanel/themes +tokens: + light: + background: "#ffffff" + foreground: "#2a0f1e" + surface: "#fff7fb" + surface-secondary: "#f8dde9" + surface-tertiary: "#f8dde9" + overlay: "#fff7fb" + accent: "#db2777" + accent-foreground: "#ffffff" + accent-soft: "#ffffff" + accent-soft-foreground: "#be185d" + muted: "#6e5262" + border: "#efc3d6" + focus: "#db2777" + link: "#2563eb" + dark: + background: "#121114" + foreground: "#f5f3f7" + surface: "#1c1a20" + surface-secondary: "#17151a" + surface-tertiary: "#141317" + overlay: "#201e24" + accent: "#ff4fa3" + accent-foreground: "#ffffff" + accent-soft: "#331525" + accent-soft-foreground: "#ff8ac4" + muted: "#9e98a6" + border: "#2c2932" + focus: "#ff4fa3" + link: "#7db4ff" diff --git a/lavender-dream/previews/dark.png b/lavender-dream/previews/dark.png new file mode 100644 index 0000000..2cf5f33 Binary files /dev/null and b/lavender-dream/previews/dark.png differ diff --git a/lavender-dream/previews/light.png b/lavender-dream/previews/light.png new file mode 100644 index 0000000..4f6166b Binary files /dev/null and b/lavender-dream/previews/light.png differ diff --git a/lavender-dream/theme.css b/lavender-dream/theme.css new file mode 100644 index 0000000..7e20587 --- /dev/null +++ b/lavender-dream/theme.css @@ -0,0 +1,51 @@ +/* Lavender Dream: official Gameplane theme. */ +html.dark[data-theme][data-theme-preset][data-theme-type] { + --background: #171321; + --foreground: #f4efff; + --surface: #211b30; + --surface-secondary: #1b1728; + --surface-tertiary: #29223a; + --overlay: #332a49; + --accent: #c4a7ff; + --accent-foreground: #241440; + --accent-soft: #382c51; + --accent-soft-foreground: #dcc8ff; + --default: #2d263b; + --default-foreground: #f4efff; + --border: #49405e; + --separator: #393148; + --muted: #b6abc9; + --field-background: #1b1728; + --field-border: #504468; + --field-foreground: #fbf8ff; + --field-placeholder: #9f91b8; + --focus: #d4bcff; + --link: #d0bdff; + --radius: 18px; + --radius-md: var(--radius); + --radius-lg: calc(var(--radius) + 2px); + --field-radius: 12px; +} +html.light[data-theme][data-theme-preset][data-theme-type] { + --background: #f8f5ff; + --foreground: #302348; + --surface: #fefcff; + --surface-secondary: #f0eaff; + --surface-tertiary: #e6dcfa; + --overlay: #fefcff; + --accent: #7043c2; + --accent-foreground: #fff; + --accent-soft: #e6d9ff; + --accent-soft-foreground: #50318b; + --default: #eee6fa; + --default-foreground: #382950; + --border: #d5c8eb; + --separator: #e5dcf1; + --muted: #6e6082; + --field-background: #fff; + --field-border: #d1c3e8; + --field-foreground: #302348; + --field-placeholder: #7a6b8e; + --focus: #7043c2; + --link: #6035ae; +} diff --git a/lavender-dream/theme.yaml b/lavender-dream/theme.yaml new file mode 100644 index 0000000..49bce1f --- /dev/null +++ b/lavender-dream/theme.yaml @@ -0,0 +1,41 @@ +# Theme package. Run `gp-module theme validate ` after editing. +apiVersion: gameplane.local/theme/v1 +name: lavender-dream +version: 1.0.0 +displayName: Lavender Dream +author: Gameplane +description: "Lilac surfaces, violet controls, and generous corners." +tags: [palette, light, dark] +license: AGPL-3.0-only +homepage: https://github.com/GameplanePanel/themes +tokens: + light: + background: "#f8f5ff" + foreground: "#302348" + surface: "#fefcff" + surface-secondary: "#f0eaff" + surface-tertiary: "#e6dcfa" + overlay: "#fefcff" + accent: "#7043c2" + accent-foreground: "#ffffff" + accent-soft: "#e6d9ff" + accent-soft-foreground: "#50318b" + muted: "#6e6082" + border: "#d5c8eb" + focus: "#7043c2" + link: "#6035ae" + dark: + background: "#171321" + foreground: "#f4efff" + surface: "#211b30" + surface-secondary: "#1b1728" + surface-tertiary: "#29223a" + overlay: "#332a49" + accent: "#c4a7ff" + accent-foreground: "#241440" + accent-soft: "#382c51" + accent-soft-foreground: "#dcc8ff" + muted: "#b6abc9" + border: "#49405e" + focus: "#d4bcff" + link: "#d0bdff" diff --git a/no-motion/previews/dark.png b/no-motion/previews/dark.png new file mode 100644 index 0000000..7a67d35 Binary files /dev/null and b/no-motion/previews/dark.png differ diff --git a/no-motion/previews/light.png b/no-motion/previews/light.png new file mode 100644 index 0000000..053be14 Binary files /dev/null and b/no-motion/previews/light.png differ diff --git a/no-motion/theme.css b/no-motion/theme.css new file mode 100644 index 0000000..bdf97c5 --- /dev/null +++ b/no-motion/theme.css @@ -0,0 +1,21 @@ +/* No Motion: official Gameplane theme. */ +/* ---------------------------------------------------------------- */ +/* 1. Near-zero every transition and animation, app-wide */ +/* ---------------------------------------------------------------- */ + +*, +*::before, +*::after { + transition-duration: 0.01ms !important; + animation-duration: 0.01ms !important; + animation-iteration-count: 1 !important; /* stop loops, not just slow them */ + scroll-behavior: auto !important; /* also covers inner scroll containers */ +} + +/* ---------------------------------------------------------------- */ +/* 2. Instant anchor / history scrolling */ +/* ---------------------------------------------------------------- */ + +html { + scroll-behavior: auto; +} diff --git a/no-motion/theme.yaml b/no-motion/theme.yaml new file mode 100644 index 0000000..67bca25 --- /dev/null +++ b/no-motion/theme.yaml @@ -0,0 +1,41 @@ +# Theme package. Run `gp-module theme validate ` after editing. +apiVersion: gameplane.local/theme/v1 +name: no-motion +version: 1.0.0 +displayName: No Motion +author: Gameplane +description: "Turns off nearly all transitions and animations across the app." +tags: [motion, light, dark] +license: AGPL-3.0-only +homepage: https://github.com/GameplanePanel/themes +tokens: + light: + background: "#ffffff" + foreground: "#2a0f1e" + surface: "#fff7fb" + surface-secondary: "#f8dde9" + surface-tertiary: "#f8dde9" + overlay: "#fff7fb" + accent: "#db2777" + accent-foreground: "#ffffff" + accent-soft: "#ffffff" + accent-soft-foreground: "#be185d" + muted: "#6e5262" + border: "#efc3d6" + focus: "#db2777" + link: "#2563eb" + dark: + background: "#121114" + foreground: "#f5f3f7" + surface: "#1c1a20" + surface-secondary: "#17151a" + surface-tertiary: "#141317" + overlay: "#201e24" + accent: "#ff4fa3" + accent-foreground: "#ffffff" + accent-soft: "#331525" + accent-soft-foreground: "#ff8ac4" + muted: "#9e98a6" + border: "#2c2932" + focus: "#ff4fa3" + link: "#7db4ff" diff --git a/nord/previews/dark.png b/nord/previews/dark.png new file mode 100644 index 0000000..edf7e2c Binary files /dev/null and b/nord/previews/dark.png differ diff --git a/nord/previews/light.png b/nord/previews/light.png new file mode 100644 index 0000000..a594f7d Binary files /dev/null and b/nord/previews/light.png differ diff --git a/nord/theme.css b/nord/theme.css new file mode 100644 index 0000000..e5d16b9 --- /dev/null +++ b/nord/theme.css @@ -0,0 +1,211 @@ +/* Nord: official Gameplane theme. */ +/* ---------------------------------------------------------------- */ +/* 1. Nord Light — Snow Storm */ +/* ---------------------------------------------------------------- */ + +:root, +.light { + --background: #eceff4 !important; /* nord6 */ + --foreground: #2e3440 !important; /* nord0, ~10.8:1 on background */ + --surface: #e5e9f0 !important; /* nord5 */ + --surface-secondary: #d8dee9 !important; /* nord4 */ + --surface-tertiary: #ccd5e1 !important; /* pressed/well, one step below nord4 */ + --overlay: #e5e9f0 !important; + --accent: #88c0d0 !important; /* nord8, frost */ + --accent-foreground: #2e3440 !important; /* ~6.2:1 on accent */ + --accent-soft: #d8e6ee !important; + --accent-soft-foreground: #3b6b7d !important; /* ~4.6:1 on accent-soft */ + --default: #d8dee9 !important; /* nord4 */ + --default-foreground: #2e3440 !important; + --default-soft: #dde3ee !important; + --default-soft-foreground: #3b4252 !important; /* nord1, ~7.6:1 on default-soft */ + --muted: #4c566a !important; /* nord3, ~6.4:1 on background */ + --border: #d8dee9 !important; /* nord4 */ + --separator: #dfe4ec !important; /* hairline, a touch lighter than border */ + --field-background: #eceff4 !important; + --field-border: #c3cddd !important; /* darker than border so inputs read as inputs */ + --field-foreground: #2e3440 !important; + --field-placeholder: #7b8496 !important; /* ~3.3:1 on field bg; placeholder text is exempt from the 4.5:1 rule */ + --segment: #e5e9f0 !important; + --segment-foreground: #2e3440 !important; + --focus: #88c0d0 !important; /* matches accent */ + /* ~2.3:1 on background — below the 4.5:1 text rule; links stay + underlined (SC 1.4.1) so they remain distinguishable. */ + --link: #81a1c1 !important; /* nord9, frost */ + --chart-stat: #b48ead !important; /* nord15; icon/illustrative, not text */ + --sleep: #b48ead !important; /* nord15 */ + --success: #a3be8c !important; /* nord14, aurora */ + --success-soft: #e0e8d3 !important; + --success-soft-foreground: #4c6639 !important; /* ~5.1:1 on success-soft */ + --warning: #ebcb8b !important; /* nord13, aurora */ + --warning-soft: #f2e4c4 !important; + --warning-soft-foreground: #7a5b1e !important; /* ~4.9:1 on warning-soft */ + --danger: #bf616a !important; /* nord11, aurora */ + --danger-soft: #eed4d7 !important; + --danger-soft-foreground: #8c3f47 !important; /* ~5.2:1 on danger-soft */ +} + +/* ---------------------------------------------------------------- */ +/* 2. Nord Dark — Polar Night */ +/* ---------------------------------------------------------------- */ + +.dark { + --background: #2e3440 !important; /* nord0 */ + --foreground: #d8dee9 !important; /* nord4, ~9.2:1 on background */ + --surface: #3b4252 !important; /* nord1 */ + --surface-secondary: #434c5e !important; /* nord2 */ + --surface-tertiary: #333a47 !important; /* pressed/well, one step below nord0 */ + --overlay: #3b4252 !important; + --accent: #88c0d0 !important; /* nord8, frost */ + --accent-foreground: #2e3440 !important; /* ~6.2:1 on accent */ + --accent-soft: #3d5462 !important; + --accent-soft-foreground: #a8d3e0 !important; /* ~4.9:1 on accent-soft */ + --default: #434c5e !important; /* nord2 */ + --default-foreground: #d8dee9 !important; /* ~6.2:1 on default */ + --default-soft: #3a4356 !important; + --default-soft-foreground: #c3cadb !important; /* ~6.0:1 on default-soft */ + /* A lightened Polar Night grey rather than nord3 itself: nord3 + (#4c566a) is only ~3:1 here, this value is ~4.8:1 on background. */ + --muted: #9aa2b4 !important; + --border: #434c5e !important; /* nord2 */ + --separator: #3b4252 !important; /* hairline, matches surface */ + --field-background: #2e3440 !important; /* inset against the nord1 card */ + --field-border: #4c566a !important; /* nord3 */ + --field-foreground: #eceff4 !important; /* nord6, ~10.7:1 on field bg */ + --field-placeholder: #7b8496 !important; /* ~3.3:1 on field bg; placeholder text is exempt from the 4.5:1 rule */ + --segment: #3b4252 !important; + --segment-foreground: #d8dee9 !important; + --focus: #88c0d0 !important; /* matches accent */ + --link: #81a1c1 !important; /* nord9, ~4.6:1 on background */ + --chart-stat: #b48ead !important; /* nord15; ~4.4:1 on background, icon/illustrative */ + --sleep: #b48ead !important; /* nord15 */ + --success: #a3be8c !important; /* nord14, aurora, ~6.1:1 on background */ + --success-soft: #37473b !important; + --success-soft-foreground: #b5d29e !important; /* ~5.9:1 on success-soft */ + --warning: #ebcb8b !important; /* nord13, aurora, ~8:1 on background */ + --warning-soft: #4a4030 !important; + --warning-soft-foreground: #e8cd8f !important; /* ~6.5:1 on warning-soft */ + /* ~3:1 on background — fine for icons and large text; body danger + text is expected on --danger-soft (~5.9:1). */ + --danger: #bf616a !important; /* nord11, aurora */ + --danger-soft: #46323a !important; + --danger-soft-foreground: #e3aab0 !important; /* ~5.9:1 on danger-soft */ +} + +/* ---------------------------------------------------------------- */ +/* 3. Legacy preset restatements */ +/* ---------------------------------------------------------------- */ +/* Legacy preset variants carry an extra attribute selector that beats + the plain class selectors above on specificity — restate every token + for them so the overlay still wins if the legacy preset is active. */ + +.light[data-theme-preset="legacy"], +[data-theme="light"][data-theme-preset="legacy"] { + --background: #eceff4 !important; + --foreground: #2e3440 !important; + --surface: #e5e9f0 !important; + --surface-secondary: #d8dee9 !important; + --surface-tertiary: #ccd5e1 !important; + --overlay: #e5e9f0 !important; + --accent: #88c0d0 !important; + --accent-foreground: #2e3440 !important; + --accent-soft: #d8e6ee !important; + --accent-soft-foreground: #3b6b7d !important; + --default: #d8dee9 !important; + --default-foreground: #2e3440 !important; + --default-soft: #dde3ee !important; + --default-soft-foreground: #3b4252 !important; + --muted: #4c566a !important; + --border: #d8dee9 !important; + --separator: #dfe4ec !important; + --field-background: #eceff4 !important; + --field-border: #c3cddd !important; + --field-foreground: #2e3440 !important; + --field-placeholder: #7b8496 !important; + --segment: #e5e9f0 !important; + --segment-foreground: #2e3440 !important; + --focus: #88c0d0 !important; + --link: #81a1c1 !important; + --chart-stat: #b48ead !important; + --sleep: #b48ead !important; + --success: #a3be8c !important; + --success-soft: #e0e8d3 !important; + --success-soft-foreground: #4c6639 !important; + --warning: #ebcb8b !important; + --warning-soft: #f2e4c4 !important; + --warning-soft-foreground: #7a5b1e !important; + --danger: #bf616a !important; + --danger-soft: #eed4d7 !important; + --danger-soft-foreground: #8c3f47 !important; +} + +.dark[data-theme-preset="legacy"], +[data-theme="dark"][data-theme-preset="legacy"] { + --background: #2e3440 !important; + --foreground: #d8dee9 !important; + --surface: #3b4252 !important; + --surface-secondary: #434c5e !important; + --surface-tertiary: #333a47 !important; + --overlay: #3b4252 !important; + --accent: #88c0d0 !important; + --accent-foreground: #2e3440 !important; + --accent-soft: #3d5462 !important; + --accent-soft-foreground: #a8d3e0 !important; + --default: #434c5e !important; + --default-foreground: #d8dee9 !important; + --default-soft: #3a4356 !important; + --default-soft-foreground: #c3cadb !important; + --muted: #9aa2b4 !important; + --border: #434c5e !important; + --separator: #3b4252 !important; + --field-background: #2e3440 !important; + --field-border: #4c566a !important; + --field-foreground: #eceff4 !important; + --field-placeholder: #7b8496 !important; + --segment: #3b4252 !important; + --segment-foreground: #d8dee9 !important; + --focus: #88c0d0 !important; + --link: #81a1c1 !important; + --chart-stat: #b48ead !important; + --sleep: #b48ead !important; + --success: #a3be8c !important; + --success-soft: #37473b !important; + --success-soft-foreground: #b5d29e !important; + --warning: #ebcb8b !important; + --warning-soft: #4a4030 !important; + --warning-soft-foreground: #e8cd8f !important; + --danger: #bf616a !important; + --danger-soft: #46323a !important; + --danger-soft-foreground: #e3aab0 !important; +} + +/* ---------------------------------------------------------------- */ +/* 4. Legacy --gp-* HSL triplets */ +/* ---------------------------------------------------------------- */ +/* Bare HSL triplets (no hsl() wrapper, NO !important) for any + not-yet-rebuilt screen still reading the legacy --gp-* variables. + Plain .light/.dark selectors on purpose: these feed old screens only + and must stay easy for a later preset to override, mirroring how the + app's own legacy blocks declare them. */ + +.light { + --gp-bg: 218 27% 94%; + --gp-surface: 218 27% 92%; + --gp-card: 218 30% 95%; + --gp-border: 219 28% 88%; + --gp-muted: 222 16% 36%; + --gp-fg: 222 16% 22%; + --gp-primary: 193 43% 67%; + --gp-primary-fg: 222 16% 22%; +} + +.dark { + --gp-bg: 222 16% 22%; + --gp-surface: 222 16% 28%; + --gp-card: 222 16% 28%; + --gp-border: 222 17% 32%; + --gp-muted: 222 15% 65%; + --gp-fg: 219 28% 88%; + --gp-primary: 193 43% 67%; + --gp-primary-fg: 222 16% 22%; +} diff --git a/nord/theme.yaml b/nord/theme.yaml new file mode 100644 index 0000000..54076f8 --- /dev/null +++ b/nord/theme.yaml @@ -0,0 +1,41 @@ +# Theme package. Run `gp-module theme validate ` after editing. +apiVersion: gameplane.local/theme/v1 +name: nord +version: 1.0.0 +displayName: Nord +author: Gameplane +description: "Nord: Snow Storm in light mode and Polar Night in dark mode." +tags: [palette, light, dark] +license: AGPL-3.0-only +homepage: https://github.com/GameplanePanel/themes +tokens: + light: + background: "#eceff4" + foreground: "#2e3440" + surface: "#e5e9f0" + surface-secondary: "#d8dee9" + surface-tertiary: "#ccd5e1" + overlay: "#e5e9f0" + accent: "#88c0d0" + accent-foreground: "#2e3440" + accent-soft: "#d8e6ee" + accent-soft-foreground: "#3b6b7d" + muted: "#4c566a" + border: "#d8dee9" + focus: "#88c0d0" + link: "#81a1c1" + dark: + background: "#2e3440" + foreground: "#d8dee9" + surface: "#3b4252" + surface-secondary: "#434c5e" + surface-tertiary: "#333a47" + overlay: "#3b4252" + accent: "#88c0d0" + accent-foreground: "#2e3440" + accent-soft: "#3d5462" + accent-soft-foreground: "#a8d3e0" + muted: "#9aa2b4" + border: "#434c5e" + focus: "#88c0d0" + link: "#81a1c1" diff --git a/ocean-deep/previews/dark.png b/ocean-deep/previews/dark.png new file mode 100644 index 0000000..ed11b57 Binary files /dev/null and b/ocean-deep/previews/dark.png differ diff --git a/ocean-deep/previews/light.png b/ocean-deep/previews/light.png new file mode 100644 index 0000000..4cece43 Binary files /dev/null and b/ocean-deep/previews/light.png differ diff --git a/ocean-deep/theme.css b/ocean-deep/theme.css new file mode 100644 index 0000000..a8230e1 --- /dev/null +++ b/ocean-deep/theme.css @@ -0,0 +1,182 @@ +/* Ocean Deep: official Gameplane theme. */ +/* ---------------------------------------------------------------- */ +/* 1. Abyssal palette — dark mode (the primary look) */ +/* ---------------------------------------------------------------- */ +/* Dark-first: this is the mode the palette is designed around. */ + +.dark { + --background: #0a1628 !important; /* abyssal navy */ + --foreground: #dbeafe !important; /* blue-100, ~14.9:1 on background */ + --surface: #0f1e33 !important; /* raised cards */ + --surface-secondary: #14273f !important; /* wells, sidebars */ + --surface-tertiary: #1a3350 !important; /* hover / pressed highlight */ + --overlay: #0f1e33 !important; /* dialogs sit one depth up */ + --accent: #22d3ee !important; /* bioluminescent cyan */ + --accent-foreground: #06283f !important; /* very dark navy, ~8.4:1 on accent */ + --accent-soft: #0d3542 !important; + --accent-soft-foreground: #67e8f9 !important; /* cyan-300, ~9:1 on accent-soft */ + --default: #14273f !important; + --default-foreground: #dbeafe !important; + --default-soft: #112a44 !important; + --default-soft-foreground: #bfdbfe !important; /* blue-200 */ + --muted: #7b9cc4 !important; /* ~6.4:1 on background */ + --border: #1e3a5f !important; /* deep-water line */ + --separator: #17293f !important; + --field-background: #0d1c30 !important; + --field-border: #1e3a5f !important; + --field-foreground: #e0f2fe !important; + --field-placeholder: #6d8cb2 !important; /* ~4.9:1 on field-background */ + --segment: #0f1e33 !important; + --segment-foreground: #dbeafe !important; + --focus: #22d3ee !important; + --link: #38bdf8 !important; /* sky-400, ~8.5:1 on background */ + --chart-stat: #818cf8 !important; /* indigo-400, instrument glow */ + --sleep: #818cf8 !important; + --success: #34d399 !important; /* emerald-400, ~9.4:1 on background */ + --success-soft: #0c3328 !important; + --success-soft-foreground: #6ee7b7 !important; + --warning: #fbbf24 !important; /* amber-400, ~10.8:1 on background */ + --warning-soft: #3a2c07 !important; + --warning-soft-foreground: #fcd34d !important; + --danger: #f87171 !important; /* red-400, ~6.6:1 on background */ + --danger-soft: #3a1d20 !important; + --danger-soft-foreground: #fca5a5 !important; +} + +/* ---------------------------------------------------------------- */ +/* 2. Sea-foam palette — light mode */ +/* ---------------------------------------------------------------- */ +/* The same sea, seen from the surface: bright, low-contrast fills + with darkened text and status hues so everything stays AA. */ + +:root, +.light { + --background: #f0f9ff !important; /* pale sea-foam (sky-50) */ + --foreground: #0c2d48 !important; /* deep sea ink, ~13.3:1 */ + --surface: #e0f2fe !important; /* sky-100 */ + --surface-secondary: #cbe6fd !important; + --surface-tertiary: #b9dcfb !important; + --overlay: #e0f2fe !important; + --accent: #0e7490 !important; /* deep teal (cyan-700) */ + --accent-foreground: #ffffff !important; /* ~5.4:1 on accent */ + --accent-soft: #cffafe !important; /* cyan-100 */ + --accent-soft-foreground: #155e75 !important; /* ~6.5:1 on accent-soft */ + --default: #cbe6fd !important; + --default-foreground: #0c2d48 !important; + --default-soft: #dbeefd !important; + --default-soft-foreground: #0c2d48 !important; + --muted: #4a6b8a !important; /* ~5.3:1 on background */ + --border: #b4d7f3 !important; + --separator: #c9e3f9 !important; + --field-background: #fbfdff !important; + --field-border: #b4d7f3 !important; + --field-foreground: #0c2d48 !important; + --field-placeholder: #6b8aa8 !important; /* placeholder text only, ~3.5:1 */ + --segment: #e0f2fe !important; + --segment-foreground: #0c2d48 !important; + --focus: #0e7490 !important; + --link: #0369a1 !important; /* darkened from #38bdf8 for AA, ~5.6:1 */ + --chart-stat: #4f46e5 !important; /* indigo-600, darkened for AA */ + --sleep: #4f46e5 !important; + --success: #047857 !important; /* emerald-700, ~5.2:1 */ + --success-soft: #d1fae5 !important; + --success-soft-foreground: #065f46 !important; + --warning: #92400e !important; /* amber-800, ~6.7:1 */ + --warning-soft: #fef3c7 !important; + --warning-soft-foreground: #92400e !important; + --danger: #dc2626 !important; /* red-600, ~4.6:1 */ + --danger-soft: #fee2e2 !important; + --danger-soft-foreground: #b91c1c !important; +} + +/* ---------------------------------------------------------------- */ +/* 3. Legacy preset variants (restate the core tokens) */ +/* ---------------------------------------------------------------- */ +/* Legacy preset variants carry an extra attribute selector that beats + the plain class selectors above on specificity — restate the core + tokens (the ones the app's own legacy-preset blocks define) so the + overlay still wins if the legacy preset is active. Status hues are + omitted here because the legacy preset never redefines them. */ + +.light[data-theme-preset="legacy"], +[data-theme="light"][data-theme-preset="legacy"] { + --background: #f0f9ff !important; + --foreground: #0c2d48 !important; + --surface: #e0f2fe !important; + --surface-secondary: #cbe6fd !important; + --surface-tertiary: #b9dcfb !important; + --overlay: #e0f2fe !important; + --accent: #0e7490 !important; + --accent-foreground: #ffffff !important; + --accent-soft: #cffafe !important; + --accent-soft-foreground: #155e75 !important; + --default: #cbe6fd !important; + --default-foreground: #0c2d48 !important; + --muted: #4a6b8a !important; + --border: #b4d7f3 !important; + --separator: #c9e3f9 !important; + --field-background: #fbfdff !important; + --field-border: #b4d7f3 !important; + --field-foreground: #0c2d48 !important; + --field-placeholder: #6b8aa8 !important; + --segment: #e0f2fe !important; + --segment-foreground: #0c2d48 !important; + --focus: #0e7490 !important; + --link: #0369a1 !important; +} +.dark[data-theme-preset="legacy"], +[data-theme="dark"][data-theme-preset="legacy"] { + --background: #0a1628 !important; + --foreground: #dbeafe !important; + --surface: #0f1e33 !important; + --surface-secondary: #14273f !important; + --surface-tertiary: #1a3350 !important; + --overlay: #0f1e33 !important; + --accent: #22d3ee !important; + --accent-foreground: #06283f !important; + --accent-soft: #0d3542 !important; + --accent-soft-foreground: #67e8f9 !important; + --default: #14273f !important; + --default-foreground: #dbeafe !important; + --muted: #7b9cc4 !important; + --border: #1e3a5f !important; + --separator: #17293f !important; + --field-background: #0d1c30 !important; + --field-border: #1e3a5f !important; + --field-foreground: #e0f2fe !important; + --field-placeholder: #6d8cb2 !important; + --segment: #0f1e33 !important; + --segment-foreground: #dbeafe !important; + --focus: #22d3ee !important; + --link: #38bdf8 !important; +} + +/* ---------------------------------------------------------------- */ +/* 4. Legacy --gp-* HSL triplets (unrebuilt screens) */ +/* ---------------------------------------------------------------- */ +/* Legacy HSL triplets, for any not-yet-rebuilt screen still reading + the --gp-* variables. Deliberately no `!important`: these follow + the app's normal cascade for the legacy variables. Values are bare + HSL triplets (no hsl() wrapper), matching how the app declares + them. */ + +.light { + --gp-bg: 204 100% 97%; + --gp-surface: 204 94% 94%; + --gp-card: 203 100% 96%; + --gp-border: 207 72% 83%; + --gp-muted: 209 30% 42%; + --gp-fg: 207 71% 16%; + --gp-primary: 188 86% 33%; + --gp-primary-fg: 0 0% 100%; +} +.dark { + --gp-bg: 216 60% 10%; + --gp-surface: 215 55% 13%; + --gp-card: 215 55% 13%; + --gp-border: 214 50% 25%; + --gp-muted: 213 38% 63%; + --gp-fg: 214 95% 93%; + --gp-primary: 187 92% 53%; + --gp-primary-fg: 204 83% 14%; +} diff --git a/ocean-deep/theme.yaml b/ocean-deep/theme.yaml new file mode 100644 index 0000000..b07c323 --- /dev/null +++ b/ocean-deep/theme.yaml @@ -0,0 +1,41 @@ +# Theme package. Run `gp-module theme validate ` after editing. +apiVersion: gameplane.local/theme/v1 +name: ocean-deep +version: 1.0.0 +displayName: Ocean Deep +author: Gameplane +description: "Dark-first abyssal navy with a cyan accent." +tags: [palette, light, dark] +license: AGPL-3.0-only +homepage: https://github.com/GameplanePanel/themes +tokens: + light: + background: "#f0f9ff" + foreground: "#0c2d48" + surface: "#e0f2fe" + surface-secondary: "#cbe6fd" + surface-tertiary: "#b9dcfb" + overlay: "#e0f2fe" + accent: "#0e7490" + accent-foreground: "#ffffff" + accent-soft: "#cffafe" + accent-soft-foreground: "#155e75" + muted: "#4a6b8a" + border: "#b4d7f3" + focus: "#0e7490" + link: "#0369a1" + dark: + background: "#f0f9ff" + foreground: "#0c2d48" + surface: "#e0f2fe" + surface-secondary: "#cbe6fd" + surface-tertiary: "#b9dcfb" + overlay: "#e0f2fe" + accent: "#0e7490" + accent-foreground: "#ffffff" + accent-soft: "#cffafe" + accent-soft-foreground: "#155e75" + muted: "#4a6b8a" + border: "#b4d7f3" + focus: "#0e7490" + link: "#0369a1" diff --git a/paper-map/previews/dark.png b/paper-map/previews/dark.png new file mode 100644 index 0000000..b23e816 Binary files /dev/null and b/paper-map/previews/dark.png differ diff --git a/paper-map/previews/light.png b/paper-map/previews/light.png new file mode 100644 index 0000000..279aa63 Binary files /dev/null and b/paper-map/previews/light.png differ diff --git a/paper-map/theme.css b/paper-map/theme.css new file mode 100644 index 0000000..c45fdd8 --- /dev/null +++ b/paper-map/theme.css @@ -0,0 +1,51 @@ +/* Paper Map: official Gameplane theme. */ +html.dark[data-theme][data-theme-preset][data-theme-type] { + --background: #211c16; + --foreground: #f3e8d0; + --surface: #2c251c; + --surface-secondary: #251f18; + --surface-tertiary: #382f23; + --overlay: #443827; + --accent: #e4b45e; + --accent-foreground: #33240b; + --accent-soft: #4a3920; + --accent-soft-foreground: #f0cd88; + --default: #3b3124; + --default-foreground: #f3e8d0; + --border: #5c4e38; + --separator: #473b2a; + --muted: #c7b99b; + --field-background: #251f18; + --field-border: #65543a; + --field-foreground: #fff8e9; + --field-placeholder: #a8997a; + --focus: #efc66f; + --link: #f0c978; + --radius: 5px; + --radius-md: var(--radius); + --radius-lg: calc(var(--radius) + 2px); + --field-radius: 4px; +} +html.light[data-theme][data-theme-preset][data-theme-type] { + --background: #f4eedf; + --foreground: #33291b; + --surface: #fbf7eb; + --surface-secondary: #f0e7d2; + --surface-tertiary: #e7dac0; + --overlay: #fffaf0; + --accent: #8b5b18; + --accent-foreground: #fffaf0; + --accent-soft: #f1dfb8; + --accent-soft-foreground: #65400f; + --default: #e9dfca; + --default-foreground: #392e1e; + --border: #d5c6a7; + --separator: #e2d6bd; + --muted: #75654a; + --field-background: #fffaf0; + --field-border: #d2c09d; + --field-foreground: #33291b; + --field-placeholder: #867455; + --focus: #8b5b18; + --link: #755016; +} diff --git a/paper-map/theme.yaml b/paper-map/theme.yaml new file mode 100644 index 0000000..f96d58d --- /dev/null +++ b/paper-map/theme.yaml @@ -0,0 +1,41 @@ +# Theme package. Run `gp-module theme validate ` after editing. +apiVersion: gameplane.local/theme/v1 +name: paper-map +version: 1.0.0 +displayName: Paper Map +author: Gameplane +description: "Parchment surfaces, ink, and compact corners." +tags: [palette, light, dark] +license: AGPL-3.0-only +homepage: https://github.com/GameplanePanel/themes +tokens: + light: + background: "#f4eedf" + foreground: "#33291b" + surface: "#fbf7eb" + surface-secondary: "#f0e7d2" + surface-tertiary: "#e7dac0" + overlay: "#fffaf0" + accent: "#8b5b18" + accent-foreground: "#fffaf0" + accent-soft: "#f1dfb8" + accent-soft-foreground: "#65400f" + muted: "#75654a" + border: "#d5c6a7" + focus: "#8b5b18" + link: "#755016" + dark: + background: "#211c16" + foreground: "#f3e8d0" + surface: "#2c251c" + surface-secondary: "#251f18" + surface-tertiary: "#382f23" + overlay: "#443827" + accent: "#e4b45e" + accent-foreground: "#33240b" + accent-soft: "#4a3920" + accent-soft-foreground: "#f0cd88" + muted: "#c7b99b" + border: "#5c4e38" + focus: "#efc66f" + link: "#f0c978" diff --git a/pastel-sakura/previews/dark.png b/pastel-sakura/previews/dark.png new file mode 100644 index 0000000..b343f46 Binary files /dev/null and b/pastel-sakura/previews/dark.png differ diff --git a/pastel-sakura/previews/light.png b/pastel-sakura/previews/light.png new file mode 100644 index 0000000..951c37c Binary files /dev/null and b/pastel-sakura/previews/light.png differ diff --git a/pastel-sakura/theme.css b/pastel-sakura/theme.css new file mode 100644 index 0000000..3596188 --- /dev/null +++ b/pastel-sakura/theme.css @@ -0,0 +1,234 @@ +/* Pastel Sakura: official Gameplane theme. */ +/* ---------------------------------------------------------------- */ +/* 1. Sakura palette — light mode ("blush paper") */ +/* ---------------------------------------------------------------- */ + +:root, +.light { + /* Page + petal surfaces: all low-saturation pastels. Contrast is + carried by the plum ink below, not by darkening these. */ + --background: #fdf2f8 !important; /* pink-50, blush paper */ + --surface: #fce7f3 !important; /* pink-100, petal card fill */ + --surface-secondary: #f9d9e8 !important; /* deeper petal */ + --surface-tertiary: #f5c2da !important; /* deepest petal pastel */ + --overlay: #fdf6fa !important; /* dialogs float a touch lighter */ + + /* Rose accent. White on rose is ~4.6:1 — past AA's 4.5:1 floor + for normal text, the lightest foreground the palette rose + supports. */ + --accent: #db2777 !important; /* rose */ + --accent-foreground: #ffffff !important; /* ~4.6:1 on the rose */ + --accent-soft: #fce7f3 !important; /* pink-100 wash */ + --accent-soft-foreground: #9d174d !important; /* pink-800, ~6.7:1 on accent-soft */ + + /* Neutral buttons tinted with the same petal family so they sit + quietly next to the accent instead of going gray. */ + --default: #fce7f3 !important; + --default-foreground: #500f2d !important; /* deep plum, ~13:1 on background */ + --default-soft: #f9d9e8 !important; + --default-soft-foreground: #500f2d !important; /* ~11:1 on default-soft */ + + --muted: #9d5c7d !important; /* ~4.5:1 on background — AA floor, secondary text only */ + --border: #fbcfe8 !important; /* pink-200, intentionally subtle hairline */ + --separator: #fcd9ea !important; /* even softer divider */ + + /* Fields: a near-white pink fill with a border stepped one shade + deeper than --border so inputs stay findable on it. */ + --field-background: #fdf6fa !important; + --field-border: #f0a8c8 !important; /* mid-rose, visible on the field fill */ + --field-foreground: #500f2d !important; /* ~12:1 on field-background */ + --field-placeholder: #b9839c !important; /* ~2.9:1, placeholder text */ + + --segment: #fce7f3 !important; + --segment-foreground: #500f2d !important; + --focus: #db2777 !important; /* focus ring matches the accent */ + --link: #be185d !important; /* pink-700, ~5.5:1 on background */ + --chart-stat: #8b5cf6 !important; /* lavender; ~3.9:1, icon/graphic hue */ + --sleep: #8b5cf6 !important; + + /* Status hues kept at their palette values; where one falls + under 4.5:1 on the page (success does, at ~3.5:1), it is used + only for icons/borders and the readable text moves onto the + -soft surface with a deep foreground below. */ + --success: #059669 !important; /* softened emerald */ + --success-soft: #d9f2e6 !important; /* mint pastel */ + --success-soft-foreground: #065f46 !important; /* emerald-800, ~6.5:1 on success-soft */ + --warning: #b45309 !important; /* amber, ~4.6:1 */ + --warning-soft: #faecd0 !important; /* cream pastel */ + --warning-soft-foreground: #92400e !important; /* amber-800, ~6.1:1 on warning-soft */ + --danger: #be123c !important; /* crimson rose, ~5.8:1 */ + --danger-soft: #fbdce3 !important; /* blush pastel */ + --danger-soft-foreground: #9f1239 !important; /* rose-800, ~6.3:1 on danger-soft */ +} + +/* ---------------------------------------------------------------- */ +/* 2. Sakura palette — dark mode ("plum night") */ +/* ---------------------------------------------------------------- */ + +.dark { + /* Low-saturation plum night: dark enough for the pale blossom + text to hit ~13:1, muted enough to keep the pastel feel. */ + --background: #1f1018 !important; /* muted plum night */ + --surface: #2b1a24 !important; /* wine surface */ + --surface-secondary: #241219 !important; + --surface-tertiary: #1a0d13 !important; + --overlay: #2b1a24 !important; + + /* Pastel pink accent with dark plum text — the inverted twin of + the light mode's rose-on-white. */ + --accent: #f9a8d4 !important; /* pink-300 pastel */ + --accent-foreground: #4a0e29 !important; /* dark plum on pink, ~8.4:1 */ + --accent-soft: #4a2438 !important; /* deep rose-plum wash */ + --accent-soft-foreground: #fbcfe8 !important; /* ~9.5:1 on accent-soft */ + + --default: #3a2230 !important; + --default-foreground: #f5d0e0 !important; /* blossom text */ + --default-soft: #432338 !important; + --default-soft-foreground: #f5d0e0 !important; /* ~9.7:1 on default-soft */ + + --muted: #b08ca0 !important; /* ~6.2:1 on background */ + --border: #4a2c3c !important; /* wine hairline */ + --separator: #3a2230 !important; + + --field-background: #241219 !important; + --field-border: #57324a !important; + --field-foreground: #fbe4ee !important; /* a half-step lighter than --foreground */ + --field-placeholder: #9d7a8d !important; /* ~4.8:1 on field-background */ + + --segment: #2b1a24 !important; + --segment-foreground: #f5d0e0 !important; + --focus: #f9a8d4 !important; + --link: #f472b6 !important; /* pink-400, ~7.0:1 on background */ + --chart-stat: #a78bfa !important; /* pastel lavender, ~6.8:1 */ + --sleep: #a78bfa !important; + + /* Status hues pastel-brightened for the dark page; all clear AA + even at full strength, so no text needs to move to the -soft + surfaces the way light-mode success does. */ + --success: #34d399 !important; /* pastel emerald, ~9.5:1 */ + --success-soft: #0f2e23 !important; + --success-soft-foreground: #6ee7b7 !important; /* ~9.6:1 on success-soft */ + --warning: #fbbf24 !important; /* pastel amber, ~11:1 */ + --warning-soft: #3a2a10 !important; + --warning-soft-foreground: #fcd34d !important; /* ~9.6:1 on warning-soft */ + --danger: #fb7185 !important; /* pastel rose, ~6.8:1 */ + --danger-soft: #3d1220 !important; + --danger-soft-foreground: #fda4af !important; /* ~8.5:1 on danger-soft */ +} + +/* ---------------------------------------------------------------- */ +/* 3. Legacy preset variants (restate both modes) */ +/* ---------------------------------------------------------------- */ + +/* The legacy preset adds a [data-theme-preset="legacy"] attribute + to the same root classes, so its token blocks beat the plain + .light/.dark selectors above on specificity no matter where this + overlay sits in . Restate every token for both legacy + variants — same values, same !important — so the sakura palette + holds whether or not the legacy preset is active underneath. */ +.light[data-theme-preset="legacy"], +[data-theme="light"][data-theme-preset="legacy"] { + --background: #fdf2f8 !important; + --surface: #fce7f3 !important; + --surface-secondary: #f9d9e8 !important; + --surface-tertiary: #f5c2da !important; + --overlay: #fdf6fa !important; + --accent: #db2777 !important; + --accent-foreground: #ffffff !important; + --accent-soft: #fce7f3 !important; + --accent-soft-foreground: #9d174d !important; + --default: #fce7f3 !important; + --default-foreground: #500f2d !important; + --default-soft: #f9d9e8 !important; + --default-soft-foreground: #500f2d !important; + --muted: #9d5c7d !important; + --border: #fbcfe8 !important; + --separator: #fcd9ea !important; + --field-background: #fdf6fa !important; + --field-border: #f0a8c8 !important; + --field-foreground: #500f2d !important; + --field-placeholder: #b9839c !important; + --segment: #fce7f3 !important; + --segment-foreground: #500f2d !important; + --focus: #db2777 !important; + --link: #be185d !important; + --chart-stat: #8b5cf6 !important; + --sleep: #8b5cf6 !important; + --success: #059669 !important; + --success-soft: #d9f2e6 !important; + --success-soft-foreground: #065f46 !important; + --warning: #b45309 !important; + --warning-soft: #faecd0 !important; + --warning-soft-foreground: #92400e !important; + --danger: #be123c !important; + --danger-soft: #fbdce3 !important; + --danger-soft-foreground: #9f1239 !important; +} +.dark[data-theme-preset="legacy"], +[data-theme="dark"][data-theme-preset="legacy"] { + --background: #1f1018 !important; + --surface: #2b1a24 !important; + --surface-secondary: #241219 !important; + --surface-tertiary: #1a0d13 !important; + --overlay: #2b1a24 !important; + --accent: #f9a8d4 !important; + --accent-foreground: #4a0e29 !important; + --accent-soft: #4a2438 !important; + --accent-soft-foreground: #fbcfe8 !important; + --default: #3a2230 !important; + --default-foreground: #f5d0e0 !important; + --default-soft: #432338 !important; + --default-soft-foreground: #f5d0e0 !important; + --muted: #b08ca0 !important; + --border: #4a2c3c !important; + --separator: #3a2230 !important; + --field-background: #241219 !important; + --field-border: #57324a !important; + --field-foreground: #fbe4ee !important; + --field-placeholder: #9d7a8d !important; + --segment: #2b1a24 !important; + --segment-foreground: #f5d0e0 !important; + --focus: #f9a8d4 !important; + --link: #f472b6 !important; + --chart-stat: #a78bfa !important; + --sleep: #a78bfa !important; + --success: #34d399 !important; + --success-soft: #0f2e23 !important; + --success-soft-foreground: #6ee7b7 !important; + --warning: #fbbf24 !important; + --warning-soft: #3a2a10 !important; + --warning-soft-foreground: #fcd34d !important; + --danger: #fb7185 !important; + --danger-soft: #3d1220 !important; + --danger-soft-foreground: #fda4af !important; +} + +/* ---------------------------------------------------------------- */ +/* 4. Legacy --gp-* HSL triplets (old screens) */ +/* ---------------------------------------------------------------- */ + +/* Legacy HSL triplets for any not-yet-rebuilt screen still reading + the --gp-* variables. Same hues as the token blocks above, + expressed as bare HSL triplets. Deliberately plain .light/.dark + selectors with NO !important: these are compatibility hints and + must stay overridable by anything newer. */ +.light { + --gp-bg: 327 73% 97%; + --gp-surface: 326 78% 95%; + --gp-card: 326 78% 98%; + --gp-border: 326 85% 90%; + --gp-muted: 330 26% 49%; + --gp-fg: 332 68% 19%; + --gp-primary: 333 71% 51%; + --gp-primary-fg: 0 0% 100%; +} +.dark { + --gp-bg: 328 32% 9%; + --gp-surface: 325 25% 14%; + --gp-card: 325 25% 14%; + --gp-border: 328 25% 23%; + --gp-muted: 327 19% 62%; + --gp-fg: 334 65% 89%; + --gp-primary: 327 87% 82%; + --gp-primary-fg: 332 68% 17%; +} diff --git a/pastel-sakura/theme.yaml b/pastel-sakura/theme.yaml new file mode 100644 index 0000000..b8c4ad5 --- /dev/null +++ b/pastel-sakura/theme.yaml @@ -0,0 +1,41 @@ +# Theme package. Run `gp-module theme validate ` after editing. +apiVersion: gameplane.local/theme/v1 +name: pastel-sakura +version: 1.0.0 +displayName: Pastel Sakura +author: Gameplane +description: "Light-first soft cherry-blossom pastel." +tags: [palette, light, dark] +license: AGPL-3.0-only +homepage: https://github.com/GameplanePanel/themes +tokens: + light: + background: "#fdf2f8" + foreground: "#2a0f1e" + surface: "#fce7f3" + surface-secondary: "#f9d9e8" + surface-tertiary: "#f5c2da" + overlay: "#fdf6fa" + accent: "#db2777" + accent-foreground: "#ffffff" + accent-soft: "#fce7f3" + accent-soft-foreground: "#9d174d" + muted: "#9d5c7d" + border: "#fbcfe8" + focus: "#db2777" + link: "#be185d" + dark: + background: "#1f1018" + foreground: "#f5f3f7" + surface: "#2b1a24" + surface-secondary: "#241219" + surface-tertiary: "#1a0d13" + overlay: "#2b1a24" + accent: "#f9a8d4" + accent-foreground: "#4a0e29" + accent-soft: "#4a2438" + accent-soft-foreground: "#fbcfe8" + muted: "#b08ca0" + border: "#4a2c3c" + focus: "#f9a8d4" + link: "#f472b6" diff --git a/phosphor-terminal/previews/dark.png b/phosphor-terminal/previews/dark.png new file mode 100644 index 0000000..568ca2b Binary files /dev/null and b/phosphor-terminal/previews/dark.png differ diff --git a/phosphor-terminal/previews/light.png b/phosphor-terminal/previews/light.png new file mode 100644 index 0000000..cf381fd Binary files /dev/null and b/phosphor-terminal/previews/light.png differ diff --git a/phosphor-terminal/theme.css b/phosphor-terminal/theme.css new file mode 100644 index 0000000..5ef8ea1 --- /dev/null +++ b/phosphor-terminal/theme.css @@ -0,0 +1,247 @@ +/* Phosphor Terminal: official Gameplane theme. */ +/* ---------------------------------------------------------------- */ +/* 1. Phosphor palette — light mode ("green paper" terminal) */ +/* ---------------------------------------------------------------- */ + +:root, +.light { + --background: #eef7ea !important; + --foreground: #0d2812 !important; + --surface: #f7fcf3 !important; + --surface-secondary: #e3f1dc !important; + --surface-tertiary: #d4e8cc !important; + --overlay: #f7fcf3 !important; + --accent: #15803d !important; /* green-700, 5.0:1 on accent-foreground */ + --accent-foreground: #ffffff !important; + --accent-soft: #dcfce7 !important; + --accent-soft-foreground: #14532d !important; + --default: #d4e8cc !important; + --default-foreground: #0d2812 !important; + --default-soft: #dcfce7 !important; + --default-soft-foreground: #14532d !important; + --muted: #4a6b52 !important; + --border: #b7d6bd !important; + --separator: #cbe4d0 !important; + --field-background: #f7fcf3 !important; + --field-border: #b7d6bd !important; + --field-foreground: #0d2812 !important; + --field-placeholder: #6b9173 !important; + --segment: #f7fcf3 !important; + --segment-foreground: #0d2812 !important; + --focus: #15803d !important; + --link: #15803d !important; + --chart-stat: #0e7490 !important; /* cyan-700 */ + /* Status hues shifted into the terminal palette: success becomes + cyan so it does not merge with the green accent. */ + --success: #0891b2 !important; + --success-soft: #cffafe !important; + --success-soft-foreground: #155e75 !important; + --radius: 2px !important; + --field-radius: 2px !important; +} + +/* ---------------------------------------------------------------- */ +/* 2. Phosphor palette — dark mode (the real CRT look) */ +/* ---------------------------------------------------------------- */ + +.dark { + --background: #070d07 !important; + --foreground: #c8f7cf !important; + --surface: #0d1a0f !important; + --surface-secondary: #0a140b !important; + --surface-tertiary: #081008 !important; + --overlay: #102213 !important; + --accent: #2bff62 !important; /* phosphor green, 12+:1 on accent-foreground */ + --accent-foreground: #031007 !important; + --accent-soft: #123a1c !important; + --accent-soft-foreground: #7dff9d !important; + --default: #122b16 !important; + --default-foreground: #c8f7cf !important; + --default-soft: #123a1c !important; + --default-soft-foreground: #7dff9d !important; + --muted: #6f9e76 !important; + --border: #1e3a24 !important; + --separator: #16301a !important; + --field-background: #0a140b !important; + --field-border: #1e3a24 !important; + --field-foreground: #eaffec !important; + --field-placeholder: #5d8a64 !important; + --segment: #0d1a0f !important; + --segment-foreground: #c8f7cf !important; + --focus: #2bff62 !important; + --link: #5dff8f !important; + --chart-stat: #22d3ee !important; /* cyan-400 */ + --success: #22d3ee !important; + --success-soft: #0b2f38 !important; + --success-soft-foreground: #67e8f9 !important; + --radius: 2px !important; + --field-radius: 2px !important; +} + +/* Legacy preset variants carry an extra attribute selector that beats + the plain class selectors above on specificity — restate the tokens + for them so the overlay still wins if the legacy preset is active. */ +.light[data-theme-preset="legacy"], +[data-theme="light"][data-theme-preset="legacy"] { + --background: #eef7ea !important; + --foreground: #0d2812 !important; + --surface: #f7fcf3 !important; + --surface-secondary: #e3f1dc !important; + --surface-tertiary: #d4e8cc !important; + --overlay: #f7fcf3 !important; + --accent: #15803d !important; + --accent-foreground: #ffffff !important; + --accent-soft: #dcfce7 !important; + --accent-soft-foreground: #14532d !important; + --default: #d4e8cc !important; + --default-foreground: #0d2812 !important; + --muted: #4a6b52 !important; + --border: #b7d6bd !important; + --separator: #cbe4d0 !important; + --field-background: #f7fcf3 !important; + --field-border: #b7d6bd !important; + --field-foreground: #0d2812 !important; + --field-placeholder: #6b9173 !important; + --segment: #f7fcf3 !important; + --segment-foreground: #0d2812 !important; + --focus: #15803d !important; + --link: #15803d !important; +} +.dark[data-theme-preset="legacy"], +[data-theme="dark"][data-theme-preset="legacy"] { + --background: #070d07 !important; + --foreground: #c8f7cf !important; + --surface: #0d1a0f !important; + --surface-secondary: #0a140b !important; + --surface-tertiary: #081008 !important; + --overlay: #102213 !important; + --accent: #2bff62 !important; + --accent-foreground: #031007 !important; + --accent-soft: #123a1c !important; + --accent-soft-foreground: #7dff9d !important; + --default: #122b16 !important; + --default-foreground: #c8f7cf !important; + --muted: #6f9e76 !important; + --border: #1e3a24 !important; + --separator: #16301a !important; + --field-background: #0a140b !important; + --field-border: #1e3a24 !important; + --field-foreground: #eaffec !important; + --field-placeholder: #5d8a64 !important; + --segment: #0d1a0f !important; + --segment-foreground: #c8f7cf !important; + --focus: #2bff62 !important; + --link: #5dff8f !important; +} + +/* Legacy HSL triplets, for any not-yet-rebuilt screen still reading + the --gp-* variables. */ +.light { + --gp-bg: 110 40% 94%; + --gp-surface: 110 35% 90%; + --gp-card: 100 45% 97%; + --gp-border: 120 22% 76%; + --gp-muted: 130 18% 36%; + --gp-fg: 135 51% 10%; + --gp-primary: 142 71% 29%; + --gp-primary-fg: 0 0% 100%; +} +.dark { + --gp-bg: 120 30% 4%; + --gp-surface: 130 33% 8%; + --gp-card: 130 33% 8%; + --gp-border: 125 32% 17%; + --gp-muted: 128 17% 53%; + --gp-fg: 118 83% 88%; + --gp-primary: 136 100% 58%; + --gp-primary-fg: 130 81% 4%; +} + +/* ---------------------------------------------------------------- */ +/* 3. All-monospace typography */ +/* ---------------------------------------------------------------- */ +/* --font-sans is declared inside the app's @theme block, which the + Tailwind v4 compiler turns into the font-sans utility used by the + body and components. Rebinding it on :root (a later, equal-or-higher + specificity declaration) redirects every consumer to the mono stack + the app already loads for --font-mono. */ +:root, +.light, +.dark { + --font-sans: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace !important; +} + +/* Terminal chrome: tracked-out uppercase on buttons and small caps + feel on table headers (already uppercase by the app's own rule). */ +.button { + letter-spacing: 0.04em; +} + +/* ---------------------------------------------------------------- */ +/* 4. Square corners */ +/* ---------------------------------------------------------------- */ +/* The app pins per-family radii at the component selector (6px + buttons, 12px cards/dialogs, 999px tab pills, ...), so rebinding + --radius alone does nothing for them — repin each family here. + The `!important` on these is needed because the app's own pins are + unlayered like this overlay; source order would win ties, but the + rounded-full CTA carve-out below needs to beat the app's + .button:not(.rounded-full) pin outright. */ +.button:not(.rounded-full), +.tabs__tab, +.tabs__indicator, +.tabs__list, +.tabs__list[data-orientation="vertical"], +.menu-item, +.list-box-item, +.select__trigger, +.chip, +.card, +.modal__dialog, +.dropdown__popover, +.input, +.table-root--primary { + border-radius: 2px !important; +} + +/* Even the pill CTAs ("Sign in", "Create server") go square — a + terminal has no pills. */ +.button.rounded-full { + border-radius: 2px !important; +} + +/* ---------------------------------------------------------------- */ +/* 5. CRT effects (dark mode only) */ +/* ---------------------------------------------------------------- */ + +/* Scanlines: a fixed, non-interactive overlay of 1px dark lines every + 3px across the whole viewport. Kept faint so text contrast is + untouched; pointer-events: none so it never blocks clicks. */ +.dark body::after { + content: ""; + position: fixed; + inset: 0; + z-index: 9999; + pointer-events: none; + background: repeating-linear-gradient( + to bottom, + transparent 0px, + transparent 2px, + rgba(0, 0, 0, 0.14) 2px, + rgba(0, 0, 0, 0.14) 3px + ); +} + +/* Phosphor glow on primary actions and the focus ring. Scoped to + dark mode: a green halo reads as glow on the dark background but + would look like a rendering artifact on the light "paper" theme. */ +.dark .button[data-variant="primary"] { + box-shadow: 0 0 10px rgba(43, 255, 98, 0.35); +} + +/* Respect users who ask for reduced motion/effects: no glow. */ +@media (prefers-reduced-motion: reduce) { + .dark .button[data-variant="primary"] { + box-shadow: none; + } +} diff --git a/phosphor-terminal/theme.yaml b/phosphor-terminal/theme.yaml new file mode 100644 index 0000000..96fe222 --- /dev/null +++ b/phosphor-terminal/theme.yaml @@ -0,0 +1,41 @@ +# Theme package. Run `gp-module theme validate ` after editing. +apiVersion: gameplane.local/theme/v1 +name: phosphor-terminal +version: 1.0.0 +displayName: Phosphor Terminal +author: Gameplane +description: "Green-phosphor CRT: green palette, monospace type, square corners, scanlines and glow." +tags: [overhaul, light, dark] +license: AGPL-3.0-only +homepage: https://github.com/GameplanePanel/themes +tokens: + light: + background: "#eef7ea" + foreground: "#0d2812" + surface: "#f7fcf3" + surface-secondary: "#e3f1dc" + surface-tertiary: "#d4e8cc" + overlay: "#f7fcf3" + accent: "#15803d" + accent-foreground: "#ffffff" + accent-soft: "#dcfce7" + accent-soft-foreground: "#14532d" + muted: "#4a6b52" + border: "#b7d6bd" + focus: "#15803d" + link: "#15803d" + dark: + background: "#070d07" + foreground: "#c8f7cf" + surface: "#0d1a0f" + surface-secondary: "#0a140b" + surface-tertiary: "#081008" + overlay: "#102213" + accent: "#2bff62" + accent-foreground: "#031007" + accent-soft: "#123a1c" + accent-soft-foreground: "#7dff9d" + muted: "#6f9e76" + border: "#1e3a24" + focus: "#2bff62" + link: "#5dff8f" diff --git a/rounded-playful/previews/dark.png b/rounded-playful/previews/dark.png new file mode 100644 index 0000000..409432f Binary files /dev/null and b/rounded-playful/previews/dark.png differ diff --git a/rounded-playful/previews/light.png b/rounded-playful/previews/light.png new file mode 100644 index 0000000..782989d Binary files /dev/null and b/rounded-playful/previews/light.png differ diff --git a/rounded-playful/theme.css b/rounded-playful/theme.css new file mode 100644 index 0000000..75d5003 --- /dev/null +++ b/rounded-playful/theme.css @@ -0,0 +1,127 @@ +/* Rounded Playful: official Gameplane theme. */ +/* ---------------------------------------------------------------- */ +/* 1. Root radius scale — softer defaults for unpinned parts */ +/* ---------------------------------------------------------------- */ +/* --radius (10px) and --field-radius (6px) live in the app's preset + token blocks (:root/.light and .dark); --radius-md (6px) and + --radius-lg (10px) come from its @theme block. Rebinding all four + here covers anything that reads a token WITHOUT its own pin + (badges, code chips, future components). The !important keeps the + rebind ahead of those preset blocks wherever they tie on + specificity, the same trick the color-token examples use — and the + pinned families are repinned one by one in the sections below, + because a bare --radius rebind cannot reach them. */ +:root, +.light, +.dark { + --radius: 20px !important; + --radius-md: 20px !important; + --radius-lg: 24px !important; + --field-radius: 12px !important; +} + +/* ---------------------------------------------------------------- */ +/* 2. Fully-round controls — buttons, pills, chips, tabs (999px) */ +/* ---------------------------------------------------------------- */ +/* globals.css pins .button:not(.rounded-full) to 6px, .chip to 4px + and .tabs__tab/.tabs__indicator to 6px — the :not() argument raises + those selectors to (0,2,0), which beats this overlay's plain + classes no matter how late the overlay is appended, hence + !important. This also turns the vertical Settings submenu tab list + (pinned to 8px via [data-orientation="vertical"]) into a pill — + deliberate: this theme is playful everywhere, not just on the + horizontal segmented controls. */ +.button, +.chip, +.tabs__list, +.tabs__tab, +.tabs__indicator { + border-radius: 999px !important; +} + +/* Pill CTAs ("Sign in", "Create server") opt in via .rounded-full and + have NO app pin of their own — they inherit HeroUI's default pill. + Pin them explicitly so the pill shape is guaranteed by this theme + even if that upstream default ever changes. */ +.button.rounded-full { + border-radius: 999px !important; +} + +/* ---------------------------------------------------------------- */ +/* 3. Soft surfaces — cards and dialogs (20px) */ +/* ---------------------------------------------------------------- */ +/* The app pins .card:not([data-danger-zone]) and .modal__dialog to + 12px; the plain .card rules below carry !important so they also + reach the 6px danger-zone pin (a (0,2,0) selector that would + otherwise win). The danger-zone card keeps its red stroke — only + its corners join the round look, so the warning still reads. */ +.card, +.modal__dialog { + border-radius: 20px !important; +} + +/* ---------------------------------------------------------------- */ +/* 4. Popovers and data tables (16px) */ +/* ---------------------------------------------------------------- */ +/* .dropdown__popover is pinned to 8px and .table-root--primary rides + the app's standard surface radius; both move to 16px so a menu + opening over a table reads as the same softness as the surface + underneath it. */ +.dropdown__popover, +.table-root--primary { + border-radius: 16px !important; +} + +/* ---------------------------------------------------------------- */ +/* 5. Fields — inputs and select triggers (12px) */ +/* ---------------------------------------------------------------- */ +/* .select__trigger carries the 6px app pin while .input derives from + --field-radius (also 6px). Repinning both to 12px matches the + app's own dialog-field rule and the --field-radius rebind in + section 1, so fields look identical inside and outside dialogs. */ +.input, +.select__trigger { + border-radius: 12px !important; +} + +/* ---------------------------------------------------------------- */ +/* 6. Menu and listbox rows (10px) */ +/* ---------------------------------------------------------------- */ +/* Pinned to 6px by the app. Full 999px pills would waste horizontal + space in a dropdown and make the selection highlight look like a + capsule floating off the text rows, so these get 10px — clearly + softer than the default, still recognizably row-shaped. */ +.menu-item, +.list-box-item { + border-radius: 10px !important; +} + +/* ---------------------------------------------------------------- */ +/* 7. Spring-feel hover lift on buttons */ +/* ---------------------------------------------------------------- */ +/* transform is one of the two CSS properties that animate entirely + on the compositor (the other is opacity), so the lift costs no + layout. The timing curve is a gentle ease-out-back: it rises + quickly, overshoots the 1.02 target by a hair, then settles — that + tiny overshoot is what reads as "springy" rather than a linear + glide. The color properties ride along so existing hover tints do + not pop instantly while the transform animates. Scale is only 2%: + big enough to feel alive, small enough to leave surrounding layout + untouched. */ +.button { + transition: transform 150ms cubic-bezier(0.34, 1.56, 0.64, 1), + background-color 150ms ease, border-color 150ms ease, color 150ms ease; +} +.button:hover { + transform: scale(1.02); +} + +/* Motion effects must be opt-out: users who ask for reduced motion + get the same shapes with no lift and no transition. */ +@media (prefers-reduced-motion: reduce) { + .button, + .button:hover { + transition: none; + transform: none; + } +} diff --git a/rounded-playful/theme.yaml b/rounded-playful/theme.yaml new file mode 100644 index 0000000..80c1f07 --- /dev/null +++ b/rounded-playful/theme.yaml @@ -0,0 +1,41 @@ +# Theme package. Run `gp-module theme validate ` after editing. +apiVersion: gameplane.local/theme/v1 +name: rounded-playful +version: 1.0.0 +displayName: Rounded Playful +author: Gameplane +description: "Maximum roundness: pill buttons and 20px cards. No color changes." +tags: [shape, light, dark] +license: AGPL-3.0-only +homepage: https://github.com/GameplanePanel/themes +tokens: + light: + background: "#ffffff" + foreground: "#2a0f1e" + surface: "#fff7fb" + surface-secondary: "#f8dde9" + surface-tertiary: "#f8dde9" + overlay: "#fff7fb" + accent: "#db2777" + accent-foreground: "#ffffff" + accent-soft: "#ffffff" + accent-soft-foreground: "#be185d" + muted: "#6e5262" + border: "#efc3d6" + focus: "#db2777" + link: "#2563eb" + dark: + background: "#121114" + foreground: "#f5f3f7" + surface: "#1c1a20" + surface-secondary: "#17151a" + surface-tertiary: "#141317" + overlay: "#201e24" + accent: "#ff4fa3" + accent-foreground: "#ffffff" + accent-soft: "#331525" + accent-soft-foreground: "#ff8ac4" + muted: "#9e98a6" + border: "#2c2932" + focus: "#ff4fa3" + link: "#7db4ff" diff --git a/sepia-paper/previews/dark.png b/sepia-paper/previews/dark.png new file mode 100644 index 0000000..65501e3 Binary files /dev/null and b/sepia-paper/previews/dark.png differ diff --git a/sepia-paper/previews/light.png b/sepia-paper/previews/light.png new file mode 100644 index 0000000..04e57a3 Binary files /dev/null and b/sepia-paper/previews/light.png differ diff --git a/sepia-paper/theme.css b/sepia-paper/theme.css new file mode 100644 index 0000000..0e8c588 --- /dev/null +++ b/sepia-paper/theme.css @@ -0,0 +1,178 @@ +/* Sepia Paper: official Gameplane theme. */ +/* ---------------------------------------------------------------- */ +/* 1. Light mode: warm paper (the e-reader star) */ +/* ---------------------------------------------------------------- */ + +:root, +.light { + --background: #f5efe0 !important; /* warm cream "paper" */ + --foreground: #433422 !important; /* espresso brown ink, 10.4:1 on paper */ + --surface: #efe7d3 !important; /* card fill, a touch deeper than paper */ + --surface-secondary: #e7dcc3 !important; /* sunken wells, stripes */ + --surface-tertiary: #ddd0b0 !important; /* deepest warm step (hover) */ + --overlay: #efe7d3 !important; /* dialogs stay on the paper */ + --accent: #8b5e34 !important; /* warm saddle brown */ + --accent-foreground: #f7efdc !important; /* cream text, 4.9:1 on accent */ + --accent-soft: #ece1c6 !important; /* tinted chips / soft banners */ + --accent-soft-foreground: #6b4a26 !important; /* 6.1:1 on accent-soft */ + --default: #e7dcc3 !important; /* neutral buttons stay papery */ + --default-foreground: #433422 !important; /* 8.8:1 on default */ + --default-soft: #ece1c6 !important; + --default-soft-foreground: #6b4a26 !important; + --muted: #7a6a52 !important; /* faded ink, 4.6:1 on paper (AA) */ + --border: #d5c9a8 !important; /* ruled notebook lines */ + --separator: #e0d5ba !important; /* fainter rules between sections */ + --field-background: #efe7d3 !important; /* inputs match card fill */ + --field-border: #d5c9a8 !important; + --field-foreground: #433422 !important; /* 9.7:1 on field bg */ + --field-placeholder: #8f7e5f !important; /* faint by design (3.2:1) */ + --segment: #efe7d3 !important; + --segment-foreground: #433422 !important; /* 9.7:1 on segment */ + --focus: #8b5e34 !important; /* focus ring follows the accent */ + --link: #9a3412 !important; /* burnt sienna, 6.4:1 on paper */ + --chart-stat: #7e6a9e !important; /* dusty violet, 4.1:1 (icons, 3:1+) */ + --sleep: #7e6a9e !important; /* asleep servers get the same violet */ + --success: #6b7f2a !important; /* olive, 3.9:1 — icons/large text */ + --success-soft: #edf0d2 !important; /* pale olive tint */ + --success-soft-foreground: #4c5c14 !important; /* 6.3:1 on success-soft */ + --warning: #a16207 !important; /* ochre, 4.3:1 — icons/large text */ + --warning-soft: #f5e7c4 !important; + --warning-soft-foreground: #7a5410 !important; /* 5.5:1 on warning-soft */ + --danger: #a83a2a !important; /* brick red, 5.5:1 on paper */ + --danger-soft: #f2ddd5 !important; + --danger-soft-foreground: #8c2f1f !important; /* 6.3:1 on danger-soft */ +} + +/* ---------------------------------------------------------------- */ +/* 2. Dark mode: warm charcoal (evening by lamplight) */ +/* ---------------------------------------------------------------- */ + +.dark { + --background: #1c1813 !important; /* warm charcoal, deliberately not blue-gray */ + --foreground: #e8dcc4 !important; /* aged parchment, 13.0:1 on charcoal */ + --surface: #282219 !important; /* card fill, one step off the charcoal */ + --surface-secondary: #231d15 !important; /* sunken wells go deeper */ + --surface-tertiary: #191510 !important; /* deepest warm step (hover) */ + --overlay: #2e2820 !important; /* dialogs rise slightly above cards */ + --accent: #d4a26a !important; /* lamplight tan */ + --accent-foreground: #1c1813 !important; /* dark text, 7.7:1 on accent */ + --accent-soft: #3a2e1e !important; /* dimmed lamplight tint */ + --accent-soft-foreground: #e8c493 !important; /* 8.0:1 on accent-soft */ + --default: #33291d !important; /* neutral buttons stay woody */ + --default-foreground: #e8dcc4 !important; /* 10.5:1 on default */ + --default-soft: #3a2e1e !important; + --default-soft-foreground: #e8c493 !important; + --muted: #a3937a !important; /* faded parchment, 5.9:1 on charcoal */ + --border: #4a4136 !important; /* ember-lit edges */ + --separator: #3a332a !important; /* fainter rules between sections */ + --field-background: #282219 !important; /* inputs match card fill */ + --field-border: #4a4136 !important; + --field-foreground: #e8dcc4 !important; /* 11.6:1 on field bg */ + --field-placeholder: #8a7a63 !important; /* faint by design (3.8:1) */ + --segment: #282219 !important; + --segment-foreground: #e8dcc4 !important; /* 11.6:1 on segment */ + --focus: #d4a26a !important; /* focus ring follows the accent */ + --link: #e0a877 !important; /* warmed-up link, 8.4:1 on charcoal */ + --chart-stat: #9d8bc0 !important; /* dusty violet, 5.8:1 */ + --sleep: #9d8bc0 !important; + --success: #a3b95e !important; /* olive in lamplight, 8.1:1 */ + --success-soft: #2c2a15 !important; /* deep olive tint */ + --success-soft-foreground: #b9c878 !important; /* 8.0:1 on success-soft */ + --warning: #d9a648 !important; /* warm ochre, 8.0:1 */ + --warning-soft: #33290f !important; + --warning-soft-foreground: #ddb35c !important; /* 7.3:1 on warning-soft */ + --danger: #d97a68 !important; /* ember red, 5.8:1 */ + --danger-soft: #38201a !important; + --danger-soft-foreground: #e89a88 !important; /* 6.8:1 on danger-soft */ +} + +/* ---------------------------------------------------------------- */ +/* 3. Legacy-preset variants (higher specificity) */ +/* ---------------------------------------------------------------- */ + +/* Legacy preset variants carry an extra attribute selector that beats + the plain class selectors above on specificity — restate the tokens + for them so the overlay still wins if the legacy preset is active. */ +.light[data-theme-preset="legacy"], +[data-theme="light"][data-theme-preset="legacy"] { + --background: #f5efe0 !important; + --foreground: #433422 !important; + --surface: #efe7d3 !important; + --surface-secondary: #e7dcc3 !important; + --surface-tertiary: #ddd0b0 !important; + --overlay: #efe7d3 !important; + --accent: #8b5e34 !important; + --accent-foreground: #f7efdc !important; + --accent-soft: #ece1c6 !important; + --accent-soft-foreground: #6b4a26 !important; + --default: #e7dcc3 !important; + --default-foreground: #433422 !important; + --muted: #7a6a52 !important; + --border: #d5c9a8 !important; + --separator: #e0d5ba !important; + --field-background: #efe7d3 !important; + --field-border: #d5c9a8 !important; + --field-foreground: #433422 !important; + --field-placeholder: #8f7e5f !important; + --segment: #efe7d3 !important; + --segment-foreground: #433422 !important; + --focus: #8b5e34 !important; + --link: #9a3412 !important; +} +.dark[data-theme-preset="legacy"], +[data-theme="dark"][data-theme-preset="legacy"] { + --background: #1c1813 !important; + --foreground: #e8dcc4 !important; + --surface: #282219 !important; + --surface-secondary: #231d15 !important; + --surface-tertiary: #191510 !important; + --overlay: #2e2820 !important; + --accent: #d4a26a !important; + --accent-foreground: #1c1813 !important; + --accent-soft: #3a2e1e !important; + --accent-soft-foreground: #e8c493 !important; + --default: #33291d !important; + --default-foreground: #e8dcc4 !important; + --muted: #a3937a !important; + --border: #4a4136 !important; + --separator: #3a332a !important; + --field-background: #282219 !important; + --field-border: #4a4136 !important; + --field-foreground: #e8dcc4 !important; + --field-placeholder: #8a7a63 !important; + --segment: #282219 !important; + --segment-foreground: #e8dcc4 !important; + --focus: #d4a26a !important; + --link: #e0a877 !important; +} + +/* ---------------------------------------------------------------- */ +/* 4. Legacy --gp-* HSL triplets (plain, no !important) */ +/* ---------------------------------------------------------------- */ + +/* Legacy HSL triplets, for any not-yet-rebuilt screen still reading + the --gp-* variables. Deliberately plain (no !important): the app's + own --gp-* defaults are also plain declarations, and this overlay is + appended last in , so source order alone wins the tie — the + teaching point is that only token blocks fighting higher-specificity + rivals need the !important hammer. */ +.light { + --gp-bg: 43 51% 92%; /* #f5efe0 */ + --gp-surface: 43 47% 88%; /* #efe7d3 */ + --gp-card: 42 43% 84%; /* #e7dcc3 */ + --gp-border: 44 35% 75%; /* #d5c9a8 */ + --gp-muted: 36 20% 40%; /* #7a6a52 */ + --gp-fg: 33 33% 20%; /* #433422 */ + --gp-primary: 29 46% 37%; /* #8b5e34 */ + --gp-primary-fg: 42 63% 92%; /* #f7efdc */ +} +.dark { + --gp-bg: 33 19% 9%; /* #1c1813 */ + --gp-surface: 36 23% 13%; /* #282219 */ + --gp-card: 34 18% 15%; /* #2e2820 */ + --gp-border: 33 16% 25%; /* #4a4136 */ + --gp-muted: 37 18% 56%; /* #a3937a */ + --gp-fg: 40 44% 84%; /* #e8dcc4 */ + --gp-primary: 32 55% 62%; /* #d4a26a */ + --gp-primary-fg: 33 19% 9%; /* #1c1813 */ +} diff --git a/sepia-paper/theme.yaml b/sepia-paper/theme.yaml new file mode 100644 index 0000000..83a7335 --- /dev/null +++ b/sepia-paper/theme.yaml @@ -0,0 +1,41 @@ +# Theme package. Run `gp-module theme validate ` after editing. +apiVersion: gameplane.local/theme/v1 +name: sepia-paper +version: 1.0.0 +displayName: Sepia Paper +author: Gameplane +description: "Warm e-reader paper tones." +tags: [palette, light, dark] +license: AGPL-3.0-only +homepage: https://github.com/GameplanePanel/themes +tokens: + light: + background: "#f5efe0" + foreground: "#433422" + surface: "#efe7d3" + surface-secondary: "#e7dcc3" + surface-tertiary: "#ddd0b0" + overlay: "#efe7d3" + accent: "#8b5e34" + accent-foreground: "#f7efdc" + accent-soft: "#ece1c6" + accent-soft-foreground: "#6b4a26" + muted: "#7a6a52" + border: "#d5c9a8" + focus: "#8b5e34" + link: "#9a3412" + dark: + background: "#1c1813" + foreground: "#e8dcc4" + surface: "#282219" + surface-secondary: "#231d15" + surface-tertiary: "#191510" + overlay: "#2e2820" + accent: "#d4a26a" + accent-foreground: "#1c1813" + accent-soft: "#3a2e1e" + accent-soft-foreground: "#e8c493" + muted: "#a3937a" + border: "#4a4136" + focus: "#d4a26a" + link: "#e0a877" diff --git a/sidebar-right/previews/dark.png b/sidebar-right/previews/dark.png new file mode 100644 index 0000000..ddf5274 Binary files /dev/null and b/sidebar-right/previews/dark.png differ diff --git a/sidebar-right/previews/light.png b/sidebar-right/previews/light.png new file mode 100644 index 0000000..a67c692 Binary files /dev/null and b/sidebar-right/previews/light.png differ diff --git a/sidebar-right/theme.css b/sidebar-right/theme.css new file mode 100644 index 0000000..8582e70 --- /dev/null +++ b/sidebar-right/theme.css @@ -0,0 +1,73 @@ +/* Sidebar Right: official Gameplane theme. */ +/* ---------------------------------------------------------------- */ +/* 1. Move the desktop sidebar to the right edge (>= 1024px) */ +/* ---------------------------------------------------------------- */ + +@media (min-width: 1024px) { + /* The AppShell root (web/src/components/ui/AppShell.tsx) is already a + row flexbox, so `order` alone re-sequences its two children. It is + pinned here defensively: the move below only makes sense on the + horizontal axis, and pinning makes the intent obvious. No + !important is needed — unlayered overlay rules already outrank the + app's layered utilities on ties, and this declaration matches the + app default rather than fighting it. */ + div:has(> [data-testid="app-shell-sidebar"]) { + flex-direction: row; + } + + /* The sidebar wrapper goes LAST in visual order, which on a row + flexbox places it at the right edge. `order` is used instead of + flipping the root to row-reverse because order only re-sequences + the items — row-reverse would also mirror the inline axis (start/ + end alignment and auto margins swap sides), which can shift + content in ways this theme does not intend. Width, height, and the + internal column layout are deliberately left untouched: the app + pins lg:w-[260px] on this wrapper and h-full on the aside inside + it, and neither depends on which edge the sidebar sits on. */ + [data-testid="app-shell-sidebar"] { + order: 2; + } + + /* The content column (header + page content) goes FIRST. It is the + wrapper's adjacent sibling in AppShell, so the `+` combinator is + enough — no :has() needed here. Both orders are set explicitly + rather than relying on the 0 default so the visual left-to-right + contract is stated in one place. Note that flex `order` changes + VISUAL order only: DOM order, tab order, and the accessibility + tree are unaffected, so the nav landmark still reads first to + keyboard and screen-reader users even though it now renders on + the right. */ + [data-testid="app-shell-sidebar"] + div { + order: 1; + } +} + +/* ---------------------------------------------------------------- */ +/* 2. Swap the sidebar's edge separator to its new inner side */ +/* ---------------------------------------------------------------- */ + +@media (min-width: 1024px) { + /* The aside pins its separator with the Tailwind utilities + border-r border-border (web/src/components/ui/Sidebar.tsx). On + the right edge that line would sit against the screen's right + border, so drop it and draw the separator on the side that now + faces the content. The !important on border-right mirrors the + defensive style of the layout examples: it beats the utility even + if specificity ever stops being enough on its own. The color + comes from the --border token, so it stays consistent with + whatever palette is active. */ + [data-testid="app-shell-sidebar"] > aside[aria-label="Sidebar"] { + border-right: none !important; + border-left: 1px solid var(--border); + } + + /* The logo/cluster-name header block (first child of the aside) has + a border-BOTTOM and the footer block has a border-TOP. Both stay + exactly where they are: unlike the top-nav-blue.css example, + which turned the sidebar into a horizontal bar and had to swap + those horizontal borders for vertical ones, this theme keeps the + sidebar a vertical column — only its position in the row changes. + Horizontal separators remain correct between stacked blocks, and + the mobile drawer (which shares this markup but renders outside + the wrapper scoped above) is still untouched. */ +} diff --git a/sidebar-right/theme.yaml b/sidebar-right/theme.yaml new file mode 100644 index 0000000..3578a64 --- /dev/null +++ b/sidebar-right/theme.yaml @@ -0,0 +1,41 @@ +# Theme package. Run `gp-module theme validate ` after editing. +apiVersion: gameplane.local/theme/v1 +name: sidebar-right +version: 1.0.0 +displayName: Sidebar Right +author: Gameplane +description: "Moves the desktop sidebar to the right edge. No color changes." +tags: [layout, light, dark] +license: AGPL-3.0-only +homepage: https://github.com/GameplanePanel/themes +tokens: + light: + background: "#ffffff" + foreground: "#2a0f1e" + surface: "#fff7fb" + surface-secondary: "#f8dde9" + surface-tertiary: "#f8dde9" + overlay: "#fff7fb" + accent: "#db2777" + accent-foreground: "#ffffff" + accent-soft: "#ffffff" + accent-soft-foreground: "#be185d" + muted: "#6e5262" + border: "#efc3d6" + focus: "#db2777" + link: "#2563eb" + dark: + background: "#121114" + foreground: "#f5f3f7" + surface: "#1c1a20" + surface-secondary: "#17151a" + surface-tertiary: "#141317" + overlay: "#201e24" + accent: "#ff4fa3" + accent-foreground: "#ffffff" + accent-soft: "#331525" + accent-soft-foreground: "#ff8ac4" + muted: "#9e98a6" + border: "#2c2932" + focus: "#ff4fa3" + link: "#7db4ff" diff --git a/soft-3d-controls/previews/dark.png b/soft-3d-controls/previews/dark.png new file mode 100644 index 0000000..bd38bbc Binary files /dev/null and b/soft-3d-controls/previews/dark.png differ diff --git a/soft-3d-controls/previews/light.png b/soft-3d-controls/previews/light.png new file mode 100644 index 0000000..932273a Binary files /dev/null and b/soft-3d-controls/previews/light.png differ diff --git a/soft-3d-controls/theme.css b/soft-3d-controls/theme.css new file mode 100644 index 0000000..563ef2b --- /dev/null +++ b/soft-3d-controls/theme.css @@ -0,0 +1,39 @@ +/* Soft 3D Controls: official Gameplane theme. */ +main .card { + border: 1px solid color-mix(in srgb, var(--foreground) 10%, var(--surface)) !important; + border-radius: 18px !important; + box-shadow: + 7px 7px 18px color-mix(in srgb, var(--foreground) 11%, transparent), + -5px -5px 16px color-mix(in srgb, var(--surface) 85%, var(--foreground)) !important; +} + +button, +input, +textarea, +select, +[role="combobox"] { + border-radius: 12px !important; +} + +button { + box-shadow: + 0 3px 0 color-mix(in srgb, var(--foreground) 18%, transparent), + 0 7px 14px color-mix(in srgb, var(--foreground) 10%, transparent); + transition: transform 100ms ease, box-shadow 100ms ease; +} + +button:active { + transform: translateY(2px); + box-shadow: 0 1px 0 color-mix(in srgb, var(--foreground) 16%, transparent); +} + +input, +textarea, +select, +[role="combobox"] { + box-shadow: inset 2px 2px 5px color-mix(in srgb, var(--foreground) 10%, transparent); +} + +@media (prefers-reduced-motion: reduce) { + button { transition: none; } +} diff --git a/soft-3d-controls/theme.yaml b/soft-3d-controls/theme.yaml new file mode 100644 index 0000000..e7c99cc --- /dev/null +++ b/soft-3d-controls/theme.yaml @@ -0,0 +1,41 @@ +# Theme package. Run `gp-module theme validate ` after editing. +apiVersion: gameplane.local/theme/v1 +name: soft-3d-controls +version: 1.0.0 +displayName: Soft 3D Controls +author: Gameplane +description: "Raised cards, inset fields, and tactile button presses." +tags: [treatment, light, dark] +license: AGPL-3.0-only +homepage: https://github.com/GameplanePanel/themes +tokens: + light: + background: "#ffffff" + foreground: "#2a0f1e" + surface: "#fff7fb" + surface-secondary: "#f8dde9" + surface-tertiary: "#f8dde9" + overlay: "#fff7fb" + accent: "#db2777" + accent-foreground: "#ffffff" + accent-soft: "#ffffff" + accent-soft-foreground: "#be185d" + muted: "#6e5262" + border: "#efc3d6" + focus: "#db2777" + link: "#2563eb" + dark: + background: "#121114" + foreground: "#f5f3f7" + surface: "#1c1a20" + surface-secondary: "#17151a" + surface-tertiary: "#141317" + overlay: "#201e24" + accent: "#ff4fa3" + accent-foreground: "#ffffff" + accent-soft: "#331525" + accent-soft-foreground: "#ff8ac4" + muted: "#9e98a6" + border: "#2c2932" + focus: "#ff4fa3" + link: "#7db4ff" diff --git a/solarized/previews/dark.png b/solarized/previews/dark.png new file mode 100644 index 0000000..29e25ea Binary files /dev/null and b/solarized/previews/dark.png differ diff --git a/solarized/previews/light.png b/solarized/previews/light.png new file mode 100644 index 0000000..c74b5a4 Binary files /dev/null and b/solarized/previews/light.png differ diff --git a/solarized/theme.css b/solarized/theme.css new file mode 100644 index 0000000..1a668fc --- /dev/null +++ b/solarized/theme.css @@ -0,0 +1,143 @@ +/* Solarized: official Gameplane theme. */ +/* ---------------------------------------------------------------- */ +/* Solarized Light */ +/* ---------------------------------------------------------------- */ + +:root, +.light { + --background: #fdf6e3 !important; /* base3 */ + --foreground: #586e75 !important; /* base01 */ + --surface: #fffcf0 !important; /* card fill, slightly lighter than base3 */ + --surface-secondary: #eee8d5 !important; /* base2 */ + --surface-tertiary: #e3dcc4 !important; + --overlay: #fffcf0 !important; + --accent: #2aa198 !important; /* cyan */ + --accent-foreground: #002b36 !important; /* base03, ~5.3:1 on cyan */ + --accent-soft: #d9efea !important; + --accent-soft-foreground: #0f5952 !important; + --default: #eee8d5 !important; + --default-foreground: #586e75 !important; + --default-soft: #d9efea !important; + --default-soft-foreground: #0f5952 !important; + --muted: #657b83 !important; /* base00 */ + --border: #d6cdb0 !important; + --separator: #e0d8bd !important; + --field-background: #fffcf0 !important; + --field-border: #d6cdb0 !important; + --field-foreground: #073642 !important; /* base02 */ + --field-placeholder: #93a1a1 !important; /* base1 */ + --segment: #fffcf0 !important; + --segment-foreground: #586e75 !important; + --focus: #2aa198 !important; + --link: #268bd2 !important; /* blue */ + --chart-stat: #6c71c4 !important; /* violet */ + --sleep: #6c71c4 !important; + --success: #859900 !important; /* green */ + --success-soft: #e6ecc8 !important; + --success-soft-foreground: #4c5900 !important; + --warning: #b58900 !important; /* yellow */ + --warning-soft: #f0e4b8 !important; + --warning-soft-foreground: #6d5400 !important; + --danger: #dc322f !important; /* red */ + --danger-soft: #f7d8d7 !important; + --danger-soft-foreground: #a02624 !important; +} + +/* ---------------------------------------------------------------- */ +/* Solarized Dark */ +/* ---------------------------------------------------------------- */ + +.dark { + --background: #002b36 !important; /* base03 */ + --foreground: #93a1a1 !important; /* base1 */ + --surface: #073642 !important; /* base02 */ + --surface-secondary: #05313d !important; + --surface-tertiary: #03242d !important; + --overlay: #073642 !important; + --accent: #2aa198 !important; /* cyan */ + --accent-foreground: #002b36 !important; + --accent-soft: #0e4a47 !important; + --accent-soft-foreground: #8adfd6 !important; + --default: #0a3b47 !important; + --default-foreground: #93a1a1 !important; + --default-soft: #0e4a47 !important; + --default-soft-foreground: #8adfd6 !important; + --muted: #657b83 !important; /* base00 */ + --border: #134653 !important; + --separator: #0d3a45 !important; + --field-background: #05313d !important; + --field-border: #134653 !important; + --field-foreground: #eee8d5 !important; /* base2 */ + --field-placeholder: #586e75 !important; /* base01 */ + --segment: #073642 !important; + --segment-foreground: #93a1a1 !important; + --focus: #2aa198 !important; + --link: #268bd2 !important; /* blue */ + --chart-stat: #6c71c4 !important; /* violet */ + --sleep: #6c71c4 !important; + --success: #859900 !important; /* green */ + --success-soft: #243407 !important; + --success-soft-foreground: #b3c34d !important; + --warning: #b58900 !important; /* yellow */ + --warning-soft: #3a2f06 !important; + --warning-soft-foreground: #d8b449 !important; + --danger: #dc322f !important; /* red */ + --danger-soft: #471d1d !important; + --danger-soft-foreground: #f08582 !important; +} + +/* Legacy preset variants carry an extra attribute selector that beats + the plain class selectors above on specificity — restate the tokens + for them so the overlay still wins if the legacy preset is active. */ +.light[data-theme-preset="legacy"], +[data-theme="light"][data-theme-preset="legacy"] { + --background: #fdf6e3 !important; + --foreground: #586e75 !important; + --surface: #fffcf0 !important; + --surface-secondary: #eee8d5 !important; + --surface-tertiary: #e3dcc4 !important; + --overlay: #fffcf0 !important; + --accent: #2aa198 !important; + --accent-foreground: #002b36 !important; + --accent-soft: #d9efea !important; + --accent-soft-foreground: #0f5952 !important; + --default: #eee8d5 !important; + --default-foreground: #586e75 !important; + --muted: #657b83 !important; + --border: #d6cdb0 !important; + --separator: #e0d8bd !important; + --field-background: #fffcf0 !important; + --field-border: #d6cdb0 !important; + --field-foreground: #073642 !important; + --field-placeholder: #93a1a1 !important; + --segment: #fffcf0 !important; + --segment-foreground: #586e75 !important; + --focus: #2aa198 !important; + --link: #268bd2 !important; +} +.dark[data-theme-preset="legacy"], +[data-theme="dark"][data-theme-preset="legacy"] { + --background: #002b36 !important; + --foreground: #93a1a1 !important; + --surface: #073642 !important; + --surface-secondary: #05313d !important; + --surface-tertiary: #03242d !important; + --overlay: #073642 !important; + --accent: #2aa198 !important; + --accent-foreground: #002b36 !important; + --accent-soft: #0e4a47 !important; + --accent-soft-foreground: #8adfd6 !important; + --default: #0a3b47 !important; + --default-foreground: #93a1a1 !important; + --muted: #657b83 !important; + --border: #134653 !important; + --separator: #0d3a45 !important; + --field-background: #05313d !important; + --field-border: #134653 !important; + --field-foreground: #eee8d5 !important; + --field-placeholder: #586e75 !important; + --segment: #073642 !important; + --segment-foreground: #93a1a1 !important; + --focus: #2aa198 !important; + --link: #268bd2 !important; +} diff --git a/solarized/theme.yaml b/solarized/theme.yaml new file mode 100644 index 0000000..faf1333 --- /dev/null +++ b/solarized/theme.yaml @@ -0,0 +1,41 @@ +# Theme package. Run `gp-module theme validate ` after editing. +apiVersion: gameplane.local/theme/v1 +name: solarized +version: 1.0.0 +displayName: Solarized +author: Gameplane +description: "The Solarized palette in both modes." +tags: [palette, light, dark] +license: AGPL-3.0-only +homepage: https://github.com/GameplanePanel/themes +tokens: + light: + background: "#fdf6e3" + foreground: "#586e75" + surface: "#fffcf0" + surface-secondary: "#eee8d5" + surface-tertiary: "#e3dcc4" + overlay: "#fffcf0" + accent: "#2aa198" + accent-foreground: "#002b36" + accent-soft: "#d9efea" + accent-soft-foreground: "#0f5952" + muted: "#657b83" + border: "#d6cdb0" + focus: "#2aa198" + link: "#268bd2" + dark: + background: "#002b36" + foreground: "#93a1a1" + surface: "#073642" + surface-secondary: "#05313d" + surface-tertiary: "#03242d" + overlay: "#073642" + accent: "#2aa198" + accent-foreground: "#002b36" + accent-soft: "#0e4a47" + accent-soft-foreground: "#8adfd6" + muted: "#657b83" + border: "#134653" + focus: "#2aa198" + link: "#268bd2" diff --git a/terminal-green/previews/dark.png b/terminal-green/previews/dark.png new file mode 100644 index 0000000..5148c62 Binary files /dev/null and b/terminal-green/previews/dark.png differ diff --git a/terminal-green/previews/light.png b/terminal-green/previews/light.png new file mode 100644 index 0000000..c09b68e Binary files /dev/null and b/terminal-green/previews/light.png differ diff --git a/terminal-green/theme.css b/terminal-green/theme.css new file mode 100644 index 0000000..b7f0980 --- /dev/null +++ b/terminal-green/theme.css @@ -0,0 +1,53 @@ +/* Terminal Green: official Gameplane theme. */ +html.dark[data-theme][data-theme-preset][data-theme-type] { + --background: #080f0c; + --foreground: #ddfbe8; + --surface: #0e1913; + --surface-secondary: #0a130f; + --surface-tertiary: #14231a; + --overlay: #1b2d21; + --accent: #55e68b; + --accent-foreground: #062111; + --accent-soft: #143622; + --accent-soft-foreground: #8af2ae; + --default: #19271e; + --default-foreground: #ddfbe8; + --border: #2b4935; + --separator: #1d3425; + --muted: #9db9a5; + --field-background: #0a130f; + --field-border: #365841; + --field-foreground: #e9fff0; + --field-placeholder: #779680; + --focus: #55e68b; + --link: #7cf2a6; + --radius: 2px; + --radius-md: var(--radius); + --radius-lg: calc(var(--radius) + 2px); + --field-radius: 2px; + --font-sans: "IBM Plex Mono", "Cascadia Code", ui-monospace, monospace; +} +html.light[data-theme][data-theme-preset][data-theme-type] { + --background: #eff7f0; + --foreground: #183522; + --surface: #f9fff9; + --surface-secondary: #e6f2e8; + --surface-tertiary: #d8e9dc; + --overlay: #f9fff9; + --accent: #19713a; + --accent-foreground: #fff; + --accent-soft: #d0f0d8; + --accent-soft-foreground: #14572e; + --default: #e0eee2; + --default-foreground: #1d3a26; + --border: #bfd8c4; + --separator: #d2e4d5; + --muted: #54705a; + --field-background: #fff; + --field-border: #b6d2bc; + --field-foreground: #183522; + --field-placeholder: #617d67; + --focus: #19713a; + --link: #176436; + --font-sans: "IBM Plex Mono", "Cascadia Code", ui-monospace, monospace; +} diff --git a/terminal-green/theme.yaml b/terminal-green/theme.yaml new file mode 100644 index 0000000..b2cc617 --- /dev/null +++ b/terminal-green/theme.yaml @@ -0,0 +1,41 @@ +# Theme package. Run `gp-module theme validate ` after editing. +apiVersion: gameplane.local/theme/v1 +name: terminal-green +version: 1.0.0 +displayName: Terminal Green +author: Gameplane +description: "Phosphor green, monospace, and compact corners." +tags: [palette, light, dark] +license: AGPL-3.0-only +homepage: https://github.com/GameplanePanel/themes +tokens: + light: + background: "#eff7f0" + foreground: "#183522" + surface: "#f9fff9" + surface-secondary: "#e6f2e8" + surface-tertiary: "#d8e9dc" + overlay: "#f9fff9" + accent: "#19713a" + accent-foreground: "#ffffff" + accent-soft: "#d0f0d8" + accent-soft-foreground: "#14572e" + muted: "#54705a" + border: "#bfd8c4" + focus: "#19713a" + link: "#176436" + dark: + background: "#080f0c" + foreground: "#ddfbe8" + surface: "#0e1913" + surface-secondary: "#0a130f" + surface-tertiary: "#14231a" + overlay: "#1b2d21" + accent: "#55e68b" + accent-foreground: "#062111" + accent-soft: "#143622" + accent-soft-foreground: "#8af2ae" + muted: "#9db9a5" + border: "#2b4935" + focus: "#55e68b" + link: "#7cf2a6" diff --git a/top-nav-blue/previews/dark.png b/top-nav-blue/previews/dark.png new file mode 100644 index 0000000..2f55b09 Binary files /dev/null and b/top-nav-blue/previews/dark.png differ diff --git a/top-nav-blue/previews/light.png b/top-nav-blue/previews/light.png new file mode 100644 index 0000000..0254056 Binary files /dev/null and b/top-nav-blue/previews/light.png differ diff --git a/top-nav-blue/theme.css b/top-nav-blue/theme.css new file mode 100644 index 0000000..fa92bf4 --- /dev/null +++ b/top-nav-blue/theme.css @@ -0,0 +1,161 @@ +/* Top Nav Blue: official Gameplane theme. */ +/* ---------------------------------------------------------------- */ +/* 1. Blue accent theme — both color schemes */ +/* ---------------------------------------------------------------- */ + +/* Light mode: blue-700 accent on white gives 6.70:1 contrast (WCAG AA + for normal text; AA requires 4.5:1, AAA requires 7:1). */ +:root, +.light { + --accent: #1d4ed8 !important; /* blue-700 */ + --accent-foreground: #ffffff !important; + --accent-soft: #dbeafe !important; /* blue-100 */ + --accent-soft-foreground: #1e3a8a !important; /* blue-900, 8.49:1 on accent-soft */ + --focus: #1d4ed8 !important; +} + +/* Dark mode: blue-400 accent on near-black text gives 7.41:1 contrast. */ +.dark { + --accent: #60a5fa !important; /* blue-400 */ + --accent-foreground: #0b1120 !important; + --accent-soft: #1e3a5f !important; + --accent-soft-foreground: #bfdbfe !important; /* blue-200 */ + --focus: #60a5fa !important; +} + +/* Plain text links (e.g. inside markdown/log output) use the + --link token, not --accent, so retint that instead of setting + `a { color }` directly — a blanket `a` rule would also recolor + HeroUI buttons that render as elements (e.g. "Create server" + on /servers), leaving them blue text on the new blue accent + background. */ +:root, +.light { + --link: #1d4ed8 !important; +} +.dark { + --link: #60a5fa !important; +} + +/* ---------------------------------------------------------------- */ +/* 2. Sidebar -> top navigation bar (desktop only, >= 1024px) */ +/* ---------------------------------------------------------------- */ + +@media (min-width: 1024px) { + /* The AppShell root is a row flexbox with the sidebar wrapper as its + first child; flip it to a column so the (now full-width) sidebar + wrapper stacks above the header + content column instead of + sitting beside it. */ + div:has(> [data-testid="app-shell-sidebar"]) { + flex-direction: column !important; + } + + /* The sidebar wrapper itself: full width, natural height, row of + its own so the