lookyloo/website/web/templates/index.html

95 lines
2.7 KiB
HTML
Raw Normal View History

2017-07-23 19:56:51 +02:00
{% extends "main.html" %}
{% from 'bootstrap/utils.html' import render_messages %}
2020-02-03 18:30:41 +01:00
{% block title %}Lookyloo{% endblock %}
2017-07-23 19:56:51 +02:00
{% block scripts %}
{{ super() }}
<script src='{{ url_for('static', filename='datatables.min.js') }}'></script>
<script type="text/javascript">
$(document).ready(function () {
$('#table').DataTable( {
"order": [[ 1, "desc" ]],
"pageLength": 50,
"columns": [
{ "orderable": false, "width": 400 },
{ "orderable": false, "width": 150 },
{ "orderable": false, "width": 400 }
],
"columnDefs": [{
"targets": 1,
"render": function ( data, type, row, meta ) {
let date = new Date(data);
return date.getFullYear() + '-' + (date.getMonth() + 1).toString().padStart(2, "0") + '-' + date.getDate().toString().padStart(2, "0") + ' ' + date.toTimeString();
}
}]
} );
});
</script>
{% endblock %}
{% block styles %}
{{ super() }}
<link rel="stylesheet" href="{{ url_for('static', filename='datatables.min.css') }}">
{% endblock %}
2017-07-23 19:56:51 +02:00
{% 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) }}
2017-07-23 19:56:51 +02:00
</center>
2020-02-03 18:30:41 +01:00
2020-02-06 17:25:21 +01:00
<div class="table-responsive">
<table id="table" class="table" style="width:96%">
2020-02-03 22:25:48 +01:00
<thead>
<tr>
<th>Page</th>
<th>Timestamp</th>
<th>Redirects</th>
2020-02-04 19:15:44 +01:00
</tr>
2020-02-03 18:30:41 +01:00
</thead>
<tbody>
{% for uuid, page_title, datetime, url, redirects, incomplete_redirects in titles %}
2020-02-03 22:25:48 +01:00
<tr>
<td>
2020-02-10 18:09:40 +01:00
<p title="{{ page_title }}"><a href="{{ url_for('tree', tree_uuid=uuid) }}">{{ page_title }}</a></p>
<p title="{{ url }}">{{ url }}</p>
2020-02-03 22:25:48 +01:00
</td>
<td>{{ datetime }}</td>
2020-02-03 22:25:48 +01:00
<td>
{% if redirects %}
{% for r in redirects %}
<p title="{{ r }}">
{% if loop.previtem %}
{{ ("&nbsp;" * (loop.index *2) )|safe }}↪ {{ r }}
{%else%}
2020-02-04 19:15:44 +01:00
{{ r }}
{%endif%}
</p>
2020-02-03 22:25:48 +01:00
{% 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%}
2020-02-03 22:25:48 +01:00
{% else%}
No redirect
{%endif%}
</td>
</tr>
{% endfor %}
2020-02-03 18:30:41 +01:00
</tbody>
</table>
2020-02-06 17:25:21 +01:00
</div>
2017-07-23 19:56:51 +02:00
{% endblock %}