Files
raceplaner/app/templates/pdf_template.html

56 lines
2.3 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style>
@page { size: A4; margin: 1cm; }
body { font-family: sans-serif; font-size: 9pt; color: #222; }
.header { text-align: center; border-bottom: 2px solid #3498db; padding-bottom: 10px; margin-bottom: 20px; }
table { width: 100%; border-collapse: collapse; }
th { background-color: #2c3e50; color: white; border: 0.5pt solid #1a252f; padding: 8px; text-align: left; }
td { border: 0.5pt solid #ccc; padding: 8px; vertical-align: middle; }
.col-num { width: 30pt; text-align: center; }
.col-time { width: 100pt; font-weight: bold; }
.date { font-size: 7pt; color: #666; display: block; }
.action { font-weight: bold; font-size: 8pt; }
</style>
</head>
<body>
<div class="header">
<h1>{{ title }}</h1>
<div style="font-size: 8pt;">Rennstart: {{ config.start_time.strftime('%d.%m.%Y %H:%M') }}</div>
</div>
<table>
<thead>
<tr>
<th class="col-num">#</th>
<th class="col-time">Zeitraum</th>
<th>Fahrer</th>
<th style="width: 30pt; text-align: center;">R</th>
<th style="width: 50pt;">Sprit</th>
<th style="width: 100pt;">Aktion</th>
</tr>
</thead>
<tbody>
{% for s in schedule %}
<tr>
<td class="col-num">{{ s.number }}</td>
<td class="col-time">
<span class="date">{{ s.date }}2026</span>
{{ s.start }} - {{ s.end }}
</td>
<td style="font-weight: bold;">{{ s.driver_name }}</td>
<td style="text-align: center;">{{ s.laps }}</td>
<td style="font-weight: bold; color: #27ae60;">{{ s.fuel }}L</td>
<td class="action">
{% if s.is_finish %}<span style="color: #2980b9;">ZIELANKUNFT</span>
{% elif s.change_tires %}<span style="color: #27ae60;">REIFEN &amp; SPRIT</span>
{% else %}<span style="color: #e67e22;">NUR SPRIT</span>{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</body>
</html>