2025-07-18 13:56:38 +01:00
|
|
|
{% extends "base.html" %}
|
2025-05-15 09:16:09 +01:00
|
|
|
|
2025-07-18 13:56:38 +01:00
|
|
|
{% block title %}AI Image of the Day{% endblock %}
|
2025-05-15 09:16:09 +01:00
|
|
|
|
2025-07-18 13:56:38 +01:00
|
|
|
{% block head %}
|
|
|
|
<style>
|
2025-03-28 18:37:58 +00:00
|
|
|
body {
|
|
|
|
display: flex;
|
2025-04-24 22:15:13 +01:00
|
|
|
flex-direction: column;
|
2025-03-28 18:37:58 +00:00
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
|
|
|
height: 100vh;
|
2025-05-27 18:41:46 +01:00
|
|
|
position: relative;
|
2025-06-06 12:28:39 +01:00
|
|
|
padding-top: 20px;
|
|
|
|
padding-bottom: 20px;
|
2025-04-24 22:15:13 +01:00
|
|
|
}
|
2025-05-15 09:16:09 +01:00
|
|
|
|
2025-04-24 22:15:13 +01:00
|
|
|
.image-container {
|
|
|
|
max-width: 90vw;
|
|
|
|
max-height: 80vh;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
|
|
|
margin-bottom: 20px;
|
2025-03-28 18:37:58 +00:00
|
|
|
}
|
2025-05-15 09:16:09 +01:00
|
|
|
|
2025-03-28 18:37:58 +00:00
|
|
|
img {
|
2025-04-24 22:15:13 +01:00
|
|
|
max-width: 100%;
|
|
|
|
max-height: 100%;
|
2025-03-28 18:37:58 +00:00
|
|
|
object-fit: contain;
|
2025-04-24 22:15:13 +01:00
|
|
|
border-radius: 20px;
|
|
|
|
box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
|
|
|
|
}
|
2025-05-15 09:16:09 +01:00
|
|
|
|
2025-04-24 22:15:13 +01:00
|
|
|
.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;
|
2025-05-27 18:41:46 +01:00
|
|
|
max-height: 30vh;
|
|
|
|
overflow-y: auto;
|
2025-03-28 18:37:58 +00:00
|
|
|
}
|
2025-05-15 09:16:09 +01:00
|
|
|
|
|
|
|
.button-group {
|
|
|
|
display: flex;
|
|
|
|
gap: 20px;
|
|
|
|
margin-top: 15px;
|
|
|
|
justify-content: center;
|
|
|
|
}
|
|
|
|
|
2025-06-04 10:03:44 +01:00
|
|
|
@media (max-width: 768px) {
|
|
|
|
.image-container {
|
|
|
|
max-width: 100vw;
|
|
|
|
max-height: 50vh;
|
|
|
|
}
|
|
|
|
|
|
|
|
img {
|
|
|
|
max-width: 100%;
|
|
|
|
max-height: 100%;
|
|
|
|
}
|
|
|
|
|
|
|
|
.prompt {
|
|
|
|
max-height: 20vh;
|
|
|
|
font-size: 14px;
|
|
|
|
padding: 10px 15px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.button-group {
|
|
|
|
flex-direction: column;
|
|
|
|
gap: 10px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.button-link {
|
|
|
|
font-size: 14px;
|
|
|
|
padding: 8px 16px;
|
|
|
|
}
|
|
|
|
}
|
2025-03-28 18:37:58 +00:00
|
|
|
</style>
|
2025-07-18 13:56:38 +01:00
|
|
|
{% endblock %}
|
2025-05-15 09:16:09 +01:00
|
|
|
|
2025-07-18 13:56:38 +01:00
|
|
|
{% block content %}
|
2025-03-28 18:37:58 +00:00
|
|
|
{% if image %}
|
2025-05-15 09:16:09 +01:00
|
|
|
<div class="image-container">
|
2025-06-24 13:01:39 +01:00
|
|
|
<img src="{{ url_for('image_routes.serve_image', filename=image) }}" alt="Latest Image" />
|
2025-05-15 09:16:09 +01:00
|
|
|
</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 %}
|
2025-03-28 18:37:58 +00:00
|
|
|
{% else %}
|
2025-05-15 09:16:09 +01:00
|
|
|
<p>No images found</p>
|
2025-03-28 18:37:58 +00:00
|
|
|
{% endif %}
|
2025-07-18 13:56:38 +01:00
|
|
|
{% endblock %}
|
2025-05-17 11:34:13 +01:00
|
|
|
|
2025-07-18 13:56:38 +01:00
|
|
|
{% block scripts %}
|
|
|
|
<script>
|
|
|
|
setInterval(() => {
|
|
|
|
location.reload();
|
|
|
|
}, {{ reload_interval }}); // Refresh every X ms
|
|
|
|
</script>
|
|
|
|
{% endblock %}
|