{{define "detail.html"}}
{{template "layout_head" .}}
{{/* Detail sidebar: image tags grouped by category + related tags */}}
{{template "partials/detail_sidebar.html" .}}
{{template "layout_mid" .}}
{{/* Search bar: mirrors the gallery's #gallery-header so the input stays
visually in place when switching between gallery and detail. Plain
GET submit to / - no HTMX, since detail has no #gallery-grid target.
The tag-suggest dropdown uses the same endpoint and ids gallery does
so applySearchSuggest and initSuggestDismiss work unchanged. */}}
{{end}}
{{/* Lookup / source-fetch outcomes and errors sit with the action flash so
every job result reads from one spot; the tag-editor lookup's pending
pill renders in #fetch-pending below the add-tag bar instead. */}}
{{if .MonloaderPaired}}{{end}}
{{/* Top bar: back link | prev/next + download/fav (mirrors body column layout) */}}
{{if .RefURL}}
‹ Previous image
{{else if or .BackQuery .BackSort}}
‹ Search
{{else}}
‹ Search
{{end}}
{{if .Filename}}
/{{.Filename}}
{{end}}
{{if .PrevID}}
← Prev
{{else}}
← Prev
{{end}}
{{if .NextID}}
Next →
{{else}}
Next →
{{end}}
{{end}}
{{/* The operator's own note and hand-drawn annotations, under the image
like a booru post page. Per-source commentary and pulled annotations
live in the source panels beside the metadata. */}}
{{end}}
{{if .MangaMeta.RawXML}}
Raw ComicInfo.xml
{{.MangaMeta.RawXML}}
{{end}}
{{end}}
{{/* One collapsible panel per source, carrying that origin's commentary and
pulled annotations. The origin itself is edited from the metadata
Sources row; here only the commentary body and the boxes are. */}}
{{range .SourcePanels}}
{{if .Site}}{{.Site}}{{else}}source{{end}}
{{range .ManualAnnotations}}-
{{if .Body}}{{.Body}}{{else}}(no text){{end}}
{{end}}
{{end}}