{% extends "layout.html" %}

{% block title %}inetutils PyPI{% endblock %}
{% block content %}

{% if files %}
    <h1>Available Packages</h1>

    <div class="rows">
        <span class="header">Name</span>
        <span class="header">Size</span>
        <span class="header">Metadata</span>
    </div>

    <div class="clear"></div>

    {% for f in files %}
    <div class="rows">
        <span class="item">
            <a href="{{ url_for('package_get', eggbasket=f.eggbasket, package_name=f.filepath.parent.name, filename=f.filepath.name) }}">{{ f.filepath.name }}</a>
        </span>
        <span class="item">
            {{ f.filepath.size() }}
        </span>
        <span class="item">
            {% if f.name %}
                <a href="{{ url_for('package_metadata', eggbasket=f.eggbasket, package=f.filepath.parent.name, filename=f.filepath.name) }}">{{ f.name }}</a>
            {% endif %}
        </span>
    </div>

    <div class="clear"></div>
    {% endfor %}

{% endif %}
{% endblock %}
