spectra/templates/admin.html

149 lines
4.7 KiB
HTML
Raw Normal View History

2024-10-20 15:26:49 -04:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
2024-10-20 15:53:35 -04:00
<title>Admin Interface - Tanishq Dubey Photography</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+Mono:wght@100..900&display=swap" rel="stylesheet">
2024-10-20 15:26:49 -04:00
<style>
2024-10-20 15:53:35 -04:00
body {
margin: 0;
padding: 0;
font-family: 'Noto Sans Mono', monospace;
background-color: #f0f0f0;
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 2rem;
}
h1 {
color: {{ accent_color }};
margin-bottom: 1.5rem;
}
.upload-form {
background-color: #ffffff;
padding: 1rem;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
margin-bottom: 2rem;
}
input[type="file"] {
margin-right: 1rem;
}
input[type="submit"] {
background-color: {{ accent_color }};
color: white;
border: none;
padding: 0.5rem 1rem;
border-radius: 4px;
cursor: pointer;
font-family: inherit;
font-weight: bold;
}
input[type="submit"]:hover {
background-color: {{ accent_color }}e0; /* Slightly darker version of the accent color */
}
2024-10-20 15:26:49 -04:00
table {
width: 100%;
2024-10-20 15:53:35 -04:00
border-collapse: collapse;
background-color: #ffffff;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
2024-10-20 15:26:49 -04:00
}
th, td {
2024-10-20 15:53:35 -04:00
padding: 0.75rem;
2024-10-20 15:26:49 -04:00
text-align: left;
2024-10-20 15:53:35 -04:00
border-bottom: 1px solid #e0e0e0;
2024-10-20 15:26:49 -04:00
}
th {
2024-10-20 15:53:35 -04:00
background-color: #f5f5f5;
font-weight: bold;
color: #333;
}
tr:hover {
background-color: #f9f9f9;
}
.thumbnail {
max-width: 100px;
max-height: 100px;
object-fit: cover;
}
.flash-messages {
margin-bottom: 1rem;
}
.flash-messages p {
background-color: #4CAF50;
color: white;
padding: 0.5rem;
border-radius: 4px;
}
.logout {
text-align: right;
margin-bottom: 1rem;
}
.logout a {
color: {{ accent_color }};
text-decoration: none;
}
.logout a:hover {
text-decoration: underline;
2024-10-20 15:26:49 -04:00
}
</style>
</head>
<body>
2024-10-20 15:53:35 -04:00
<div class="container">
<div class="logout">
<a href="{{ url_for('admin_logout') }}">Logout</a>
</div>
<h1>Admin Interface</h1>
{% with messages = get_flashed_messages() %}
{% if messages %}
<div class="flash-messages">
{% for message in messages %}
<p>{{ message }}</p>
{% endfor %}
</div>
{% endif %}
{% endwith %}
<div class="upload-form">
<h2>Upload New Image</h2>
<form action="{{ url_for('admin_upload') }}" method="POST" enctype="multipart/form-data">
<input type="file" name="file" accept=".jpg,.jpeg,.png,.gif" required>
<input type="submit" value="Upload">
</form>
</div>
<h2>Uploaded Images</h2>
<table>
<thead>
<tr>
<th>Thumbnail</th>
<th>Filename</th>
<th>Date Taken</th>
<th>Focal Length</th>
<th>Aperture</th>
<th>Shutter Speed</th>
<th>ISO</th>
<th>Dimensions</th>
</tr>
</thead>
<tbody>
{% for photo in photos %}
<tr>
<td><img src="{{ url_for('serve_thumbnail', filename=photo.thumbnail_filename) }}" alt="Thumbnail" class="thumbnail"></td>
<td>{{ photo.input_filename }}</td>
<td>{{ photo.date_taken.strftime('%Y-%m-%d %H:%M:%S') }}</td>
<td>{{ photo.focal_length }}</td>
<td>{{ photo.aperture }}</td>
<td>{{ photo.shutter_speed }}</td>
<td>{{ photo.iso }}</td>
<td>{{ photo.width }}x{{ photo.height }}</td>
</tr>
2024-10-20 15:26:49 -04:00
{% endfor %}
2024-10-20 15:53:35 -04:00
</tbody>
</table>
</div>
2024-10-20 15:26:49 -04:00
</body>
</html>