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.
Mix the avatar palette from the active theme
214145e539d0f9f6e0420375e3c011994eed9bde · Keenan Nemetz · 7d ago · parent df894c4f
Mix the avatar palette from the active theme The seven grounds were fixed hexes, so a mark looked the same on every Everforest variant and did not really belong to any of them. They are now mixed from the active variant's own accents toward its panel colour, in everforest.css, and the tone class just picks one. The disc is the theme's moon or sun colours and the ink the hills shade toward is the theme's darkest token. Two shares of accent, because the panels are opposite: a dark theme's panel is nearly black, so its grounds keep 80% of the accent to stay a colour, while a light panel is nearly white and keeps 48% so the landscape is pastel rather than a highlighter. A custom property holding color-mix() reads back as text, so the bundle resolves the palette through one hidden probe element and caches it per theme; app.js already redraws the avatars when data-theme changes, so a theme switch re-reads it. The fallback letter now takes --av-fg, which is the theme's foreground, so it stays readable on a light theme's pastel grounds.
server/web/static/vole.css +5−19
| @@ -1162,11 +1162,10 @@ pre code { background: none; border: 0; padding: 0; font-size: inherit; } | |||
| 1162 | 1162 | ||
| 1163 | 1163 | /* A name's avatar. The ground and the fallback letter are server-rendered here; | |
| 1164 | 1164 | the mark itself is drawn in the browser by DiceBear (see | |
| 1165 | server/web/avatar.go and scripts/avatars-entry.js). The seven grounds are the | ||
| 1166 | Everforest accents pulled toward the page, identical in every Everforest | ||
| 1167 | variant on purpose: a person who is moss green on one theme must not be clay on | ||
| 1168 | another. The bundle reads the computed colour, so this sheet remains the only | ||
| 1169 | palette. */ | ||
| 1165 | server/web/avatar.go and scripts/avatars-entry.js). The seven grounds are | ||
| 1166 | declared per theme in everforest.css, mixed from the active variant's own | ||
| 1167 | accents, so a mark matches the theme the reader chose. The bundle reads the | ||
| 1168 | computed colours, so those two files remain the only palette. */ | ||
| 1170 | 1169 | .avatar { | |
| 1171 | 1170 | display: inline-grid; | |
| 1172 | 1171 | place-items: center; | |
| @@ -1176,25 +1175,12 @@ pre code { background: none; border: 0; padding: 0; font-size: inherit; } | |||
| 1176 | 1175 | border-radius: 30%; | |
| 1177 | 1176 | overflow: hidden; | |
| 1178 | 1177 | background: var(--av-bg, #6b7561); | |
| 1179 | color: #f0e6d2; | ||
| 1178 | color: var(--av-fg, #f0e6d2); | ||
| 1180 | 1179 | font-size: calc(10px * var(--font-scale)); | |
| 1181 | 1180 | font-weight: 600; | |
| 1182 | 1181 | line-height: 1; | |
| 1183 | 1182 | text-transform: uppercase; | |
| 1184 | 1183 | } | |
| 1185 | /* The seven grounds are also the palette a landscape draws its hills from, so | ||
| 1186 | they live on the root where the avatar bundle can read all seven. A tone picks | ||
| 1187 | the sky; the hills take other tones, which is what makes every mark at least | ||
| 1188 | two colours rather than one hue in shades. */ | ||
| 1189 | :root { | ||
| 1190 | --av-c1: #6f8a5f; | ||
| 1191 | --av-c2: #a2734f; | ||
| 1192 | --av-c3: #a05f66; | ||
| 1193 | --av-c4: #5b7f92; | ||
| 1194 | --av-c5: #816a9b; | ||
| 1195 | --av-c6: #94843f; | ||
| 1196 | --av-c7: #7a6b5f; | ||
| 1197 | } | ||
| 1198 | 1184 | .avatar.c1 { --av-bg: var(--av-c1); } | |
| 1199 | 1185 | .avatar.c2 { --av-bg: var(--av-c2); } | |
| 1200 | 1186 | .avatar.c3 { --av-bg: var(--av-c3); } | |