lookyloo/website/web/templates/index.html

87 lines
2.4 KiB
HTML

{% extends "main.html" %}
{% from 'bootstrap/utils.html' import render_messages %}
{% block title %}Lookyloo{% endblock %}
{% block scripts %}
{{ super() }}
<script src='{{ url_for('static', filename='datatables.min.js') }}'></script>
<script>
$(document).ready(function () {
$('#table').DataTable( {
"order": [[ 1, "desc" ]],
"pageLength": 50,
"columns": [
{ "orderable": false, "width": 400 },
{ "orderable": false, "width": 150 },
{ "orderable": false, "width": 400 }
]
} );
});
</script>
{% endblock %}
{% block styles %}
{{ super() }}
<link rel="stylesheet" href="{{ url_for('static', filename='datatables.min.css') }}">
{% endblock %}
{% block content %}
<center>
<a href="{{ url_for('scrape_web') }}">
<img src="{{ url_for('static', filename='lookyloo.jpeg') }}"
alt="Lookyloo" width="200">
</a>
</center>
<center>
<h2><a href="{{ url_for('scrape_web') }}">Start a new capture</a></h2>
<br><br>
{{ render_messages(container=True, dismissible=True) }}
</center>
<div class="table-responsive">
<table id="table" class="table" style="width:96%">
<thead>
<tr>
<th>Page</th>
<th>Timestamp</th>
<th>Redirects</th>
</tr>
</thead>
<tbody>
{% for uuid, page_title, date, time, url, redirects, incomplete_redirects in titles %}
<tr>
<td>
<p title="{{ page_title }}"><a href="{{ url_for('tree', tree_uuid=uuid) }}">{{ page_title }}</a></p>
<p title="{{ url }}">{{ url }}</p>
</td>
<td>{{ date }} {{ time }}</td>
<td>
{% if redirects %}
{% for r in redirects %}
<p title="{{ r }}">
{% if loop.previtem %}
{{ ("&nbsp;" * (loop.index *2) )|safe }}↪ {{ r }}
{%else%}
{{ r }}
{%endif%}
</p>
{% endfor %}
{% if incomplete_redirects %}
<a style="float: right;" href="{{ url_for('cache_tree', tree_uuid=uuid) }}">Unable to find the redirects, click here to build the tree</a>
{%else%}
<a style="float: right;" href="{{ url_for('redirects', tree_uuid=uuid) }}">Download redirects</a>
{%endif%}
{% else%}
No redirect
{%endif%}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endblock %}