You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
323 lines
7.2 KiB
323 lines
7.2 KiB
<!DOCTYPE html>
|
|
<html lang="zh-CN">
|
|
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>{% block title %}邮件系统{% endblock %}</title>
|
|
<style>
|
|
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
body {
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
background: #f5f5f5;
|
|
min-height: 100vh;
|
|
}
|
|
|
|
.navbar {
|
|
background: #2563eb;
|
|
color: white;
|
|
padding: 1rem 2rem;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
}
|
|
|
|
.navbar a {
|
|
color: white;
|
|
text-decoration: none;
|
|
margin-left: 1.5rem;
|
|
}
|
|
|
|
.navbar a:hover {
|
|
text-decoration: underline;
|
|
}
|
|
|
|
.container {
|
|
max-width: 1200px;
|
|
margin: 0 auto;
|
|
padding: 2rem;
|
|
}
|
|
|
|
.card {
|
|
background: white;
|
|
border-radius: 8px;
|
|
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
|
padding: 1.5rem;
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
.btn {
|
|
display: inline-block;
|
|
padding: 0.5rem 1rem;
|
|
border-radius: 4px;
|
|
text-decoration: none;
|
|
border: none;
|
|
cursor: pointer;
|
|
font-size: 0.9rem;
|
|
}
|
|
|
|
.btn-primary {
|
|
background: #2563eb;
|
|
color: white;
|
|
}
|
|
|
|
.btn-danger {
|
|
background: #dc2626;
|
|
color: white;
|
|
}
|
|
|
|
.btn-success {
|
|
background: #16a34a;
|
|
color: white;
|
|
}
|
|
|
|
.btn-secondary {
|
|
background: #6b7280;
|
|
color: white;
|
|
}
|
|
|
|
.btn:hover {
|
|
opacity: 0.9;
|
|
}
|
|
|
|
.form-group {
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
.form-group label {
|
|
display: block;
|
|
margin-bottom: 0.5rem;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.form-group input,
|
|
.form-group textarea,
|
|
.form-group select {
|
|
width: 100%;
|
|
padding: 0.5rem;
|
|
border: 1px solid #d1d5db;
|
|
border-radius: 4px;
|
|
font-size: 1rem;
|
|
}
|
|
|
|
.form-group textarea {
|
|
min-height: 150px;
|
|
resize: vertical;
|
|
}
|
|
|
|
table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
}
|
|
|
|
th,
|
|
td {
|
|
padding: 0.75rem;
|
|
text-align: left;
|
|
border-bottom: 1px solid #e5e7eb;
|
|
}
|
|
|
|
th {
|
|
background: #f9fafb;
|
|
font-weight: 600;
|
|
}
|
|
|
|
tr:hover {
|
|
background: #f9fafb;
|
|
}
|
|
|
|
.flash {
|
|
padding: 1rem;
|
|
border-radius: 4px;
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
.flash.success {
|
|
background: #d1fae5;
|
|
color: #065f46;
|
|
}
|
|
|
|
.flash.error {
|
|
background: #fee2e2;
|
|
color: #991b1b;
|
|
}
|
|
|
|
.sidebar {
|
|
width: 220px;
|
|
background: white;
|
|
min-height: calc(100vh - 60px);
|
|
padding: 1rem;
|
|
border-right: 1px solid #e5e7eb;
|
|
}
|
|
|
|
.sidebar a {
|
|
display: block;
|
|
padding: 0.75rem 1rem;
|
|
color: #374151;
|
|
text-decoration: none;
|
|
border-radius: 4px;
|
|
margin-bottom: 0.25rem;
|
|
}
|
|
|
|
.sidebar a:hover,
|
|
.sidebar a.active {
|
|
background: #eff6ff;
|
|
color: #2563eb;
|
|
}
|
|
|
|
.main-layout {
|
|
display: flex;
|
|
}
|
|
|
|
.main-content {
|
|
flex: 1;
|
|
padding: 2rem;
|
|
}
|
|
|
|
.email-item {
|
|
display: flex;
|
|
align-items: center;
|
|
padding: 1rem;
|
|
border-bottom: 1px solid #e5e7eb;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.email-item:hover {
|
|
background: #f9fafb;
|
|
}
|
|
|
|
.email-item.unread {
|
|
font-weight: 600;
|
|
background: #eff6ff;
|
|
}
|
|
|
|
.email-subject {
|
|
flex: 1;
|
|
}
|
|
|
|
.email-date {
|
|
color: #6b7280;
|
|
font-size: 0.875rem;
|
|
}
|
|
|
|
.badge {
|
|
display: inline-block;
|
|
padding: 0.25rem 0.5rem;
|
|
border-radius: 9999px;
|
|
font-size: 0.75rem;
|
|
}
|
|
|
|
.badge-success {
|
|
background: #d1fae5;
|
|
color: #065f46;
|
|
}
|
|
|
|
.badge-danger {
|
|
background: #fee2e2;
|
|
color: #991b1b;
|
|
}
|
|
|
|
.badge-warning {
|
|
background: #fef3c7;
|
|
color: #92400e;
|
|
}
|
|
|
|
.pagination {
|
|
display: flex;
|
|
gap: 0.5rem;
|
|
margin-top: 1rem;
|
|
}
|
|
|
|
.pagination a {
|
|
padding: 0.5rem 0.75rem;
|
|
border: 1px solid #d1d5db;
|
|
border-radius: 4px;
|
|
text-decoration: none;
|
|
color: #374151;
|
|
}
|
|
|
|
.pagination a:hover {
|
|
background: #f3f4f6;
|
|
}
|
|
|
|
.pagination a.active {
|
|
background: #2563eb;
|
|
color: white;
|
|
border-color: #2563eb;
|
|
}
|
|
|
|
.star-btn {
|
|
background: none;
|
|
border: none;
|
|
cursor: pointer;
|
|
font-size: 1.2rem;
|
|
padding: 0.25rem 0.5rem;
|
|
margin-right: 0.5rem;
|
|
color: #9ca3af;
|
|
transition: color 0.2s;
|
|
}
|
|
|
|
.star-btn:hover {
|
|
color: #fbbf24;
|
|
}
|
|
|
|
.star-btn.starred {
|
|
color: #fbbf24;
|
|
}
|
|
|
|
.star-btn-large {
|
|
background: none;
|
|
border: 1px solid #d1d5db;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
font-size: 0.9rem;
|
|
padding: 0.5rem 1rem;
|
|
color: #6b7280;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.star-btn-large:hover {
|
|
border-color: #fbbf24;
|
|
color: #fbbf24;
|
|
}
|
|
|
|
.star-btn-large.starred {
|
|
background: #fef3c7;
|
|
border-color: #fbbf24;
|
|
color: #d97706;
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body>
|
|
<nav class="navbar">
|
|
<div><strong>📧 邮件系统</strong></div>
|
|
<div>
|
|
{% if current_user.is_authenticated %}
|
|
<span>{{ current_user.username }}</span>
|
|
<a href="{{ url_for('inbox') }}">收件箱</a>
|
|
<a href="{{ url_for('compose') }}">写邮件</a>
|
|
<a href="{{ url_for('user_settings') }}">设置</a>
|
|
{% if current_user.is_admin %}
|
|
<a href="{{ url_for('admin_dashboard') }}">管理后台</a>
|
|
{% endif %}
|
|
<a href="{{ url_for('logout') }}">退出</a>
|
|
{% endif %}
|
|
</div>
|
|
</nav>
|
|
<div class="container">
|
|
{% with messages = get_flashed_messages(with_categories=true) %}
|
|
{% for category, message in messages %}
|
|
<div class="flash {{ category }}">{{ message }}</div>
|
|
{% endfor %}
|
|
{% endwith %}
|
|
{% block content %}{% endblock %}
|
|
</div>
|
|
</body>
|
|
|
|
</html> |