feat(ui): dashboard layout with widgets and modern subscribers table

This commit is contained in:
Cipher Vance 2025-08-31 12:11:56 -05:00
parent 49ab3c1fe4
commit 941a3dabc9

View file

@ -1,29 +1,35 @@
<!DOCTYPE html> {% extends "base.html" %}
<html lang="en"> {% block title %}Dashboard{% endblock %}
<head> {% block content %}
<meta charset="UTF-8"> <div class="page-header">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <div>
<title>Admin Center - Subscribers</title> <h1 class="page-title">Dashboard</h1>
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}"> <p class="page-subtitle">Quick overview of your mailing activity</p>
</head> </div>
<body> <div class="page-actions">
<a href="{{ url_for('send_update') }}" class="button button-primary">Send Update</a>
</div>
</div>
<h1>Subscribers</h1> <section class="widgets">
<p> <div class="widget-card">
<a href="{{ url_for('send_update') }}">Send Update Email</a>| <div class="widget-label">Total Subscribers</div>
<a href="{{ url_for('logout') }}">Logout</a> <div class="widget-value">{{ counts.total_subscribers }}</div>
</p> </div>
<div class="widget-card">
{% with messages = get_flashed_messages(with_categories=true) %} <div class="widget-label">Newsletters Sent</div>
{% if messages %} <div class="widget-value">{{ counts.total_newsletters }}</div>
{% for category, message in messages %} </div>
<div class="flash">{{ message }}</div> <div class="widget-card">
{% endfor %} <div class="widget-label">Sent Today</div>
{% endif %} <div class="widget-value">{{ counts.sent_today }}</div>
{% endwith %} </div>
</section>
{% if emails %} {% if emails %}
<table> <div class="card">
<div class="table-wrap">
<table class="table">
<thead> <thead>
<tr> <tr>
<th>Email Address</th> <th>Email Address</th>
@ -37,8 +43,11 @@
{% endfor %} {% endfor %}
</tbody> </tbody>
</table> </table>
</div>
</div>
{% else %} {% else %}
<div class="card empty-state">
<p>No subscribers found.</p> <p>No subscribers found.</p>
</div>
{% endif %} {% endif %}
</body> {% endblock %}
</html>