Files
steel-training/templates/pdf_template_shootoff.html
2024-09-30 20:04:28 +02:00

166 lines
6.0 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Steel Training - Shootoff - {{ distance }} m
- {{ 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: dodgerblue;
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;
bottom: 30%;
}
</style>
</head>
<body>
<div class="page-break">
<h1>Steel Training</h1>
<h2>Shootoff</h2>
<div class="preview">
{% for i in range(target_count) %}
{% if i == target_count-1 %}
<div class="post preview-post"
style="width: {{ preview_scale * 150}}mm; height: {{ preview_scale * 550 }}mm; left: {{i * preview_scale * 1000}}mm">
<div class="target circle" style="
width: {{ preview_scale * 300 }}mm;
height: {{ preview_scale * 300 }}mm;
bottom: {{ (preview_scale * 550) - ((preview_scale * 300)/2) }}mm;
right: {{ (preview_scale * (300/2)) - (preview_scale * 150 * 1.5) }}mm;
">
</div>
</div>
{% else %}
<div class="post preview-post"
style="width: {{ preview_scale * 100}}mm; height: {{ preview_scale * 360 }}mm; left: {{i * preview_scale * 1000}}mm">
<div class="target circle" style="
width: {{ preview_scale * 200 }}mm;
height: {{ preview_scale * 200 }}mm;
bottom: {{ (preview_scale * 360) - ((preview_scale * 200)/2) }}mm;
right: {{ (preview_scale * (200/2)) - (preview_scale * 100 * 1.5) }}mm;
">
</div>
</div>
{% endif %}
{% endfor %}
</div>
<p>{%trans%}Wall length required{%endtrans%}: {{ wall_length|round(1,'ceil') }}cm</p>
<p>{%trans%}Distance from wall{%endtrans%}: {{ distance }}m</p>
<p>{%trans%}Stage preparation{%endtrans%}:</p>
<ul>
<li>{%trans%}Place the first target with the 'ZERO point' marker on the left or right side of the wall{%endtrans%}</li>
<li>{%trans%}Set shooting box{%endtrans%} {{ box_position|round(1,'ceil') }}cm {%trans%}from 'ZERO' point (along the wall) and{%endtrans%} {{distance}}m {%trans%}from the wall{%endtrans%}</li>
<li>{%trans%}Ensure that the starting field is positioned in a convenient location within the room, so that nothing obstructs the drawing and aiming at targets across the entire width of the wall{%endtrans%}</li>
<li>{%trans%}If necessary, adjust the first target along with the ZERO point and repeat the two previous steps{%endtrans%}</li>
<li>{%trans%}Place the remaining targets on the wall according to the distances indicated on the position markers at the bottom of each target. Ensure that all targets are aligned in a single line parallel to the ground{%endtrans%}</li>
</ul>
</div>
{% for i in range(target_count) %}
<div class="page-break">
<div class="content">
{% if i == target_count-1 %}
<div class="post"
style="width: {{ scale * 150}}mm; height: {{ scale * 550 }}mm;">
<div class="target circle" style="
width: {{ scale * 300 }}mm;
height: {{ scale * 300 }}mm;
bottom: {{ (scale * 550) - ((scale * 300)/2) }}mm;
right: {{ (scale * (300/2)) - (scale * 150 * 1.5) }}mm;
">
</div>
</div>
{% else %}
<div class="post"
style="width: {{ scale * 100}}mm; height: {{ scale * 360 }}mm;">
<div class="target circle" style="
width: {{ scale * 200 }}mm;
height: {{ scale * 200 }}mm;
bottom: {{ (scale * 360) - ((scale * 200)/2) }}mm;
right: {{ (scale * (200/2)) - (scale * 100 * 1.5) }}mm;
">
</div>
</div>
{% endif %}
{% if i==0 %}
<div class="mounting-info">{%trans%}ZERO point{%endtrans%} (Shootoff)</div>
{% else %}
<div class="mounting-info">{{ i * gap|round(1,'ceil') }}cm {%trans%}from ZERO point{%endtrans%} (Shootoff)</div>
{% endif %}
<div class="mounting-point"></div>
</div>
</div>
{% endfor %}
</body>
</html>