(feat): Initial work of admin panel

This commit is contained in:
Blake Ridgway 2025-02-12 09:13:12 -06:00
commit 7ae9ef7478
11 changed files with 209 additions and 0 deletions

View file

@ -0,0 +1,33 @@
<!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>
<style>
body { font-family: Arial, sans-serif; padding: 20px; }
table { border-collapse: collapse; width: 100%; }
th, td { border: 1px solid #ddd; padding: 8px; text-align: left; }
th { background-color: #f2f2f2; }
a { margin-right: 10px; }
</style>
</head>
<body>
<h1>Subscribers</h1>
<p><a href="{{ url_for('send_update') }}">Send Update Email</a></p>
{% if emails %}
<table>
<tr>
<th>Email Address</th>
</tr>
{% for email in emails %}
<tr>
<td>{{ email }}</td>
</tr>
{% endfor %}
</table>
{% else %}
<p>No subscribers found.</p>
{% endif %}
</body>
</html>

View file

@ -0,0 +1,37 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Admin Center - Send Update</title>
<style>
body { font-family: Arial, sans-serif; padding: 20px; }
form { max-width: 600px; }
label { display: block; margin-top: 15px; }
input[type="text"], textarea { width: 100%; padding: 8px; }
button { margin-top: 15px; padding: 10px 20px; }
.flash { background-color: #f8d7da; color: #721c24; padding: 10px; margin-bottom: 10px; }
</style>
</head>
<body>
<h1>Send Update Email</h1>
{% with messages = get_flashed_messages() %}
{% if messages %}
{% for message in messages %}
<div class="flash">{{ message }}</div>
{% endfor %}
{% endif %}
{% endwith %}
<form action="{{ url_for('send_update') }}" method="POST">
<label for="subject">Subject:</label>
<input type="text" name="subject" required>
<label for="body">Body (HTML allowed):</label>
<textarea name="body" rows="10" required></textarea>
<button type="submit">Send Update</button>
</form>
<p><a href="{{ url_for('index') }}">Back to Subscribers List</a></p>
</body>
</html>