Changeset d9c5eb8 in Klonkt for src/routes/og.js


Ignore:
Timestamp:
06/30/2026 10:17:48 PM (2 months ago)
Author:
roboburr <roboburr@…>
Branches:
main
Children:
f3663e5
Parents:
e3a5aed
Message:

feat(og): light OG card when the site's default theme is Light

OgImageService always rendered a dark card. It now follows the site's "default theme for new
visitors" (theme_override): a light card (the palette's light paper/ink/accent) when set to Light,
otherwise dark (Auto/Dark -> dark, since an OG image is static). og.js selects theme_override and the
theme is part of the cache key so light + dark cache separately.

Co-Authored-By: Claude <noreply@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/routes/og.js

    re3a5aed rd9c5eb8  
    1414  try {
    1515    site = db.prepare(
    16       'SELECT slug, title, tagline, description, palette, accent FROM sites WHERE slug = ?'
     16      'SELECT slug, title, tagline, description, palette, accent, theme_override FROM sites WHERE slug = ?'
    1717    ).get(req.params.slug);
    1818  } catch { /* db error → 404 below */ }
Note: See TracChangeset for help on using the changeset viewer.