Improvements v0.0.4 #3
Loading…
Reference in a new issue
No description provided.
Delete branch "improvements-v0.0.4"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Adds client-only article favorites with a
/favoritespage that reuses the same digest-card layout as the main daily edition.What Changed
/favoritesas a server-rendered shell populated fromlocalStorage.tilens_favorites, capped at 500 items.Adds a /favorites page that mirrors the daily edition's two-column tl-digest-card grid without touching the read-only SQLite web process. Highlights: - Client-only favorites list backed by localStorage['tilens_favorites'], capped at 500 entries FIFO by favoritedAt. No server state, no JSON API surface; the SQLite mode=ro/query_only=ON contract holds. - New /favorites shell page renders the digest-grid wrapper, the card template, and a confirm-remove themed <dialog> modal centered with margin:auto to override Tailwind v4 preflight. - Favorite toggle button (+35px star on cards, 18px in system bar) wired into article_card.html and article_row.html via partials/favorite_button.html. Same StarIcon SVG used by microbox. - Topic tag parity: _topic_classes() now emits 'tl-tag tl-tag-{variant}' and a topicPalette() mirror in favorites.js so rendered cards use identical color/font/padding/height across both pages. - GitHub cards preserve the org/repo: prefix on /favorites via a JS mirror of _github_repo_name that parses github.com/<owner>/<repo>. - Cover + title links open in a new tab with rel=noopener noreferrer and the favorites toggle stays z-index:3 above the full-card cover link so clicks aren't swallowed. - /favorites trigger sits as a sibling of Topics and Calendar in the top filter rail (hidden on meta pages). Docs: - RULES.md: cards/page layouts are local-only source of truth; UI motion via fade/reveal transition only. - architecture.md: favorites are client-side; web process still read-only. - operations.md: build:assets now also copies favorites.js into dist. Tests: 477 passed. Regression coverage for the card template, palette mapping, GitHub repo parser, mirror structure (target/rel/no-rounded) and the headline 35px card star + 18px system-bar star.