Add ULLI weather easter egg to falling background particles
This commit is contained in:
1 parent
955f47ccd6
commit
98182c179f
11 files changed
+399
-21
No files matched your search
@@ -1,5 +1,12 @@
|
||||
# Structure and Data
|
||||
|
||||
## ULLI weather easter egg — 2026-10-18
|
||||
|
||||
- `app/belki/weather.py` fetches the fixed `https://weather.nyan404.ru/api/v1/metar/raw/ulli` endpoint and extracts observed wind (MPS/KT/KMH, including gusts), rain/drizzle, snow and mixed precipitation. Trend, remark and vicinity groups are ignored. Light, moderate, heavy/shower/blowing-snow effects change particle density; wind changes speed and drift.
|
||||
- `/api/weather/ulli` returns only `{mode, intensity, wind_mps}`. A 5-minute in-memory cache, nonblocking refresh lock, 3-second upstream timeout, 64 KiB response cap and 1-minute failure cache bound the work. Missing, invalid, future (>10 min) or stale (>2 h) observations restore leaves. No database, credentials or new dependencies are involved.
|
||||
- `web/weather-effect.js` and `.css` are shared by calculator/admin and served through explicit `/api/weather/effect.js` and `.css` routes. This keeps them behind the existing gateway `/api/` proxy without a gateway/base-image change. Browser refreshes every 5 minutes, pauses animation/polling in hidden tabs, and respects reduced motion. Existing seven-leaf markup remains the no-JS fallback.
|
||||
- Validation used an isolated local server because no remote test-zone MCP was exposed. Weather/parser/cache/HTTP tests, calculator/admin checks and browser fixtures cover desktop (1280 px), mobile (390 px), rain/snow/mixed/leaves, wind acceleration, reduced motion and failed API fallback. Screenshots/scripts and temporary SQLite data live under `/tmp`, outside Git; stop the test server/browser after use. macOS Python needed `SSL_CERT_FILE=/etc/ssl/cert.pem` for the live weather smoke check; TLS verification stays enabled. No push or deployment.
|
||||
|
||||
## Repository Layout
|
||||
- [`.gitlab-ci.yml`](./.gitlab-ci.yml): existing single-stage GitLab pipeline targeting the Belki image.
|
||||
- [`Dockerfile`](./Dockerfile): Python 3.12 runtime image for the calculator web service and shared static assets.
|
||||
|
||||
Reference in new issue
Block a user