Files
steel-training/templates/pdf_template.html
2024-09-14 12:59:33 +02:00

124 lines
4.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>Paper Challenge - {{ stage.split('_') | map('capitalize') | join(' ') }} - {{ distance }} cm
- {{ size|capitalize }}</title>
<style>
@page {
size: {{ size }};
margin: 5mm;
}
body {
font-family: sans-serif;
}
.target {
background-color: dodgerblue;
position: absolute;
}
.circle {
border-radius: 50%;
}
.post {
margin: auto;
background-color: black;
position: relative;
}
.stop-plate {
background-color: red !important;
}
.page-break {
page-break-after: always;
}
.content {
position: absolute;
bottom: 0;
left: 0;
right: 0;
}
.mounting-point {
height: 10mm;
width: 0.5mm;
background-color: #ccc;
margin: auto;
}
.mounting-info {
font-size: xx-small;
color: #ccc;
text-align: center;
}
.preview {
position: relative;
display: block;
border-bottom: solid 1px black;
border-top: solid 1px black;
width: 100%;
height: 75mm;
}
.preview-post {
position: absolute;
}
</style>
</head>
<body>
<div class="page-break">
<h1>Paper Challenge</h1>
<h2>{{ stage.split('_') | map('capitalize') | join(' ') }}</h2>
<div class="preview">
{% for target in preview_target_info %}
<div class="post preview-post {% if target.stop_plate %} stop-plate {% endif %}"
style="top: {{ 50 - target.post_height }}mm; left: {{ target.position + 3 }}mm; width: {{ target.post_width }}mm; height: {{ target.height }}mm;">
<div class="target {% if target.width == target.height %} circle {% endif %}"
style="width: {{ target.width }}mm; height: {{ target.height }}mm;
bottom: {{(target.height/2) }}mm;
right: {{ (target.post_width/2) - (target.width/2)}}mm;"></div>
</div>
{% endfor %}
</div>
<p>Wymagana długość ściany: {{ wall_length/10 }}cm</p>
<p>Odległość od ściany: {{ distance|round(1,'ceil') }}cm</p>
<p>Przygotowanie toru:</p>
<ul>
<li>Umieść z lewej strony ściany pierwszy cel ze znacznikiem "punkt ZERO"</li>
<li>Wyznacz pole startowe {{ box_position }}cm od punktu "zero" (wzdłuż ściany) oraz w odległości {{distance}}cm od ściany</li>
<li>Upewnij się, że pole startowe znjaduje się w dogodnym miejscu, pomieszczenia, tak aby nic nie przeszkazdało
w swobodnym dobyciu i składaniu do celów na całej szerokości ściany
</li>
<li>W razie potrzeby dostosuj pierwszy cel wraz z punktem ZERO i powtórz dwa powyższe kroki</li>
<li>Umieść na ścianie pozostałe cele zgodnie z odległościami podanymi na znacznikach pozycji na dole każdego celu. Upewnij się, że wszystkie cele są umieszczone w jednej linii równoległej do podłoża</li>
</ul>
</div>
{% for target in target_info %}
<div class="page-break">
<div class="content">
<div class="post {% if target.stop_plate %} stop-plate {% endif %}" style="width: {{ target.post_width }}mm; height: {{ target.post_height }}mm;">
<div class="target {% if target.width == target.height %} circle {% endif %}"
style="
width: {{ target.width }}mm;
height: {{ target.height }}mm;
bottom: {{ target.post_height - (target.height/2) }}mm;
right: {{ (target.post_width/2) - (target.width/2)}}mm;
">
</div>
</div>
{% if target.target == 't1' %}
<div class="mounting-info">punkt ZERO ({{ stage.split('_') | map('capitalize') | join(' ') }})</div>
{% else %}
<div class="mounting-info">{{ target.position / 10 }}cm od punktu ZERO ({{ stage.split('_') | map('capitalize') | join(' ') }})</div>
{% endif %}
<div class="mounting-point"></div>
</div>
</div>
{% endfor %}
</body>
</html>