Commit Graph

121 Commits

Author SHA1 Message Date
Admin
2546a5774e fix: increase settings panel bottom offset to clear full player height
Some checks failed
CI / Lint (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Build (push) Has been cancelled
2026-03-02 12:52:16 +05:00
Admin
00a6d2ce43 fix: proper SVG play/pause icons, preserve progress on resume, fix badge row alignment
Some checks failed
CI / Lint (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Build (push) Has been cancelled
2026-03-02 12:49:36 +05:00
Admin
98fd0de7bc fix: remove stale old-template fragment from chapterTmpl in ui.go
Some checks failed
CI / Lint (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Build (push) Has been cancelled
2026-03-02 12:41:02 +05:00
Admin
1128e47f6b feat: redesign ranking page with list layout, sticky filter bar, top genres fix
Some checks failed
CI / Lint (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Build (push) Has been cancelled
2026-03-02 12:25:01 +05:00
Admin
1caa1f7ab5 feat: homepage hero card, progress bars, unread badges, stats, sort, genre chips, recently added
Some checks failed
CI / Lint (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Build (push) Has been cancelled
2026-03-02 11:31:31 +05:00
Admin
d9c69a089c fix: prevent home page book cards from overflowing viewport on mobile
Some checks failed
CI / Lint (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Build (push) Has been cancelled
2026-03-02 11:24:44 +05:00
Admin
42d0d53b52 fix: chapter list toggle no longer overwrites title span with arrow
Some checks failed
CI / Lint (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Build (push) Has been cancelled
2026-03-02 11:17:58 +05:00
Admin
5182f31518 fix: show TTS gen duration in idle badge (24s / 1m 4s), drop uppercase
Some checks failed
CI / Lint (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Build (push) Has been cancelled
2026-03-02 11:17:15 +05:00
Admin
7ed5eb0d69 fix: remove duplicate chapter title h1, drop nav arrow, enlarge hamburger
Some checks failed
CI / Lint (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Build (push) Has been cancelled
2026-03-02 11:15:21 +05:00
Admin
0503f69537 Fix settings panel height on mobile using fixed positioning
Some checks failed
CI / Lint (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Build (push) Has been cancelled
2026-03-02 11:12:25 +05:00
Admin
8e1519234a Stretch settings panel to near full height on mobile
Some checks failed
CI / Lint (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Build (push) Has been cancelled
2026-03-02 11:08:26 +05:00
Admin
1353e2f6e6 Increase voice grid height on mobile
Some checks failed
CI / Lint (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Build (push) Has been cancelled
2026-03-02 11:00:17 +05:00
Admin
954200af3c Show live % progress in playing badge, generation time in idle badge
Some checks failed
CI / Lint (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Build (push) Has been cancelled
2026-03-02 10:55:53 +05:00
Admin
42dc38d224 Fix seek bar: tall hit area, correct rail-based rect, prevent scroll during touch drag
Some checks failed
CI / Lint (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Build (push) Has been cancelled
2026-03-02 10:53:57 +05:00
Admin
63aae93ee3 Play pre-generated next chapter audio directly without page navigation to avoid autoplay block on locked screen
Some checks failed
CI / Lint (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Build (push) Has been cancelled
2026-03-02 10:51:50 +05:00
Admin
c3e5a57dab Stretch settings panel full width on small screens
Some checks failed
CI / Lint (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Build (push) Has been cancelled
2026-03-02 10:42:38 +05:00
Admin
7589866965 Fetch voices from Kokoro API at runtime; replace select with styled voice card grid
Some checks failed
CI / Lint (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Build (push) Has been cancelled
2026-03-02 10:18:43 +05:00
Admin
2107b6e6b8 Replace checkbox inputs with toggle switches in reader settings panel
Some checks failed
CI / Lint (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Build (push) Has been cancelled
2026-03-02 10:11:31 +05:00
Admin
3b905e54fe Add auto-scroll toggle to reader settings, persisted in localStorage
Some checks failed
CI / Lint (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Build (push) Has been cancelled
2026-03-02 10:10:41 +05:00
Admin
427e952253 Pause TTS auto-scroll on user interaction, resume after 3s; add book cover artwork to Media Session
Some checks failed
CI / Lint (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Build (push) Has been cancelled
2026-03-02 10:06:59 +05:00
Admin
090d155c19 Custom seek bar, bigger nav buttons, Media Session API for background playback
Some checks failed
CI / Lint (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Build (push) Has been cancelled
2026-03-02 09:55:01 +05:00
Admin
5cfb411530 Unify player into single compact row, remove orphaned circle button
Some checks failed
CI / Lint (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Build (push) Has been cancelled
2026-03-02 09:38:54 +05:00
Admin
e4ab8664e9 Fix listener stacking across HTMX swaps and wire auto-next chapter playback
Some checks failed
CI / Lint (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Build (push) Has been cancelled
2026-03-02 09:35:39 +05:00
Admin
decf22f258 Replace custom audio player with native HTML audio element and compact layout
Some checks failed
CI / Lint (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Build (push) Has been cancelled
2026-03-02 09:24:40 +05:00
Admin
5db21a821a Simplify chapter page audio player UX
Some checks failed
CI / Lint (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Build (push) Has been cancelled
- Remove play button and gear icon from chapter nav bar
- Show bottom mini-player bar always (not slide-up on play)
- Remove duplicate collapsed-bar seek track; keep only expanded panel scrub bar
- Move gear/settings button into the bottom mini-player bar
- Move settings panel into mini-player aside, opening upward
- Clean up JS: remove navBtn/navIcon refs, showPlayer/hidePlayer, playerSeekTrack refs
2026-03-01 23:56:36 +05:00
Admin
dfb3f61812 Fix book page returning empty body due to malformed onclick attribute
Some checks failed
CI / Lint (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Build (push) Has been cancelled
html/template's context-aware parser was treating the backslash-escaped
quote in the inline onclick regex literal as an HTML attribute terminator,
causing template execution to produce an empty/broken output.

Move the summary paragraph-splitting logic into a named window.openSummary
function in the script block, and call it via a clean onclick=openSummary(this)
attribute with no inline regex literals.
2026-03-01 23:45:08 +05:00
Admin
db59d55f42 Fix summary overlay scrolling and paragraph formatting on mobile
Some checks failed
CI / Lint (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Build (push) Has been cancelled
- Make overlay scroll within the viewport instead of being clipped (overflow-y-auto on backdrop, items-start alignment)
- Split summary text into paragraphs in the zoom overlay (newline-split with sentence-boundary fallback)
- Add Summary heading in overlay for context
- Remove old merge-poller JS; simplify generateAudio to use data.url directly (Kokoro backend rewrite cleanup)
2026-03-01 23:37:05 +05:00
Admin
13a3eacca6 Use full page navigation for double-tap chapter switching
Some checks failed
CI / Lint (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Build (push) Has been cancelled
2026-03-01 23:12:55 +05:00
Admin
398a4703eb Add double-tap left/right navigation on chapter content page
Some checks failed
CI / Lint (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Build (push) Has been cancelled
2026-03-01 23:06:49 +05:00
Admin
e4624d0a0c Refactor chapter page: semantic HTML, accessibility improvements, Tailwind hover classes, and book page summary zoom overlay 2026-03-01 23:03:18 +05:00
Admin
5f4b1d96f6 Fix ranking filter to search across all pages using full JSON dataset
Some checks failed
CI / Lint (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Build (push) Has been cancelled
Embed the complete ranking JSON into the page and replace the DOM-only
filter with a client-side search over ALL_ITEMS. When a filter is active
the grid is re-rendered from the full dataset; clearing filters restores
the server-paginated view. Also adds summary zoom overlay on the book page.
2026-03-01 22:59:03 +05:00
Admin
69582ea5a7 Add cover zoom overlay to rankings page
Some checks failed
CI / Lint (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Build (push) Has been cancelled
2026-03-01 22:47:31 +05:00
Admin
33b0ee4771 Add chapter count badges, cover zoom, latest chapter button, and dismiss continue-reading cards
Some checks failed
CI / Lint (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Build (push) Has been cancelled
- Home page book cards show downloaded chapter count (amber badge) via new CountChapters method
- Book page cover image is clickable to zoom into a fullscreen overlay; click anywhere to dismiss
- Book page shows a 'Latest Chapter' button for unstarted books linking to the last downloaded chapter
- Continue-reading cards on home page have a dismiss (×) button that removes progress from localStorage and slides the card out to the left
2026-03-01 22:45:18 +05:00
Admin
05a1cc04c0 Move filter bar below continue-reading section on home page
Some checks failed
CI / Lint (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Build (push) Has been cancelled
2026-03-01 22:29:32 +05:00
Admin
f03ff39397 Replace ranking Scrape button with two-click card interaction
Some checks failed
CI / Lint (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Build (push) Has been cancelled
- Remove Scrape form/button and Source text link from non-local ranking cards
- First click on a card highlights it amber and shows 'Click again to scrape' hint
- Second click POSTs to /ui/scrape/book and replaces card with polling status badge
- Pending state auto-cancels after 3 s or when clicking outside
- Source icon (external link SVG) retained but dimmed; stops click propagation
2026-03-01 22:28:47 +05:00
Admin
fb5d22eb8d Move scrape form to dedicated /scrape page, add '+ Add' link in home header
Some checks failed
CI / Lint (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Build (push) Has been cancelled
- Extract scrape form and autocomplete JS from homeTmpl into new scrapeTmpl
- Add handleScrape GET handler serving /scrape with ranking autocomplete
- Register GET /scrape route in server.go
- Replace inline scrape form on home page with '+ Add' flat button in header
- handleHome no longer loads ranking items (only needed on /scrape)
2026-03-01 22:26:50 +05:00
Admin
7397085ecb Fix ranking pagination: sliding ±2 window around current page
Some checks failed
CI / Lint (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Build (push) Has been cancelled
rankingPageNums now takes a current page parameter and always renders
first 2, last 2, and current±2 — so navigating to page 3 shows
1 2 3 4 5 … 80 81 instead of only the fixed quarter-mark anchors.
2026-03-01 22:22:42 +05:00
Admin
939562ba67 Add facet filtering to ranking page: genre, status, in-library (AND logic)
Some checks failed
CI / Lint (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Build (push) Has been cancelled
- Server collects distinct genres and statuses from all cached items and
  passes them as AllGenres/AllStatuses slices to the template
- Facet chips rendered as pill toggles below the text search bar
- Cards gain data-status, data-genres (pipe-delimited), data-local attributes
- JS filter engine: AND between facets, OR within status facet (a book has
  one status), AND within genre facet (all selected genres must be present)
- Pagination row hidden while any filter is active; restored on clear
- 'Clear filters' button appears when any filter is active
- sortedKeys helper added to produce stable sorted facet chip order
2026-03-01 22:20:05 +05:00
Admin
dcde92d118 Flatten all UI buttons: remove background fills, use text-only styling
Some checks failed
CI / Lint (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Build (push) Has been cancelled
All filled/pill buttons across home, ranking, book detail, and chapter
pages now use transparent backgrounds with colored text only, consistent
with the chapter reader nav bar style:
- Home: Browse Rankings (amber text), Scrape (amber text)
- Ranking: View Markdown, page numbers, fetch buttons, Scrape/Source on cards
- Book detail: Source, Refresh, Resume, chapter pagination
- Chapter: bottom Prev/Next nav, article-end nav links
2026-03-01 22:15:58 +05:00
Admin
c8c5264f27 Chapter nav: hide Prev/Next when at boundary, remove date from header
Some checks failed
CI / Lint (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Build (push) Has been cancelled
2026-03-01 22:08:30 +05:00
Admin
42ed77b7b8 Flatten chapter reader nav buttons: remove background fill from Prev/Next/Listen
Some checks failed
CI / Lint (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Build (push) Has been cancelled
2026-03-01 22:07:40 +05:00
Admin
008a89340d Fix ranking card split: replace nested <a> Source link with button in local book cards
Some checks failed
CI / Lint (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Build (push) Has been cancelled
An <a> element nested inside the card's outer <a> is invalid HTML — browsers
auto-close the outer anchor before the inner one, causing the card to be split
across two grid cells visually. Replace with a <button> that calls window.open()
with event.preventDefault/stopPropagation to avoid interfering with card navigation.
2026-03-01 22:05:53 +05:00
Admin
7e4bb87da0 Fix chapter reader nav bar: use hamburger icon for back-to-book, show chapter date below title
Some checks failed
CI / Lint (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Build (push) Has been cancelled
- Replace bare ← back-to-book link with ☰ (hamburger) icon to eliminate
  the visual double-arrow confusion with the ← Prev chapter button
- Export SplitChapterTitle in writer package and call it in handleChapter
  to split the raw heading into (title, date) — fixes concatenated title+date bug
- Display ChapterDate as a smaller muted line below the chapter title
  in the center nav button
- Bump nav bar height from h-12 to h-14 to accommodate two-line center button
2026-03-01 22:03:47 +05:00
Admin
ca33f8c3cf fix: correct ScrapeRanking DOM selectors for real novelfire.net HTML
Some checks failed
CI / Lint (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Build (push) Has been cancelled
The previous selectors were based on a hypothetical structure that does not
match the actual site. The real novelfire.net popular listing uses:

  <li class="novel-item">          (not <div>)
    <a href="/book/slug" title="Title">
      <figure class="novel-cover"><img data-src="/path.jpg"></figure>
      <h4 class="novel-title text2row">Title</h4>
    </a>
  </li>

And pagination uses <a rel="next"> (not <a class="next">).

Changes:
- ScrapeRanking: use li.novel-item, h4.novel-title, figure.novel-cover,
  img[data-src]; strip base64 placeholder covers
- hasNextPageLink(): new helper walking all <a> nodes for rel="next"
- Import golang.org/x/net/html for Node.Attr access
- Test fixtures rewritten to match real structure (li/h4/rel=next)
- Status and genres removed from ranking items (not present on listing page)

Verified end-to-end: ranking.json written with 24 items on first fetch
2026-03-01 21:54:11 +05:00
Admin
9837c89075 fix: add server-side pagination to ranking page (?page=N)
Some checks failed
CI / Lint (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Build (push) Has been cancelled
Previously all cached ranking items were dumped into one page and the
page buttons only triggered refetches from novelfire — not navigation.

- handleRanking now reads ?page=N query param (default 1)
- Items sliced server-side at 20 per page (rankingPageSize constant)
- Template receives DisplayNums/CurrentPage/TotalPages for browse nav
- Display pagination bar renders GET /ranking?page=N HTMX links with
  the active page highlighted in amber; hidden when only 1 page
- Fetch section collapsed into a <details> to reduce visual noise
- FetchNums replaces old PageNums field name in template data
2026-03-01 21:47:39 +05:00
Admin
0aba23de1f feat: switch ranking storage from markdown to JSON, fix round-trip test
Some checks failed
CI / Lint (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Build (push) Has been cancelled
- WriteRanking now writes ranking.json via json.MarshalIndent (replaces markdown table)
- ReadRankingItems uses json.Unmarshal (no fragile pipe-split parsing)
- ReadRanking() (raw string reader) removed; handleRankingView uses ReadRankingItems
- handleRankingView renders a <pre> JSON block instead of goldmark markdown
- RankingItem gains json: struct tags; slug and genres now survive the round-trip exactly
- TestWriteRanking_RoundTrip updated: checks ranking.json, verifies Slug/Genres/SourceURL
- Add RankingPageCacher interface and per-page HTML disk cache support in scraper
2026-03-01 21:44:39 +05:00
Admin
0521ef11ee fix: show source URL in search input on ranking autocomplete selection
Some checks failed
CI / Lint (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Build (push) Has been cancelled
- selectItem() now sets the visible input to source_url (not the title), so the user can see and copy the link before scraping
- Keyboard navigation (ArrowUp/Down) also previews the URL in the input
- Added URL hint line inside each dropdown item showing the full source_url
- Genres included in search haystack (was missing before)
- Deduplicated filter logic into filterRanking() helper
- Raised max results from 8 to 10
2026-03-01 21:40:18 +05:00
Admin
9cf94576d8 feat: ranking page pagination, popular URL, and per-page HTML disk cache
Some checks failed
CI / Lint (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Build (push) Has been cancelled
- Switch ScrapeRanking to novelfire.net/genre-all/sort-popular URL and updated DOM selectors (div.novel-item, h3.novel-title, div.genres)
- Replace 5 hardcoded refresh buttons with dynamic 100-page paginator (smart ellipsis via rankingPageNums)
- Add RankingPageCacher interface and writer methods to cache raw HTML per page under static/books/_ranking_cache/page-N.html
- ScrapeRanking serves from disk cache on hit and writes to cache on miss, skipping Browserless round-trip
- Thread writer as PageCacher through novelfire.New and main.go
- Add TestScrapeRanking_CacheHit and TestScrapeRanking_CacheMiss tests
2026-03-01 21:32:50 +05:00
Admin
73869f01fa Ranking page: fix card wrapping, add filter bar, replace refresh buttons with pagination
Some checks failed
CI / Lint (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Build (push) Has been cancelled
- Cards now use flex layout with break-words/min-w-0 so long titles wrap
  instead of stretching the column; grid uses gap-3 for tighter density
- Added filter bar (title/author/genre/status) with live result count,
  consistent with the home page filter
- Replaced four big refresh buttons with compact pagination buttons
  (p.1, p.1-3, p.1-5, p.1-10, All) labelled with page ranges; source
  link points to novelfire.net/genre-all/sort-popular/status-all/all-novel
- Template data field renamed from RefreshPages to Pages; pagination
  entries updated to reflect 100 novels per page
2026-03-01 21:06:18 +05:00
Admin
26a46a4d31 Add chunked TTS audio generation and ranking search autocomplete on home page
Some checks failed
CI / Lint (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Build (push) Has been cancelled
- Split chapter TTS into up to 10 paragraph-aligned parts; part 0 is
  generated synchronously so playback starts immediately, parts 1-9 and
  the final merge happen in a background goroutine
- New routes: GET /ui/audio/{slug}/{n}/status (merge poll) and
  GET /ui/audio-file/{slug}/{n}/part/{p} (serve individual part)
- JS polls status every 3 s and seamlessly swaps audio.src to the merged
  file once ready, preserving playback position proportionally
- Home page scrape form replaced with a ranking-search autocomplete:
  type a title/author to see matching ranking items (cover + metadata),
  click or keyboard-select to inject the source URL, or paste a raw URL
  directly; ranking data is embedded as JSON at page render time
2026-03-01 21:03:18 +05:00