{#- A file's content, drawn by its kind: the viewer dialog's body and the file page's (files/_viewer.html says what is trusted, and why). -#} {% from "_macros.html" import icon %}
{% if opened.kind == "markdown" %}
{{ html|safe }}
{% elif opened.kind == "code" %}
{{ opened.text }}
{% elif opened.kind == "text" %}
{{ opened.text }}
{% elif opened.kind == "html" %} {% elif opened.kind == "image" %} {{ opened.name }} {% else %}
{{ icon("file-text", "empty__mark") }}

{{ t("This file is too large to show here.") if opened.kind == "large" else t("This is not a text file, so it is not shown here.") }}

{{ t("Download it") }}

{% endif %}