{% comment %} Copyright (C) 2017-2022 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 "inode/x-empty" == mimetype %} File is empty {% elif mimetype in browsers_supported_image_mimes and content %} {% elif "application/pdf" == mimetype %}
Page: /
{% elif filename and filename|default:""|slice:"-5:" == "ipynb" %}
{% elif "text/" in mimetype or "application/" in mimetype and encoding != "binary" %}
{{ content }}
{% elif content %} Content with mime type {{ mimetype }} and encoding {{ encoding }} cannot be displayed. {% else %} {% include "includes/http-error.html" %} {% endif %}
{% if not iframe_mode %}
{% endif %} {% if content %} {% endif %} {% endif %}