diff --git a/CLAUDE.md b/CLAUDE.md index f8de90d..21130bd 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -69,6 +69,8 @@ Existing violations are recorded in [arabterm/scripts/validation_baseline.json]( [website/](website/) is an [Astro](https://astro.build/) static site (deployed to ) that reads `arabterm.db` at build time (the gh-pages workflow runs `make db` first, since the unpacked file is not in the checkout) via `better-sqlite3` and emits one HTML page per dictionary (paginated 1000 terms / page) plus a per-dict JSON download. It's a third derived view of the DB alongside the SQLite and MariaDB dumps — no JSON is committed. +The «الجديد» button in the header ([WhatsNew.astro](website/src/components/WhatsNew.astro)) tells returning visitors what is new, once: the panel opens by itself when there is unseen news and closing it marks the news seen, in `localStorage` (`whatsNew`: feature ids and largest dictionary id — nothing is sent anywhere). Dictionaries added since the last visit are detected from the dictionary ids built into every page (`getDictionaryIndex()` in `db.ts`), so a new dictionary announces itself on the next deploy. Features are the hand-written `FEATURES` list in [whatsNew.ts](website/src/lib/whatsNew.ts): add an entry (stable `id`, date, plain Arabic for a non-technical reader, optional `media` animation) only for something a visitor of the site notices — never dependency or build changes — and prune entries after a few months. A first visit records the state silently. The same mechanism exists in wikitermbase with its own list. + Legacy unprefixed URLs from the original Angular site (e.g. `/water_engineering/`) are preserved as static HTML redirects to the canonical `name_tech` URL (`/at_water_engineering/`). The legacy slug list lives in `LEGACY_SLUGS` in [website/src/lib/db.ts](website/src/lib/db.ts) — never remove a legacy slug from this list, even if its underlying dictionary changes. [`.github/workflows/gh-pages.yml`](.github/workflows/gh-pages.yml) runs `npm run build` inside `website/` on every push to `main` and uploads `website/dist/` to GitHub Pages. diff --git a/website/src/components/Header.astro b/website/src/components/Header.astro index dd56319..ec89e07 100644 --- a/website/src/components/Header.astro +++ b/website/src/components/Header.astro @@ -1,4 +1,6 @@ --- +import WhatsNew from './WhatsNew.astro'; + const base = import.meta.env.BASE_URL; ---