pages
look
A document as the app's pictures of its pages: paged and zoomed, with its PDF.
Drawn
Quotation Q-04183 pages
Drawn by the app's server; zoom and paging send nothing.
The sample
fn document() -> Block {
let page = |n: u32, alt: &str| blocks::PageImage {
src: "media/page.svg".into(),
alt: format!("{alt}, page {n}"),
width: 620,
height: 877,
};
b!(Pages(
Pages::new(vec![page(1, "Priced items"), page(2, "Terms"), page(3, "Acceptance")])
.id("quote")
.title("Quotation Q-0418")
.note("Drawn by the app's server; zoom and paging send nothing.")
))
}{
"blocks": [
{
"fallback": {
"title": "Quotation Q-0418"
},
"id": "quote",
"note": "Drawn by the app's server; zoom and paging send nothing.",
"pages": [
{
"alt": "Priced items, page 1",
"height": 877,
"src": "media/page.svg",
"width": 620
},
{
"alt": "Terms, page 2",
"height": 877,
"src": "media/page.svg",
"width": 620
},
{
"alt": "Acceptance, page 3",
"height": 877,
"src": "media/page.svg",
"width": 620
}
],
"title": "Quotation Q-0418",
"type": "pages"
}
],
"fallback": {
"title": "screen"
},
"id": "pages",
"type": "screen"
}Its fallback
What a renderer without
pages draws: a row from the fallback the block carries.Quotation Q-0418
Style hooks
.b-pagesthe block
[data-block=pages]every block of the kind
[data-id=quote]this one block
Every page here is a blocks
Screen, written by site::page: no hand-written HTML. Source: https://github.com/jirathip-dev/blocks