{{define "reader.html"}} {{.Title}} {{if .CustomCSS}}{{end}} {{if .NextPage}} {{end}} {{/* When the reader was reached from /images/{id}/pages, anchor the back link, the dialog form, and the page-nav extras at the pages grid so the user lands where they came from. The from=pages flag persists across page-flip clicks via the per-link query tail. The #page-N fragment carries the current page so the pages grid can focus + scroll to that cell on load. */}} {{$detailHref := printf "/images/%d%s" .Image.ID .BackQS}}{{if .BackToPages}}{{$detailHref = printf "/images/%d/pages%s#page-%d" .Image.ID .BackQS .Page}}{{end}} {{$pagesHref := printf "/images/%d/pages%s#page-%d" .Image.ID .BackQS .Page}}
Page {{.Page}} {{if gt .Page 1}} {{else}} {{end}} {{if lt .Page .PageCount}} {{else}} {{end}}
{{template "partials/image_lightbox.html" .}}
{{if .BackToPages}}{{end}}

Jump to page (1 - {{.PageCount}})

{{end}}