Commit Graph

4295 Commits

Author SHA1 Message Date
Anas Rashid
9f401fe2af Merge branch 'feature/ux-motion' into main: notes (separate from bookmarks, notes page), share and download a couplet as an image, Urdu confirm dialog, toasts, busy buttons, page transitions and motion, moderation dashboard, timelines (#74) 2026-10-09 17:32:19 +02:00
Anas Rashid
2efde6ee22 Notes apart from bookmarks, and a notes page
- A note never bookmarks: notes and bookmarks share a row, bookmarked false is a note only (db: library.bookmarked). Un-bookmarking keeps a note; clearing the note of a row that is not bookmarked removes it; ✕ on the saved page keeps a note
- A phrase with a note but no bookmark is underlined only, with the note glyph
- /notes: every note with where it is and its couplet (the noted phrase marked), editable in place with the Urdu keyboard, deleted after asking; from a note icon in the header and a نوٹس tab
- API tests for all of it

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 17:32:16 +02:00
Anas Rashid
b0c7cbccf1 Couplet tools at the couplet's left edge (on the bottom line, clear of the text) instead of centred
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 17:27:52 +02:00
Anas Rashid
f122eb8f10 Couplet tools in one row; share and download apart; Urdu keyboard in the note box
- Bookmark, note, share and download sit in one row centred under each couplet on the ✤ line (bookmark and note on one side, share and download on the other), clear of the text, the same on phones
- Share always opens the share menu (the picture where the browser can share files, else the couplet and its link; with no share menu, both are copied); a new download button saves the picture
- The note box has the Urdu keyboard and Roman typing like the search box (the keyboard moves into the box while it is open); notes can be in any language (the box follows the typed direction)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 17:27:04 +02:00
Anas Rashid
bab7ffa37f Share card: always Nastaliq (the card loads its own Nastaliq faces, so a page that has not used bold Nastaliq no longer falls back to a wider font) and one line per misra (verse shrinks to fit; only prose wraps); the title line in Nastaliq too
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 17:22:07 +02:00
Anas Rashid
86be5db6ea Moderation dashboard (count tiles that jump to each queue; queue items as cards with icon, status and age) and timelines for the moderation activity and the admin record (a coloured dot per kind of action, relative times, filter chips on the record)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 17:20:02 +02:00
Anas Rashid
8d0a6aa36b Share a couplet as an image: a share glyph under each couplet's note glyph draws a square card (frame, logo, the couplet in Nastaliq, the couplet line, the poet) and hands it to the share sheet, or downloads it
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 17:17:38 +02:00
Anas Rashid
1485781fb7 Notes on couplets and selected text, and the site's own dialog, toasts and busy buttons
- Notes: a glyph below each couplet's bookmark opens a note box (filled gold when the couplet or a phrase in it has a note; the note shows on hover). Selected text gets نوٹ in the selection menu; a highlighted phrase with a note shows the note glyph and opens its note (with "remove highlight"). API: POST /api/library/note {poemId, couplet, phrase?, note} (bookmarks if needed; empty clears the note), notes in /api/library/state; tests added
- Confirm dialog in Urdu (destructive answer in red, named for what it does) in place of the browser's English confirm(); forms use data-confirm
- Toasts for "done" messages; errors stay by the form and nudge; a submitting button shows a spinner
- Motion: page cross-fade (View Transitions) with the logo held; couplets rise in on load; bookmark and note glyphs pop; the word sidebar slides in; menus and folding sections open smoothly; all off with reduced motion

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 17:14:59 +02:00
2bdf6c9dde Merge pull request 'Home masthead: no second دیوان (the logo says it); اردو کا کلاسیکی ادب is the heading, between two couplet lines' (#73) from anas/user-access-footer-logo into main
Reviewed-on: #73
2026-10-09 15:03:24 +00:00
Anas Rashid
543acb3218 Home masthead: space above the headline, so it sits evenly between the couplet lines
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 17:01:04 +02:00
Anas Rashid
80f887f175 Home masthead: no second دیوان (the logo says it); اردو کا کلاسیکی ادب is the heading, between two couplet lines
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 16:59:35 +02:00
ce9adbe9e1 Merge pull request 'User access redesign, Libron, spacing, footer, headline, logo concepts' (#72) from anas/user-access-footer-logo into main
Reviewed-on: #72
2026-10-09 14:43:52 +00:00
Anas Rashid
5a5657803d Home logo turns on hover like the header's: pale rays one way, gold lobes the other, the disc and دیوان still
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 16:43:33 +02:00
Anas Rashid
aa96828aef Home masthead (as the share image): ترنج beside a large دیوان and اردو کا کلاسیکی ادب in a gold double frame, divided by the couplet line (half-lines and ✤); stacks on phones
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 16:42:37 +02:00
Anas Rashid
add4666364 Logo everywhere it is looked for: PNG favicon and favicon.ico beside the SVG, a web app manifest with 192/512 and maskable icons, theme-color for light and dark, a share image (og-image.png) with Open Graph and Twitter tags; the logo in the footer, on sign-in and sign-up, embedded as the static reader's favicon and at the top of the README
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 16:40:10 +02:00
Anas Rashid
d1e921a738 Logo: ترنج (the lobed shamsa) everywhere: header, home page, favicon and home-screen icon. On hover its pale rays turn one way and the gold lobes the other; the disc and دیوان stay still. The plain shamsa files are removed
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 16:38:17 +02:00
Anas Rashid
58ded69178 Logo: the shamsa everywhere; the home page's large logo is shamsa.svg and turanj.svg is removed
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 16:36:38 +02:00
Anas Rashid
ebbf39d365 Logo hover: the long rays turn clockwise and the short rays anticlockwise; the blue disc and دیوان stay still (the SVG is inline so its layers can move; no motion with reduced-motion)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 16:35:37 +02:00
Anas Rashid
a423952b26 Header: the full shamsa logo (دیوان inside the medallion) in place of the text, 52–72px with the viewport
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 16:33:22 +02:00
Anas Rashid
808150eefb Header logo: the shamsa medallion beside the Nastaliq دیوان (turns a little on hover), lined up with the word at every width; a home-screen icon (apple-touch-icon) from the same medallion
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 16:32:00 +02:00
Anas Rashid
4d6e7406c4 Logo: the shamsa (illuminated medallion). The sunburst version is the favicon and small icon, the lobed version (ترنج) sits above the home headline; both are outlined SVGs in web/public/logo, shown on /design. Rounds two and three of the concepts in docs/logo-concepts
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 16:28:56 +02:00
Anas Rashid
571eca5523 User access redesign: the users list filters by role (with counts) and shows each user in one row (avatar, role badge, permissions, last seen); one page per user for role (one click, with what each role may do), permissions (cards, chips, a poet picked by name) and account actions. Libron for Latin text. Spacing: search-box icons, page action rows and list buttons no longer touch. Footer: grouped links with icons and notes. Headline: اردو کا کلاسیکی ادب. Four logo concepts in docs/logo-concepts
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 16:22:03 +02:00
Anas Rashid
ff8d8ea3ae Local launch config: the web dev server on port 4201 (shows /design)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 16:00:17 +02:00
Anas Rashid
9cd8067e52 Merge branch 'feature/design-system' into main: role tokens, shared controls, mobile layout, arrow and editor icons, centred wrapped verses 2026-10-09 15:57:04 +02:00
Anas Rashid
1e3fd3066e Merge branch 'feature/icons-palette' into main: header icons, colour roles, palettes, display settings, Eastern/Western numerals 2026-10-09 15:57:04 +02:00
Anas Rashid
ada721fd6d Design system: colour tokens named by role (surfaces, text, link, accent, active, focus, ok, danger), each palette written once with light-dark(); radius, type and shadow scales; one base for every button, chip and tab and one for every text box; a /design reference page (dev only). Phones: the search box no longer overlaps the header icons or pushes the page sideways (its own row), دیوان clears it, poet cards keep whole names. Arrows instead of پچھلا/اگلا, an exit icon for full-screen PDFs, an icon toolbar in the editor. Long half-lines wrap centred
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 15:56:56 +02:00
Anas Rashid
3305a514ba Numerals: Eastern (۱۲۳) or Western (123) in the display settings; the server sends pages with the chosen digits (scripts and styles untouched) and script-drawn numbers follow. Settings button lines up with the other icons
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 15:34:38 +02:00
Anas Rashid
e04ed0d4af Colour palettes and a display settings panel: sepia, فیروزی، نیلگوں، سبز، گلابی (each light and dark); font, palette and light/dark/automatic in one header button
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 15:31:17 +02:00
Anas Rashid
a37ba82829 Header: font list in Naskh at a fixed height (Nastaliq spilled out in Safari); the ع is laid over the book icon as text (Safari drew the SVG text too large)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 15:29:27 +02:00
Anas Rashid
70e44f705d Header: the font is a list (نسخ / نستعلیق, each in its own font); the word book icon has ع, not a Latin A; log out lines up with the other icons
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 15:27:30 +02:00
Anas Rashid
c4bf52dd97 Icons and colour roles: header icons with tooltips and a red log out; buttons coloured by what they do; محفوظ شدہ and پسندیدہ لکھاری
- Icon component (Lucide shapes, ISC), currentColor, decorative (the control keeps its words in aria-label/title).
- Colour roles: --action (primary, filled), --ok (approve, publish), --danger (log out, delete, reject); .btn variants
  and .icon-btn; light and dark.
- Header: admin, moderation, saved, word book, account/sign in, font, theme as icons; log out in red.
- Review: save/send filled, approve/publish green, return plain, reject red, with icons. Account: save, log out, password,
  delete. Reading pages: edit, history, arrange, tag. E-books: add, download, covers; the reader's controls as icons.
- نشانات is now محفوظ شدہ; favourite writers have their own page, پسندیدہ لکھاری (/writers).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 15:23:06 +02:00
3f6f7e503a Merge pull request 'E-books: a section for every poet (tabs, covers), right-to-left PDF reader, page bookmarks, book details' (#70) from feature/ebooks-section into main
Reviewed-on: #70
2026-10-09 13:17:31 +00:00
Anas Rashid
0a507d1fdd E-books as a section of every poet, with tabs and covers; a right-to-left PDF reader; page bookmarks; book details
- ای بکس card beside the poet's books and genres on every poet page; /<poet>/ebooks with tabs
  پی ڈی ایف (PDF) / ای پب (ePUB) / یونیکوڈ متن (Unicode) (+ آرکائیو when present) and a grid of covers.
- Covers: made in the moderator's browser from a PDF's first page (pdf.js) or an EPUB's cover (epub.js); archive.org's
  thumbnail; a styled card for text; or the moderator's own image. سرورق بنائیں on existing books.
- PDF reader (pdf.js) reading right to left: next page to the left (button, ← key, left half), facing pages with the
  cover alone then 2|3; left to right for LTR books; full screen (F); opens in a new tab; byte-range requests.
- Page bookmarks in the reader's library (kind 'page'), listed in نشانات and opening at that page.
- Details: writer as printed, co-authors (linked to poets on the site, who list the book too; new names kept as text),
  language, reading direction (RTL/LTR), extra tags (on tag pages), source, copyright, note; in upload and review.
- Word lookup and selection menu only on reading text, not menus, buttons or tabs.
- Schema: the library kind check lists 'page' where it is defined (it was re-added without it).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 15:16:06 +02:00
cdfa5f9020 Merge pull request 'Fix publishing: URL is not a constructor' (#69) from fix/url-shadowing into main
Reviewed-on: #69
2026-10-09 12:59:04 +00:00
Anas Rashid
3fffbcc514 Fix publishing: a constant named URL hid the global URL (default divan-data folder), so every publish failed with 'URL is not a constructor'
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 14:58:56 +02:00
b2746bfd08 Merge pull request 'Fix: e-books in the moderation queue and log had no title or link' (#68) from fix/ebook-queue-titles into main 2026-10-09 12:57:27 +00:00
Anas Rashid
4cf3c6cb8a E-books in the moderation queue and activity log: their title and link (were blank); rows say what kind of change they are
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 14:57:17 +02:00
6f96548f7a Merge pull request 'E-books: upload with its own permission, review, and viewers for PDF, EPUB, text and archive.org' (#67) from feature/ebooks into main
Reviewed-on: #67
2026-10-09 12:54:27 +00:00
Anas Rashid
09336ead0e E-books: a poet's books as PDF, EPUB, text (DOCX made text) or archive.org items, uploaded with their own permission and approved like any change
- ebooks permission (create, per poet); the upload button only for L2/L1 moderators with it (and admins).
- Files kept by SHA-256 in DIVAN_FILES_DIR (ab/cd/<sha>.<ext>; one copy per file), up to 100 MB, kind read from
  the bytes; details in PostgreSQL indexed by poet and trigram (title, text of text books); search shows e-books.
- An upload is a revision (entity 'ebook') through L2 -> L1 -> admin; unpublished files only for moderators;
  approved details committed to divan-data (divan/<poet>/ebooks/<id>.txt).
- ای بکس on the poet page; /ebook/<id>: PDF in the browser viewer, EPUB with epub.js, text, archive.org embed.
- README: e-books and the file store (attach growable block storage or an S3 bucket via rclone).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 14:52:23 +02:00
67f0cdbd7f Merge pull request 'Footer tagline: made by a Pakistani, for Pakistan (with the flag)' (#66) from feature/footer-pakistan into main
Reviewed-on: #66
2026-10-09 12:45:09 +00:00
Anas Rashid
bafabb3d59 Footer tagline: ایک پاکستانی کی طرف سے، پاکستان کے لیے, with Pakistan's flag (SVG)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 14:44:29 +02:00
c2293f9794 Merge pull request 'Tags: typed tags on poets, books, works and couplets; tag pages; tag: in search' (#65) from feature/tags into main
Reviewed-on: #65
2026-10-09 12:43:56 +00:00
Anas Rashid
542c4672c9 Tags (#52): typed tags on poets, books/chapters, works and couplets; tag pages; tag: in search
- Types موضوع، صنف، بحر، شخصیت، مقام، دور and free ٹیگ; a work's tag may be on one couplet (شعر n, from 1).
- Tagging is a revision (tags-category / tags-work) through the L2 -> L1 -> admin pipeline with the new 'tags'
  permission; publishing writes divan-data/divan/<url>.tags, commits it and updates the site; the import reloads them.
- Pages show tag chips (couplet tags under the couplet); /tag/<type>/<name> lists what carries a tag; /tags lists all.
- Search: tag:عشق / ٹیگ:"حب الوطنی" filters works (tagged work, couplet or book), matching tags shown as a group.
- Tag editor rows with suggestions, Urdu keyboard and Roman typing.
- Tests run one file at a time (they share Ghalib's ghazals); the library test picks a ghazal with three couplets.
- Mod buttons sit in a div (a form closes a p, which broke the row).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 14:42:19 +02:00
1494c28776 Merge pull request 'Home sections editor: Urdu keyboard and Roman typing in its boxes' (#64) from feature/site-editor-keyboard into main
Reviewed-on: #64
2026-10-09 12:30:21 +00:00
Anas Rashid
8429ba1ddb Home sections editor: Urdu keyboard and Roman typing inside the name and section boxes, as in search
The keyboard finds its box again by id when a page redraws it (Base.astro), so it keeps typing into the
name box after a poet is added.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 14:30:06 +02:00
0357a74778 Merge pull request 'Home page sections: a site permission to rename, add and reorder sections and sort their poets' (#63) from feature/site-sections into main
Reviewed-on: #63
2026-10-09 12:25:36 +00:00
8dd8cdf34b Merge pull request 'About page: دیوان کے بارے میں' (#62) from feature/about-page into main
Reviewed-on: #62
2026-10-09 12:25:18 +00:00
Anas Rashid
771ba54863 Home page sections (site permission): rename, add, remove and reorder sections; chosen poets; sort by hand, alphabetically or by timeline
- home_sections: chosen-poets sections (مقبول شعرا) and century sections (every poet born in that Hijri century,
  so new poets appear on their own); first use seeds the layout the home page had.
- New content type 'site' for grants (scope all, action edit); admins always. Changes apply at once and are audited.
- /mod/site editor (tab سرورق): names, ↑ ↓, remove, sort, add/remove/order poets with the Urdu name box.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 14:24:43 +02:00
Anas Rashid
67525a0964 About page (/about): Ganjoor as the inspiration, Wikisource as the first source, open source, moderators and Divan's own copy, new writers, plans; linked from the footer
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 14:20:16 +02:00
d4d8c92711 Merge pull request 'Arranging content: reorder works, sections and books (own permission)' (#61) from feature/arrange-content into main
Reviewed-on: #61
2026-10-09 12:05:54 +00:00