2025-05-15 09:16:09 +01:00

100 lines
2.5 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>AI Image of the Day</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100vh;
background: black;
color: white;
font-family: Arial, sans-serif;
}
.image-container {
max-width: 90vw;
max-height: 80vh;
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 20px;
}
img {
max-width: 100%;
max-height: 100%;
object-fit: contain;
border-radius: 20px;
box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}
.prompt {
color: #ccc;
font-family: monospace;
white-space: pre-wrap;
background: rgba(0, 0, 0, 0.6);
padding: 15px 20px;
border-radius: 10px;
max-width: 80vw;
text-align: left;
}
.button-group {
display: flex;
gap: 20px;
margin-top: 15px;
justify-content: center;
}
.button-link {
background: #333;
color: white;
text-decoration: none;
padding: 10px 20px;
border-radius: 8px;
font-size: 16px;
cursor: pointer;
transition: background 0.3s;
display: inline-block;
text-align: center;
}
.button-link:hover {
background: #555;
}
</style>
<script>
setInterval(() => {
location.reload();
}, {{ reload_interval }}); // Refresh every X ms
</script>
</head>
<body>
{% if image %}
<div class="image-container">
<img src="{{ url_for('images', filename=image) }}" alt="Latest Image">
</div>
{% if prompt %}
<div class="prompt">{{ prompt }}</div>
<div class="button-group">
<a href="/images" class="button-link">Archive</a>
<a href="/create_image" class="button-link">Create Image</a>
</div>
{% endif %}
{% else %}
<p>No images found</p>
{% endif %}
</body>