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.

Round the avatars and light them for the theme

5138159281e9940617a4ac399f8b50fa1f5f659b · Keenan Nemetz · 8d ago · parent 2a8c7fbf

Round the avatars and light them for the theme

The tiles are rounded squares now: the element's border-radius does the
clip, so DiceBear's circular mask and the document-wide id it carried are
gone. That also makes a mark about 130 bytes smaller.

The disc in the sky follows the theme. A dark theme gets the moon: pale
cream, near-white and a cool grey. A light theme keeps the sun: cream,
yellow and sunset orange. Switching theme in the account page redraws
the avatars in place, because theme.js writes data-theme on <html> and
the bundle watches that attribute; following the system is the same path
because theme.js resolves it to a concrete variant.

Rebuilt the bundle (10KB, 4KB gzipped) and rendered its real output at
20px and 52px on both themes with the rounded clip applied: the moon
reads against the darker skies and the sun still reads on the light one.

server/web/avatar.go +2−2

@@ -9,7 +9,7 @@ package web
9 9 // - The server renders the account's initial on one of seven Everforest grounds,
10 10 // exactly as every avatar looked before the marks existed. A browser without
11 11 // scripts, or one that has not run the bundle yet, shows a letter rather than
12 // an empty circle. The avatar is decoration; nothing about the page depends on
12 // an empty tile. The avatar is decoration; nothing about the page depends on
13 13 // it arriving.
14 14 // - The seed is the name, never an index or a session. The same account draws
15 15 // the same mark on every page and between visits, and the instance stores no
@@ -61,7 +61,7 @@ func portrait(name string) avatarView {
61 61 }
62 62
63 63 // initial is the fallback letter. Account names are authoritative, so the first
64 // rune is enough; an empty name gets "?" rather than an empty circle.
64 // rune is enough; an empty name gets "?" rather than an empty tile.
65 65 func initial(name string) string {
66 66 for _, r := range strings.TrimSpace(name) {
67 67 return strings.ToUpper(string(r))