{% extends "base.html" %}

{% block title %}Bioversions{% endblock %}

{% block content %}
    <div class="container" style="margin-top: 50px; margin-bottom: 50px">
        <div class="row justify-content-center">
            <div class="card">
                <h5 class="card-header text-center">Biological Database Latest Versions</h5>
                <div class="card-body">
                    <p>
                        This web application lists the latest versions for biological databases.
                        It refreshes once per day.
                    </p>
                </div>
                <table class="table table-striped table-hover">
                    <thead>
                    <tr>
                        <th>Name</th>
                        <th>Version</th>
                        <th>Date</th>
                        <th class="text-center">JSON</th>
                    </tr>
                    </thead>
                    <tbody>
                    {% for row in rows %}
                        <tr>
                            <td>{{ row.name }}</td>
                            <td>
                                {% if row.homepage %}
                                    <a href="{{ row.homepage }}">{{ row.version }} <i class="fas fa-link"></i></a>
                                {% else %}
                                    {{ row.version }}
                                {% endif %}
                            </td>
                            <td>
                                {% if row.date %}{{ row.date }}{% endif %}
                            </td>
                            <td class="text-center">
                                <a href="{{ url_for('database', name=row.name.lower().replace(" ", "")) }}">
                                    <i class="fas fa-download"></i>
                                </a>
                            </td>
                        </tr>
                    {% endfor %}
                    </tbody>
                </table>
                <div class="card-footer">
                    <p style="text-align: center">
                        Developed with ❤️ by the <a href="https://indralab.github.io">INDRA Lab</a> in the
                        <a href="https://hits.harvard.edu">Harvard Program in Therapeutic Science (HiTS)</a>.<br/>
                        Funded by the DARPA Young Faculty Award W911NF2010255 (PI: Benjamin M. Gyori).<br/>
                        Point of contact: <a href="https://github.com/cthoyt">@cthoyt</a>.
                        (<a href="https://github.com/biopragmatics/bioversions">Source code</a>)
                    </p>
                </div>
            </div>
        </div>
    </div>
{% endblock %}
