🏡 index : ~doyle/rgit.git

{% extends "repo/base.html" %}

{% block tree_nav_class %}active{% endblock %}

{% block content %}
<div class="table-responsive">
<table class="repositories">
    <thead>
    <tr>
        <th style="width: 10rem;">Mode</th>
        <th>Name</th>
        <th>Size</th>
    </tr>
    </thead>

    <tbody>
    {% for item in items -%}
    <tr>
        {% match item -%}
        {%- when crate::git::TreeItem::Tree with (tree) -%}
        <td><pre>{{ tree.mode|file_perms }}</pre></td>
        <td><pre><a class="nested-tree" href="/{{ repo.display() }}/tree/{{ tree.path.display() }}{{ query }}">{{ tree.name }}</a></pre></td>
        <td></td>
        <td></td>

        {%- when crate::git::TreeItem::File with (file) -%}
        <td><pre>{{ file.mode|file_perms }}</pre></td>
        <td><pre><a href="/{{ repo.display() }}/tree/{{ file.path.display() }}{{ query }}">{{ file.name }}</a></pre></td>
        <td><pre>{{ file.size }}</pre></td>
        <td></td>
        {%- endmatch %}
    </tr>
    {% endfor -%}
    </tbody>
</table>
</div>
{% endblock %}