{% comment %} Copyright (C) 2017-2026 The Software Heritage developers See the AUTHORS file at the top-level directory of this distribution License: GNU Affero General Public License version 3, or any later version See top-level LICENSE file for more information {% endcomment %} {% load swh_templatetags %} {% include "./revision-info.html" %} {% if snapshot_context and snapshot_context.is_empty %} {% include "./empty-snapshot.html" %} {% else %} {% if not iframe_mode %}
{% if filename %}{{ filename }}{% endif %}
{% endif %}
{% if content_size > max_content_size %} Content is too large to be displayed (size is greater than {{ max_content_size|filesizeformat }}). {% elif "application/pdf" == mimetype %}
Page: /
{% elif filename|is_notebook %}
{{ content }}
{% elif filename|is_markdown or "text/html" == mimetype %}
{{ content }}
{% elif "inode/x-empty" == mimetype %} File is empty {% elif mimetype in browsers_supported_image_mimes and content %} image {% elif textual_content %}
{{ content }}
{% elif content %} Content with mime type {{ mimetype }} and encoding {{ encoding }} cannot be displayed. {% else %} {% include "includes/http-error.html" %} {% endif %} {% if content %} {{ filename|swh_json_script:"filename" }} {{ mimetype|swh_json_script:"mimetype" }} {{ top_right_link.url|swh_json_script:"content_url" }} {{ mathjax_js_library|swh_json_script:"mathjax_js_library" }} {{ iframe_mode|swh_json_script:"iframe_mode" }} {% endif %}
{% if not iframe_mode %}
{% endif %} {% endif %}