{% extends "base.html" %}

{% block content %}
<div class="container">
  <div class="card">
    <div class="card-header">Directory <code>{{ path }}</code></div>
    <div class="card-body">
      <h6 class="card-title"></h6>
      {% if files %}
        <ul class="list-group list-group-flush">
        {% for file in files %}
          {% if file.is_file %}
            <a href="{{ file.link }}" class="list-group-item list-group-item-action">
              {{ file.name }}
            </a>
          {% else %}
            <a href="{{ file.link }}" class="list-group-item list-group-item-action">
              {% if file.is_up %}⬆️{% else %}📁{% endif %}&nbsp;&nbsp;{{ file.name }}
            </a>
          {% endif %}
        {% endfor %}
        </ul>
        {% else %}
        <h4 class="card-title">No files found in this directory</h4>
      {% endif %}
    </div>
  </div>
</div>
{% endblock %}
