pypi_browser/templates/_macros.html

{% macro package_type_pill(filename) %}
    {% if filename.endswith(".whl") %}
        <span class="badge text-bg-success">Wheel</span>
    {% elif filename.endswith(".egg") %}
        <span class="badge text-bg-warning">Egg</span>
    {% else %}
        <span class="badge text-bg-secondary">Source distribution</span>
    {% endif %}
{% endmacro %}

{% macro tarball_warning(is_tarball) %}
    {% if is_tarball %}
        <div class="alert alert-warning" role="alert">
            You're browsing the contents of a tarball which may be slow as
            tarballs do not support random access. Browse a <tt>.whl</tt> or
            <tt>.zip</tt> file for best performance.
        </div>
    {% endif %}
{% endmacro %}

{# vim: ft=jinja
#}
Metadata
View Raw File