2024-01-07 18:05:55 +01:00

108 lines
2.9 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<style>
@media print,
screen {
body {
width: 210mm;
height: 297mm;
margin: 0mm 0mm 0mm 0mm;
padding: 0;
}
.page {
width: 210mm;
height: 297mm;
display: flex;
flex-wrap: wrap;
page-break-after: always;
}
.day {
width: 50%;
height: 50%;
box-sizing: border-box;
position: relative;
}
.circle {
width: 10mm;
height: 10mm;
position: absolute;
border-radius: 50%;
border: 1px solid black;
background-color: transparent;
}
.circle.top-left {
top: 10mm;
left: 10mm;
}
.circle.top-right {
top: 10mm;
right: 10mm;
}
.image-container {
margin-top: 28mm;
text-align: center;
height: 60mm;
}
.image-container img {
max-width: 100%;
max-height: 60mm;
height: auto;
width: auto;
object-fit: contain;
}
.date-info {
text-align: center;
font-family: Arial, Helvetica, sans-serif;
}
.text {
padding-left: 5mm;
padding-right: 5mm;
font-family: 'Courier New', Courier, monospace;
color: #666666;
}
}
</style>
</head>
<body>
{% for page in pages %}
<div class="page">
{% for day in page %}
<div class="day" style="{{ 'border-right: 1px dashed grey; border-bottom: 1px dashed grey;' if loop.index0 == 0 else '' }}
{{ 'border-bottom: 1px dashed grey;' if loop.index0 == 1 else '' }}
{{ 'border-right: 1px dashed grey;' if loop.index0 == 2 else '' }}">
<div class="circle top-left"></div>
<div class="circle top-right"></div>
<div class="image-container">
{% if day.image_file %}
<img src="{{ url_for('static', filename=day.image_file) }}" alt="Bild für {{ day.date.strftime('%d. %B %Y') }}" />
{% endif %}
</div>
<div class="date-info">
<h1>{{ day.date.strftime('%A %d.%m.%Y') }}</h1>
</div>
<div class="text">
{% if day.text_content %}
<p>{{ day.text_content }}</p>
{% endif %}
</div>
</div>
{% endfor %}
</div>
{% endfor %}
</body>
</html>