[templates] Adding some aggregation widgets
All checks were successful
build & deploy / test (push) Successful in 1m45s
build & deploy / deploy (push) Successful in 26s

This commit is contained in:
2026-03-18 10:23:30 -04:00
parent a8dc336950
commit 2e7d6364a2
8 changed files with 288 additions and 46 deletions

View File

@ -4,6 +4,51 @@
{% block title %}Webpages{% endblock %}
{% block lists %}
{% if domains_this_week or domains_this_month %}
<div class="row">
<div class="col-md">
<h2>Domains Read</h2>
{% if domains_this_week %}
<h3>This Week</h3>
<div class="table-responsive">
<table class="table table-striped table-sm">
<tbody>
{% for item in domains_this_week %}
<tr>
<td>{{item.domain}}</td>
<td>{{item.count}} pages</td>
</tr>
{% empty %}
<tr><td>No pages read this week</td></tr>
{% endfor %}
</tbody>
</table>
</div>
{% endif %}
{% if domains_this_month %}
<h3>This Month</h3>
<div class="table-responsive">
<table class="table table-striped table-sm">
<tbody>
{% for item in domains_this_month %}
<tr>
<td>{{item.domain}}</td>
<td>{{item.count}} pages</td>
</tr>
{% empty %}
<tr><td>No pages read this month</td></tr>
{% endfor %}
</tbody>
</table>
</div>
{% endif %}
</div>
</div>
{% endif %}
<div class="row">
<p class="pagination">
<span class="page-links">