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/git/vole.git

Write over SSH with a registered key:

git clone ssh://git@0.0.0.0:2222/vole.git

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

Offer instance theme packs in the appearance picker

f7a34d8749054b7ff9e1a304a3fc90ccf3786877 · Keenan Nemetz · 1d ago · parent bc95767f

Offer instance theme packs in the appearance picker

Add profile/themes/index.json and one scoped stylesheet per theme. The loader validates ids and names, pairs each manifest entry with profile/themes/<id>.css, and exposes the list to the account picker and to theme.js before first paint. Theme stylesheets are linked before profile/custom.css, so an instance-wide override still wins.

The starter repository now includes an empty manifest and documents the format in its root README. The configuration docs and the Admin Configuration path table describe the same convention.

server/ui_test.go +5−4

@@ -135,9 +135,10 @@ func TestStaticAssetsAreServedFromTheBinary(t *testing.T) {
135 135 }
136 136 }
137 137
138 // Everforest is the permanent theme: the shell starts on dark/medium, the
139 // account page owns the picker, and every variant is scoped to the attribute
140 // theme.js sets. If the shell stops naming either file the picker does nothing.
138 // Everforest is built in: the shell starts on dark/medium, the account page owns
139 // the picker, and every variant is scoped to the attribute theme.js sets. If the
140 // shell stops naming either file the picker does nothing. The instance
141 // repository may add its own themes; instance_repo_test.go covers that path.
141 142 func TestEverforestThemesAndAccountPicker(t *testing.T) {
142 143 t.Parallel()
143 144 f := newFixture(t)
@@ -229,7 +230,7 @@ func TestEverforestThemesAndAccountPicker(t *testing.T) {
229 230 if code != 200 {
230 231 t.Fatalf("/static/theme.js = %d", code)
231 232 }
232 for _, want := range []string{"localStorage", "dataset.theme", "prefers-color-scheme", "everforest-light-medium", "dataset.fontScale", "vole-font-scale"} {
233 for _, want := range []string{"localStorage", "dataset.theme", "dataset.themes", "prefers-color-scheme", "everforest-light-medium", "dataset.fontScale", "vole-font-scale"} {
233 234 if !strings.Contains(script, want) {
234 235 t.Errorf("the theme script does not carry %s", want)
235 236 }