{{define "content"}}
{{/* Adding content, on its own page (2026-09-29, Paul: "remove the Add
forms from the index … that should be a separate Add content form").
The form, the drop zone, the upload tray and the outcome message moved
here unchanged; POST /documents still receives them, and now redirects
back HERE with its outcome rather than to the index. The index keeps
search and the document list, and links here. */}}
Add content
{{if .Flash}}
{{.Flash}}
{{end}}
{{/* The upload tray. It lives OUTSIDE the form on purpose: it is not
something the form submits, and a scriptless browser must find the
form exactly as it was. Scriptless it is `hidden` and empty, so it
is not on the page at all.
drop.js unhides it — still empty — at its ready step, for the same
reason it unhides the note there: [rst-tray-status] is the live
region that announces what a drop did, and a live region that
enters the accessibility tree in the same tick as its first
message is commonly not announced at all. Only [rst-tray-status]
is live. The rows are not, and must not be: five files uploading
is five rows changing several times a second, and a live region
over that is a screen reader nobody can use.
Every word here comes from dropZone in handlers.go, like the data
attributes above — the tray and the flash sentence a scriptless
browser sees are the same strings, so they cannot drift.
The document list is on the index, not here, so once anything is
stored the tray points there with a real link. Nothing follows it
on its own: someone mid-drop does not want the ground moving under
them. When a drop settles drop.js re-fetches this page and swaps
its one rst-refresh region, the passage count in the footer. */}}
{{with .Drop}}