{#- A node's notes as a page states them (ADR-0140): its Notes view, and the page of a
path no node stands at, which lists the notes written for it and beneath it.
Each note says what it is on — the node, or one of its lines, as the line reads
now and linked to it where the run reports it; marked where it does not, since a
line that is not reported is suspended, not gone (ADR-0047 decision 8) — who wrote
it and when, who changed it last where somebody did, and whether it is the note of
a pin, which is changed with its pin while that stands and is kept as it was once
the pin ends (decision 5). Then its words, an admin's Markdown, and folded beneath
them what the node showed when they were written (decision 6): its status and its
lines — the line, for a note on one — each line on its status's tint. A note is
not an event and not a reading: nothing here is a status of the node now.
`note_item` takes a `_ShownNote`; `path` is the node's, as its address writes it,
and empty on the page of a gone path, where nothing links to a line and nothing is
edited, and where `at` names the path a note was written for when it is one
beneath the page's own. `mine` are an admin's words a refused edit brought back,
in the editor `editing` names. -#}
{% macro note_context(note) -%}
{%- set context = note.context %}
{% if context.code %}The node showed {{ context.code }}{% else %}No node stood there{% endif %}
{%- if context.lines %}, {{ 'and the line read' if note.slug else 'and its lines read' }}:{% else %}.{% endif %} And {{ context.more }} more {{ 'line' if context.more == 1 else 'lines' }}.What {{ 'the line' if note.slug else 'the node' }} showed then
{%- for line in context.lines %}
{%- if coded %}
{%- endfor %}
{{ line.code }}
{%- endif %}
{{ line.text | markdown_inline(node=note.path) }}
{%- if at %}At {{ at }}. {% endif %}
{%- if note.slug %}On {% if path and shown.reported %}a line{% else %}a line{% endif %}
{%- if shown.line %}: {{ shown.line | markdown_inline(node=note.path) }}{% endif %}
{%- if not shown.reported %} — the check does not report it now{% endif %}.
{%- else %}On the node.{% endif %}
Written by {{ note.created_by or 'unknown' }} {{ note.created_at | localtime }}
{%- if note.set_at != note.created_at %}, last changed by {{ note.set_by or 'unknown' }} {{ note.set_at | localtime }}{% endif %}.
{%- if note.pin %} The note of a pin{% if shown.pin_stands %} that stands, and changed with it{% else %} that has ended{% endif %}.{% endif %}