Skip to content

Seasonal & Holiday Theming ​

The HTML report supports seasonal and holiday themes with different mascots, particles, and glow effects.

Theme system ​

getTheme(date) in html-report.ts returns a ThemeKey. Holidays are checked first (they override seasons).

Currently hardcoded to summer (white sparkles, default mascot) until all seasonal assets are finalized. To enable auto-detection, change:

typescript
// const theme: ThemeKey = 'summer';
const theme = getTheme(new Date());

Holidays (checked first, by date range) ​

Theme keyDate rangeParticlesMascotGlow
new-yearDec 30 – Jan 2πŸŽ† sparkledefaultgold
valentinesFeb 13 – Feb 15πŸ’• petaldefaultpink
easterThu before – Mon after Easter🐣 petaldefaultwarm yellow
may17May 16 – May 18πŸ‡³πŸ‡΄ petaldefaultred
midsummerJun 20 – Jun 24🌻 petaldefaultwarm yellow
halloweenOct 25 – Nov 1πŸŽƒ leafhalloweenorange
christmasDec 1 – Dec 29❄ snowflakechristmasice blue

Easter is computed dynamically using the Anonymous Gregorian algorithm (easterSunday(year)).

Seasons (fallback) ​

Theme keyMonthsParticlesMascotGlow
winterJan–Feb❄ snowflakedefaultice blue
springMar–May🌸 petaldefaultpink
summerJun–Aug✦ sparkle (CSS diamond)defaultwhite
autumnSep–NovπŸ‚ leafdefaultorange

Config structure ​

THEME_CONFIG maps each ThemeKey to:

  • particles β€” emoji/character for floating particles in the hero header
  • particleShape β€” CSS class suffix (shape-snowflake, shape-petal, shape-sparkle, shape-leaf)
  • mascot β€” key into MASCOT_ASSETS ('default', 'christmas', 'halloween')
  • glow β€” rgba() color for the hero corner glow animation

Mascot assets ​

KeyFileStatus
defaultbubbles-normal.tsDone (Bubbles normal, 200px height, ~50KB base64)
christmasbubbles-christmas.tsDone (Bubbles with Santa hat, ~43KB)
halloweenbubbles-halloween.tsDone (Bubbles halloween variant, ~54KB)

Source PNGs are in /Users/nicolay/Cavai/CavaiAssets/. Original resolution ~3000px, resized to 200px height (retina) using sips -Z 200.

How to add a new mascot ​

  1. Export the image as PNG (transparent background)
  2. Resize to ~200px height: sips -Z 200 image.png
  3. Convert to base64: base64 -i image.png | tr -d '\n'
  4. Create a new file like bubbles-spring.ts:
    typescript
    export const BUBBLES_SPRING_BASE64 = 'data:image/png;base64,...';
  5. Import in html-report.ts:
    typescript
    import { BUBBLES_SPRING_BASE64 } from './bubbles-spring.js';
  6. Add to MASCOT_ASSETS:
    typescript
    spring: BUBBLES_SPRING_BASE64,
  7. Update THEME_CONFIG entries that should use this mascot

Hero glow ​

The hero header has a ::after pseudo-element with a radial gradient positioned in the bottom-right corner (where the mascot is). It uses --season-glow CSS custom property and pulses with a 5s glow-pulse animation. The on-brand Cavai gradient is always preserved β€” the glow is purely additive.

Console preview ​

setSeason(themeKey) is available in the browser console for previewing any theme. It animates the mascot swap (slide out/in), updates particles, and changes the glow color. Available keys: all theme keys above plus normal (alias for summer).

TODO: Future assets ​

Particle assets ​

Currently particles use emoji characters. Could be replaced with proper SVG/PNG:

  • Snowflake β€” delicate, white, semi-transparent (winter/christmas)
  • Cherry blossom petal β€” soft pink, organic shape (spring)
  • Leaf β€” warm orange/brown, organic (autumn)
  • Holiday-specific β€” fireworks, Easter eggs, flags, etc.

Additional mascot variants ​

  • Spring β€” Bubbles with flowers?
  • Summer β€” Bubbles with sunglasses?
  • Autumn β€” Bubbles with scarf?
  • Valentine's β€” Bubbles with hearts?

Future enhancements ​

  • Gradient tweaks β€” warm tones in summer, cooler in winter
  • Animation variants β€” snowfall drift vs. petal scatter vs. leaf tumble
  • User override β€” allow metadata to force a specific theme

Internal documentation