Skip to content

Commit

Permalink
fix: Missing templates
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafiot committed Feb 19, 2024
1 parent 17674bf commit 8b2f875
Show file tree
Hide file tree
Showing 2 changed files with 78 additions and 0 deletions.
35 changes: 35 additions & 0 deletions website/web/templates/favicon_details.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{% extends "main.html" %}

{% from 'bootstrap5/utils.html' import render_messages %}

{% block title %}Favicon: {{ favicon_sha512 }}{% endblock %}

{% block content %}
<center>
<h2>{{ favicon_sha512 }}</h2>
<img src="data:image/ico;base64,{{ b64_favicon }}" style="width:32px;height:32px;"/>
</center>
<p>The same favicon was seen in these captures:</p>
<ul>
<div class="table-responsive">
<table id="table" class="table">
<thead>
<tr>
<th>Capture Title</th>
</tr>
</thead>
<tbody>
{% for capture_uuid, title in captures %}
<tr>
<td>
<a href="{{ url_for('tree', tree_uuid=capture_uuid) }}">
{{ title }}
</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</ul>
{% endblock %}
43 changes: 43 additions & 0 deletions website/web/templates/favicons.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{% extends "main.html" %}

{% from 'bootstrap5/utils.html' import render_messages %}

{% block title %}HTTP Headers Hashes lookup{% endblock %}

{% block scripts %}
{{ super() }}
<script type="text/javascript">
$('#table').DataTable( {
"order": [[ 1, "desc" ]],
"pageLength": 500
});
</script>

{% endblock %}

{% block content %}
<div class="table-responsive-sm">
<table id="table" class="table">
<thead>
<tr>
<th>Favicon</th>
<th style="width:10%">Frequency</th>
<th style="width:10%">Number of captures</th>
</tr>
</thead>
<tbody>
{% for favicon_sha512, freq, number_captures, b64_favicon in favicons %}
<tr>
<td >
<a href="{{ url_for('favicon_detail', favicon_sha512=favicon_sha512) }}">
<img src="data:image/ico;base64,{{ b64_favicon }}" style="width:32px;height:32px;"/>
</a>
</td>
<td>{{ freq }}</td>
<td>{{ number_captures }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endblock %}

0 comments on commit 8b2f875

Please sign in to comment.