6 Commits
Author SHA1 Message Date
ancsemi 0b8c04e708 Replace em dashes in the English UI text and messages 2026-10-10 16:08:54 -04:00
Bernardo Costa dce7bd322e Add Compact Theme API v1 theme (#5549) 2026-09-01 19:28:11 -04:00
Bernardo Costa 026947a125 Add stable Theme API v1 contract (#5544) 2026-08-30 13:59:16 -04:00
ancsemi 6f92d66111 Document background images in custom themes
People reach for a custom theme wanting a wallpaper, and the docs only
covered colour variables, so the answer kept being "it is possible" with
no instructions attached.

The guide and the theme template now carry the recipe: put the image in
themes/ beside the .theme.css and reference it with a relative path, which
works because the whole folder is served, and set it on .main, which is
the chat area. The message list, channel header and messages are all
transparent, so it shows through behind them.

The snippet includes a scrim gradient over the image, with a note on what
it is for, since text over a bright photo is unreadable without one. Also
states plainly what a theme cannot do: it is a file on the server, so
adding one needs server access and publishing it offers it to everyone.
There is no per-user wallpaper setting.

Verified against a running server: the theme file and a sibling image are
both served, a relative url() resolves to /themes/, and the theme's
background-image overrides the stylesheet's background shorthand on .main
while keeping the theme colour underneath.
2026-08-19 00:22:24 -04:00
ancsemi 1aed4c50ab Give grouped messages and their group leader one left edge
A group leader indents its text by (row padding + avatar + gap). The messages
that follow it have no avatar, so they pad by that same total to line up. Both
numbers were written out by hand in five places, and two of them disagreed:
the spacious density set the leader side to 70px but never got a matching
compact rule, so follow-ups sat 14px to its left, and the Braid themes resized
the row and avatar with !important while leaving the compact side alone, for
8px. Two separate reports, one defect.

One side is now derived from the other through --msg-gutter, and density
tiers, breakpoints and themes set only the parts. The two cannot drift apart
again, and a theme that follows the same convention gets it right for free.
The ~480px breakpoint was 4px out for the same reason and is fixed too.

Measured against a live server: leader and follow-up left edges are identical
across cozy/compact/spacious at 1280/760/350px, and under both Braid themes.
2026-08-10 00:46:58 -04:00
ancsemi 9a03905536 feat(#5332): custom CSS themes in theme picker
Admin can now promote .theme.css files into the main theme picker:

- Admin Settings → Appearance → Custom Themes: checkboxes for every
  .theme.css file in themes/. Checked themes are stored server-wide
  in the published_themes DB setting.

- /api/themes now returns a 'published' flag on each theme so clients
  know which ones to show in the picker.

- plugin-loader.js injects published themes as real buttons in
  #theme-selector. Clicking one applies it exclusively: any previous
  file-theme link is removed, inline custom vars are cleared, and the
  new .theme.css link is injected after all other stylesheets so its
  :root{} rules win without fighting built-in [data-theme] selectors.

- theme.js: switching to a built-in theme strips injected file-theme
  links. applyThemeFromServer handles 'file:' values.

- The Default Theme admin dropdown now auto-populates with published
  file themes alongside built-in options.

- themes/custom.css.example: reference file documenting all CSS vars
  and @icon metadata for custom theme authors.
2026-05-01 22:28:07 -04:00