- Backend: add parent_category param (matches '历史-*' sub-categories),
sort=category mode (ORDER BY category ASC), return category_tree with
parent→sub→count hierarchy
- Frontend: replace flat 63-tag list with collapsible parent tags showing
book counts, click parent to expand sub-category pills with fade-in
animation, click sub to filter to exact category
- Add '分类排序' toggle button: when active, books are grouped by
category with colored section headers showing category name + count
- Clicking same parent again collapses it; '全部' resets everything
- Mobile responsive: smaller tag sizes, reduced indent on narrow screens
switchTab() now checks if the thoughts detail page or book detail modal
is open and closes them before switching to the target tab. Previously,
when on the thoughts page, clicking any nav tab (charts, ranking, etc.)
would silently fail because mainView was still hidden.
- Search box: real-time filter across highlights, book reviews, and
thoughts content (mark_text, content, abstract fields)
- Sort dropdown: 3 modes - newest first, oldest first, by chapter order
(chapter_uid + range position)
- Chapter sort mode groups highlights by chapter with titles
- Time sort mode flattens highlights with chapter labels
- Empty state shows search keyword when no results match
- Mobile responsive: toolbar stacks vertically on narrow screens
The hardcoded 'weread://reading?bId=...' scheme only works on mobile
devices with the WeRead app installed. On desktop browsers, clicking
the button did nothing. Now uses data.deep_link from the API response
(https://weread.qq.com/...) with fallback logic: try weread:// scheme
via hidden iframe for 1.5s, then fall back to opening the web URL.
1. Fix hdCover() to also replace s_ prefix (search results use s_ not t6_)
2. Add persistent search bar below navbar, switches to discover tab on search
3. Shelf search now supports book title and author search (new keyword param)
4. Add category tag pills above book grid, click to filter by category
5. Update /api/shelf backend: keyword param for title/author, category for exact match
6. Mobile responsive styles for search bar and category tags
- Add theme toggle button in navbar with sun/moon icons
- Define [data-theme=dark] CSS variables (warm dark palette)
- Persist theme preference in localStorage
- Follow system prefers-color-scheme on first visit
- Anti-flash inline script sets theme before render
- ECharts charts re-render with theme-aware colors on toggle
- Fix reading ranking covers: aspect-ratio 3/4 instead of fixed height
- Fix discover covers: aspect-ratio 3/4 for proper portrait display
- Replace purple hero gradient with warm brown/amber matching accent
- All hardcoded colors replaced with CSS variables
- Smooth 0.3s transitions on all theme-dependent elements
- Update footer text from SQLite to MySQL