add /admin page with pic count and folder sizes

This commit is contained in:
Johannes
2026-05-06 04:31:17 +02:00
parent 34991e4977
commit 2b585a19f2
3 changed files with 116 additions and 1 deletions

83
templates/admin.html Normal file
View File

@@ -0,0 +1,83 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>admin</title>
<style>
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
background: #111;
color: #e0e0e0;
font-family: 'Segoe UI', sans-serif;
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
padding: 60px 20px;
}
h1 {
font-size: 1.6rem;
font-weight: 400;
letter-spacing: 0.12em;
text-transform: uppercase;
color: #888;
margin-bottom: 48px;
}
.stats {
display: flex;
flex-direction: column;
gap: 20px;
width: 100%;
max-width: 420px;
}
.stat-card {
background: #1a1a1a;
border: 1px solid #2a2a2a;
border-radius: 8px;
padding: 24px 28px;
display: flex;
justify-content: space-between;
align-items: baseline;
gap: 16px;
}
.stat-label {
font-size: 0.85rem;
color: #666;
text-transform: uppercase;
letter-spacing: 0.08em;
}
.stat-value {
font-size: 1.5rem;
font-weight: 600;
color: #ddd;
}
a.back {
margin-top: 48px;
font-size: 0.8rem;
color: #555;
text-decoration: none;
letter-spacing: 0.06em;
text-transform: uppercase;
}
a.back:hover { color: #999; }
</style>
</head>
<body>
<h1>admin</h1>
<div class="stats">
<div class="stat-card">
<span class="stat-label">images in db</span>
<span class="stat-value">{{ pic_count }}</span>
</div>
<div class="stat-card">
<span class="stat-label">pictures folder</span>
<span class="stat-value">{{ pics_size }}</span>
</div>
<div class="stat-card">
<span class="stat-label">previews folder</span>
<span class="stat-value">{{ previews_size }}</span>
</div>
</div>
<a class="back" href="/">← back to slideshow</a>
</body>
</html>