From 792b68979b9d8ad4d22b5b3cfb30b1996e9d3f3c Mon Sep 17 00:00:00 2001 From: Anas Rashid Date: Fri, 9 Oct 2026 17:36:18 +0200 Subject: [PATCH] Reading mode, and pages the browser's reader understands MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Reading mode (the book button in a poem's, book's or poet's action row): the text, the breadcrumbs, the poet's name and the logo; no search, icons, buttons, couplet tools, tags or footer; larger verse. Kept across pages until the ✕ in the header; switched on before paint (no flash); only on readable pages, so search and tools are unaffected - For Safari Reader, Firefox Reader View and Chrome's reading mode: a poem is one
(title, poet, text), with and schema.org CreativeWork data - Printing shows the text and its source only Co-Authored-By: Claude Opus 5.5 --- web/src/layouts/Base.astro | 19 +++++++++++++++++-- web/src/pages/[...path].astro | 17 ++++++++++------- web/src/styles/global.css | 24 ++++++++++++++++++++++++ 3 files changed, 51 insertions(+), 9 deletions(-) diff --git a/web/src/layouts/Base.astro b/web/src/layouts/Base.astro index 8732691f..cfd484b9 100644 --- a/web/src/layouts/Base.astro +++ b/web/src/layouts/Base.astro @@ -5,8 +5,9 @@ import '@fontsource/noto-naskh-arabic/700.css'; import '@fontsource/noto-nastaliq-urdu/400.css'; import '@fontsource/noto-nastaliq-urdu/700.css'; import '../styles/global.css'; -interface Props { title?: string; description?: string; q?: string } -const { title, description = 'اردو کا کلاسیکی ادب', q = '' } = Astro.props; +interface Props { title?: string; description?: string; q?: string; author?: string; jsonld?: object } +// author and jsonld describe a work for search engines and the browser's own reader view +const { title, description = 'اردو کا کلاسیکی ادب', q = '', author, jsonld } = Astro.props; const fullTitle = title ? `${title} · دیوان` : 'دیوان · اردو کا کلاسیکی ادب'; import Icon from '../components/Icon.astro'; import logo from '../../public/logo/turanj.svg?raw'; // inline, so the page can turn its rays @@ -36,6 +37,8 @@ import logo from '../../public/logo/turanj.svg?raw'; // inline, so the page can + {author && } + {jsonld && @@ -65,6 +69,7 @@ import logo from '../../public/logo/turanj.svg?raw'; // inline, so the page can +