{# One document card (Library and workspace pages). Expects `d` (web.summary) and optional `ws`. #} {% from "_icons.html" import icon %}
{{ d.filename }} {% if d.workspaces and not ws %}
{% for w in d.workspaces %}{{ icon('folders') }}{{ w.name }}{% endfor %}
{% endif %}
{{ d.page_count }} page{{ 's' if d.page_count != 1 }} · {{ d.filetype|upper }} · {{ d.size_bytes|filesize }} · {{ d.created_at|datetime }}
{% for key, label in [('native', 'Native'), ('ocr', 'OCR'), ('llm', 'LLM')] %} {% set n = d[key ~ '_pages'] %}
{{ icon({'native': 'type', 'ocr': 'cpu', 'llm': 'sparkles'}[key]) }}{{ label }}{{ n }}/{{ d.page_count }}
{% endfor %}
{{ icon('eye') }}Inspect {{ icon('text') }}Text {{ icon('diff') }}Compare
{% if ws %}{% endif %}