(style): Refactor HTML templates and add CSS
Refactored HTML templates for improved strucutre and clarity Moved styles to a separate CSS file for better maintainablilty
This commit is contained in:
parent
eb1e69ab3c
commit
fe8e8c7e64
4 changed files with 99 additions and 58 deletions
55
static/css/style.css
Normal file
55
static/css/style.css
Normal file
|
|
@ -0,0 +1,55 @@
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
form {
|
||||||
|
max-width: 600px;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
label {
|
||||||
|
display: block;
|
||||||
|
margin-top: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type="text"],
|
||||||
|
input[type="password"],
|
||||||
|
textarea {
|
||||||
|
width: 100%;
|
||||||
|
padding: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
button {
|
||||||
|
margin-top: 15px;
|
||||||
|
padding: 10px 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.flash {
|
||||||
|
background-color: #f8d7da;
|
||||||
|
color: #721c24;
|
||||||
|
padding: 10px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -4,30 +4,29 @@
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>Admin Center - Subscribers</title>
|
<title>Admin Center - Subscribers</title>
|
||||||
<style>
|
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
|
||||||
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>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1>Subscribers</h1>
|
<h1>Subscribers</h1>
|
||||||
<p><a href="{{ url_for('send_update') }}">Send Update Email</a></p>
|
<p><a href="{{ url_for('send_update') }}">Send Update Email</a></p>
|
||||||
{% if emails %}
|
|
||||||
<table>
|
{% if emails %}
|
||||||
<tr>
|
<table>
|
||||||
<th>Email Address</th>
|
<thead>
|
||||||
</tr>
|
<tr>
|
||||||
{% for email in emails %}
|
<th>Email Address</th>
|
||||||
<tr>
|
</tr>
|
||||||
<td>{{ email }}</td>
|
</thead>
|
||||||
</tr>
|
<tbody>
|
||||||
{% endfor %}
|
{% for email in emails %}
|
||||||
</table>
|
<tr>
|
||||||
{% else %}
|
<td>{{ email }}</td>
|
||||||
<p>No subscribers found.</p>
|
</tr>
|
||||||
{% endif %}
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
{% else %}
|
||||||
|
<p>No subscribers found.</p>
|
||||||
|
{% endif %}
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -1,26 +1,21 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>Admin Login</title>
|
<title>Admin Login</title>
|
||||||
<style>
|
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
|
||||||
body { font-family: Arial, sans-serif; padding: 20px; }
|
|
||||||
form { max-width: 400px; margin: 0 auto; }
|
|
||||||
label { display: block; margin-top: 15px; }
|
|
||||||
input[type="text"], input[type="password"] { width: 100%; padding: 8px; }
|
|
||||||
button { margin-top: 15px; padding: 10px 20px; }
|
|
||||||
.flash { background-color: #f8d7da; color: #721c24; padding: 10px; margin-bottom: 10px; text-align: center; }
|
|
||||||
</style>
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<h1>Admin Login</h1>
|
<h1>Admin Login</h1>
|
||||||
{% with messages = get_flashed_messages(with_categories=true) %}
|
{% with messages = get_flashed_messages(with_categories=true) %}
|
||||||
{% if messages %}
|
{% if messages %}
|
||||||
{% for category, message in messages %}
|
{% for category, message in messages %}
|
||||||
<div class="flash">{{ message }}</div>
|
<div class="flash">{{ message }}</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endwith %}
|
{% endwith %}
|
||||||
<form action="{{ url_for('login') }}" method="POST">
|
<form action="{{ url_for('login') }}" method="POST">
|
||||||
<label for="username">Username:</label>
|
<label for="username">Username:</label>
|
||||||
|
|
@ -30,4 +25,5 @@
|
||||||
<button type="submit">Login</button>
|
<button type="submit">Login</button>
|
||||||
</form>
|
</form>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
|
||||||
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -1,31 +1,21 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>Admin Center - Send Update</title>
|
<title>Admin Center - Send Update</title>
|
||||||
<style>
|
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
|
||||||
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>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<h1>Send Update Email</h1>
|
<h1>Send Update Email</h1>
|
||||||
{% with messages = get_flashed_messages() %}
|
{% with messages = get_flashed_messages() %}
|
||||||
{% if messages %}
|
{% if messages %}
|
||||||
{% for message in messages %}
|
{% for message in messages %}
|
||||||
<div class="flash">{{ message }}</div>
|
<div class="flash">{{ message }}</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endwith %}
|
{% endwith %}
|
||||||
|
|
||||||
<form action="{{ url_for('send_update') }}" method="POST">
|
<form action="{{ url_for('send_update') }}" method="POST">
|
||||||
|
|
@ -42,4 +32,5 @@
|
||||||
<a href="{{ url_for('logout') }}">Logout</a>
|
<a href="{{ url_for('logout') }}">Logout</a>
|
||||||
</p>
|
</p>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue