From 5689157830881d19f5b5583aaa2bb1ddd3f8864e Mon Sep 17 00:00:00 2001 From: Anas Rashid Date: Sun, 4 Oct 2026 23:53:00 +0200 Subject: [PATCH] Static reader: single-file browser reader over the diwan-data static API Co-Authored-By: Claude Opus 5.5 --- README.md | 11 ++++ reader/index.html | 151 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 162 insertions(+) create mode 100644 reader/index.html diff --git a/README.md b/README.md index c42b591a..837d35b1 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,17 @@ Diwan is a standalone project built on a fork of [GanjoorService](https://github - **Links:** `ganjoor.net` links to the site's own pages are now relative. Links to Diwan's other services (blog, audio, etc.) are left as they are. - **Locale:** `ur-PK`. +## Static reader (no server) + +`reader/index.html` is a single-file reader: poets, intros, books and poems, with Nastaliq/Naskh switching. It reads the [diwan-data](https://github.com/anas-rashid/diwan-data) static API directly in the browser, so it needs no API, database or build step. + +```sh +# against the public CDN: just open reader/index.html in a browser, or host it anywhere (e.g. GitHub Pages) +# against a local diwan-data checkout: +mkdir -p www && ln -s "$PWD/reader/index.html" www/ && ln -s /path/to/diwan-data www/data +python3 -m http.server 5300 -d www # open http://localhost:5300/?data=data/ +``` + ## Deploy (Ubuntu/Debian x86-64, e.g. Vultr) ```sh diff --git a/reader/index.html b/reader/index.html new file mode 100644 index 00000000..11df2ae9 --- /dev/null +++ b/reader/index.html @@ -0,0 +1,151 @@ + + + + + +دیوان · قاری + + + + + + + + +
+

دیوان

+ + +
+

لوڈ ہو رہا ہے…

+ + +