mirror of
https://github.com/mmomm-org/obsidian-newtab.git
synced 2026-07-22 07:43:53 +00:00
Closes #41 (phase 1). Adds reusable, named text styles (font family, size %, weight, italic, color) that can be assigned per element (time, greeting, recent files, bookmarks, inline search, quote). - Styles are applied via --nt-* CSS variables on each element's container; App.scss reads them with the original values as fallbacks, so the built-in Default style reproduces the current look exactly (quote line proportions and responsive sizing preserved via a shared size scale). - Font picking uses the Local Font Access API (queryLocalFonts) with live per-option preview on desktop, falling back to free-text entry on mobile / when unavailable. - Settings gain a "Text styles" section: add/remove styles with safe-delete (assignments fall back to Default) and per-element assignment dropdowns. - normalizeStyleSettings backfills the fields for existing installs and guarantees a Default style is always present. Pure style logic lives in light, Obsidian-free modules (textStyles, resolveTextStyles, systemFonts, cssFontFamily) with unit tests. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| __mocks__ | ||
| NewTab | ||
| beautitab.test.ts | ||
| cssFontFamily.test.ts | ||
| CustomQuotesModel.test.ts | ||
| example.test.ts | ||
| getBackground.test.ts | ||
| getBookmarks.test.ts | ||
| getEasterDate.test.ts | ||
| getLeafHistory.test.ts | ||
| getQuote.test.ts | ||
| getTime.test.ts | ||
| getVaultQuotes.test.ts | ||
| greetings.test.ts | ||
| normalizeStyleSettings.test.ts | ||
| resolveLocalBackgrounds.test.ts | ||
| resolveTextStyles.test.ts | ||
| systemFonts.test.ts | ||