Sign in

Search issue titles and bodies, change requests and comments. Private repositories you cannot read are not included.

vole
Clone

Read only, no credentials:

https://rodent.software/vole.git

Write over SSH with a registered key:

git clone ssh://git@rodent.software:2222/vole.git

A free and open-source forge that lives in your Git repo.

#226

Offer instance theme packs in the appearance picker

merged · by keenan 1d ago · merged into main at c14fc778 by keenan 1d ago

keenan opened this 1d ago

What

Instance repositories can now provide selectable appearance themes as one stylesheet per theme.

  • profile/themes/index.json lists { "id", "name" } entries.
  • profile/themes/<id>.css is that theme’s stylesheet, scoped to :root[data-theme="<id>"].
  • Account → Appearance lists the built-in Everforest variants plus the instance themes, grouped under This instance.
  • Theme stylesheets are linked before profile/custom.css, so instance-wide overrides still apply last.
  • The server validates ids and names, rejects duplicate/reserved ids and missing stylesheets, and keeps the previous snapshot on error.
  • theme.js accepts the instance ids from <html data-themes="…"> before first paint, so a saved custom theme does not flash or get cleared just because the script does not know it.

Why

The appearance picker was hardcoded to Everforest. The instance repository already owns the instance’s presentation, so it should be able to offer named palettes without adding server code for each one.

Default repository docs

The starter repository now creates profile/themes/index.json and its root README.md documents the theme-pack format, the id rules, the data-theme selector, dark/light requirements, and the difference between a selectable theme and profile/custom.css. The Admin Configuration path table and docs/configuration.md describe the same convention.

Stacking

This is based on instance-repo-init (#225) because it extends the instance repository seed and docs from that request. Land #225 first.

Checks

./vole workflow run verify passes.

Discussion (1)

keenan 1d ago

Removed profile/themes/index.json from the change. The theme file is now the whole declaration:

  • Every profile/themes/<id>.css is discovered automatically; there is no manifest.
  • The file name is the id and the label: acme-ocean.css becomes Acme Ocean.
  • The rules stay scoped to :root[data-theme="<id>"].
  • The loader validates the file name, rejects system / everforest-*, and sorts the picker by label.
  • An old index.json left in an existing repository is ignored.

The starter repository README, docs/configuration.md, and the Admin Configuration path table now describe the file-name convention only. Head moved to d222b0c; ./vole workflow run verify passes.