<!DOCTYPE html>
<html lang="en">
<head>
    {% include "head.html" %}
    <title>Archived URL Set Report - Storytracker</title>
</head>
<body>
    {% include "header.html" %}
    <div class="container">
        <div class="row">
            <div class="col-lg-10 col-md-10 col-sm-12 col-xs-12 col-lg-offset-1 col-md-offset-1">
                <h1>Archived URL Set Report</h1>
                <hr>
            </div>
        </div>

        <div class="row">
            <div class="col-lg-10 col-md-10 col-sm-12 col-xs-12 col-lg-offset-1 col-md-offset-1">
                <div class="row">
                    <div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
                        <a href="./urlset-overlay.gif">
                            <img width="100%" src="./urlset-overlay.gif">
                        </a>
                    </div>
                    <div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
                        <a href="./urlset-illustration.gif">
                            <img width="100%" src="./urlset-illustration.gif">
                        </a>
                    </div>
                </div>
                <hr>
            </div>
        </div>

        <div class="row">
            <div class="col-lg-10 col-md-10 col-sm-12 col-xs-12 col-lg-offset-1 col-md-offset-1">
                <a name="analysis"></a>
                <h3>Analysis</h3>
                <table class="table table-bordered">
                    {% for key, value in object_list.summary_statistics.items()|sort %}
                    <tr>
                        <th>
                            {{ key|replace("_", " ")|capitalize }}
                        </th>
                        <td class="right">
                            {{ value }}
                        </td>
                    </tr>
                    {% endfor %}
                </table>
                <hr>
            </div>
        </div>

        <div class="row">
            <div class="col-lg-10 col-md-10 col-sm-12 col-xs-12 col-lg-offset-1 col-md-offset-1">
                <a name="downloads"></a>
                <h3>Downloads</h3>
                <table class="table table-bordered">
                    <tr>
                        <th>Extracted hyperlinks</th>
                        <td><a href="./hyperlinks.csv">CSV</a></td>
                    </tr>
                </table>
                <hr>
            </div>
        </div>

        <div class="row">
            <div class="col-lg-10 col-md-10 col-sm-12 col-xs-12 col-lg-offset-1 col-md-offset-1">
                <a name="archived-urls"></a>
                <h3>Archived URLs</h3>
                <table class="table table-bordered">
                    <thead>
                        <tr>
                            <th>URL</th>
                            <th>Timestamp</th>
                            <th>Report</th>
                            <th>Archived URL</th>
                        </tr>
                    </thead>
                    {% for obj in object_list %}
                    <tr>
                        <td>{{ obj.url }}</td>
                        <td>
                                {{ obj.timestamp }}
                        </td>
                        <td>
                            <a href="./urlanalysis-report-{{ obj.archive_filename }}/index.html">
                                URL
                            </a>
                        </td>
                        <td>
                            <a href="./urlanalysis-report-{{ obj.archive_filename }}/{{ obj.archive_filename }}.html">
                                HTML
                            </a>
                        </td>
                    </tr>
                    {% endfor %}
                </table>
                <hr>
            </div>
        </div>
    </div>
</body>
</html>
