feat(ui): dashboard layout with widgets and modern subscribers table
This commit is contained in:
parent
49ab3c1fe4
commit
941a3dabc9
1 changed files with 50 additions and 41 deletions
|
|
@ -1,44 +1,53 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Admin Center - Subscribers</title>
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
|
||||
</head>
|
||||
<body>
|
||||
{% extends "base.html" %}
|
||||
{% block title %}Dashboard{% endblock %}
|
||||
{% block content %}
|
||||
<div class="page-header">
|
||||
<div>
|
||||
<h1 class="page-title">Dashboard</h1>
|
||||
<p class="page-subtitle">Quick overview of your mailing activity</p>
|
||||
</div>
|
||||
<div class="page-actions">
|
||||
<a href="{{ url_for('send_update') }}" class="button button-primary">Send Update</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h1>Subscribers</h1>
|
||||
<p>
|
||||
<a href="{{ url_for('send_update') }}">Send Update Email</a>|
|
||||
<a href="{{ url_for('logout') }}">Logout</a>
|
||||
</p>
|
||||
<section class="widgets">
|
||||
<div class="widget-card">
|
||||
<div class="widget-label">Total Subscribers</div>
|
||||
<div class="widget-value">{{ counts.total_subscribers }}</div>
|
||||
</div>
|
||||
<div class="widget-card">
|
||||
<div class="widget-label">Newsletters Sent</div>
|
||||
<div class="widget-value">{{ counts.total_newsletters }}</div>
|
||||
</div>
|
||||
<div class="widget-card">
|
||||
<div class="widget-label">Sent Today</div>
|
||||
<div class="widget-value">{{ counts.sent_today }}</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{% with messages = get_flashed_messages(with_categories=true) %}
|
||||
{% if messages %}
|
||||
{% for category, message in messages %}
|
||||
<div class="flash">{{ message }}</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
|
||||
{% if emails %}
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Email Address</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for email in emails %}
|
||||
<tr>
|
||||
<td>{{ email }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
{% if emails %}
|
||||
<div class="card">
|
||||
<div class="table-wrap">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Email Address</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for email in emails %}
|
||||
<tr>
|
||||
<td>{{ email }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% else %}
|
||||
<p>No subscribers found.</p>
|
||||
{% endif %}
|
||||
</body>
|
||||
</html>
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="card empty-state">
|
||||
<p>No subscribers found.</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue