Skip to content

Add verse progress checkboxes, chapter audio playback, and reading mode#32

Draft
Copilot wants to merge 2 commits into
cairofrom
copilot/add-checkbox-feature-for-ayat
Draft

Add verse progress checkboxes, chapter audio playback, and reading mode#32
Copilot wants to merge 2 commits into
cairofrom
copilot/add-checkbox-feature-for-ayat

Conversation

Copilot AI commented Mar 10, 2026

Copy link
Copy Markdown
Contributor

Three new interactive features for the Quran reader, requested for improved reading/tracking UX.

Verse Progress Checkboxes (☑️)

  • Per-verse checkbox on every ayah-sep row — manually tick to mark progress
  • Chapter-level "All Read" checkbox in the H1 bar — marks/unmarks all verses at once
  • State persisted per-surah in localStorage (quran-prog-{sura}, JSON array of read ayah numbers)
  • Auto-ticked when chapter audio finishes a verse (markAyahReadAuto)
  • Read verses get a green background on the separator row (.ayah-sep.ayah-read)

Chapter-Level Audio Play (▶️)

  • "▶ Play Chapter" button beside the chapter title — plays all per-verse Alafasy MP3s sequentially
  • Scrolls to each verse as it plays; auto-checks verse checkbox on completion
  • Toggles to "⏸ Stop" while active

Reading Mode (📚)

  • Toggle button in the H1 bar; state persisted in localStorage (quran-rm)
  • When active: non-current rows dimmed to 25% opacity; current verse (tracked at ~38% viewport height on scroll) at 100% with a gold left border; scrolled-past verses at 50%

Implementation

All logic lives in src/gendocshtml.py — three new JS IIFEs appended to VC_JS, new CSS classes added to the CSS constant, and HEADER_HTML updated to wrap <h1> in a .h1-controls flex container. All 114 surah HTML files regenerated.

Screenshots

Default view — chapter controls and per-verse checkboxes:
Default view

Verse 1 marked as read (green row):
Verse marked read

Reading Mode active — non-current verses dimmed:
Reading Mode


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: druvx13 <131332414+druvx13@users.noreply.github.com>
Copilot AI changed the title [WIP] Add checkbox feature for tracking verse progress Add verse progress checkboxes, chapter audio playback, and reading mode Mar 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants