{% extends "base.html" %}
{% block content %}
<div class="panel">
  <div class="panel-head">
    <div>
      <p class="eyebrow">Code context</p>
      <h2>Index overview</h2>
    </div>
  </div>
  <div class="chart" data-plot='{{ plot | tojson }}'></div>
</div>

<div class="card-grid two">
  <section class="card">
    <h3>Recent files</h3>
    <div class="table-wrap">
      <table>
        <thead><tr><th>Path</th><th>Language</th><th>LOC</th></tr></thead>
        <tbody>
          {% for file in files %}
          <tr><td>{{ file.path }}</td><td>{{ file.language }}</td><td>{{ file.lines_of_code }}</td></tr>
          {% endfor %}
        </tbody>
      </table>
    </div>
  </section>
  <section class="card">
    <h3>Entities</h3>
    <div class="table-wrap">
      <table>
        <thead><tr><th>Name</th><th>Type</th><th>File</th></tr></thead>
        <tbody>
          {% for entity in entities %}
          <tr><td>{{ entity.name }}</td><td>{{ entity.type }}</td><td>{{ entity.file_id }}</td></tr>
          {% endfor %}
        </tbody>
      </table>
    </div>
  </section>
</div>
{% endblock %}