Files
steel-training/templates/pdf_template_shootoff.html
2024-10-06 14:12:41 +02:00

147 lines
4.9 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;
text-align: center;
}
.preview-post {
position: absolute;
bottom: 30%;
}
</style>
</head>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-RSHB28K5EM"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-RSHB28K5EM');
</script>
<body>
<div class="page-break">
<h1>Steel Training</h1>
<h2>Shootoff</h2>
<div class="preview">
{% for i in range(target_count) %}
<div style="margin: 20mm {{preview_scale*25}}cm 0 {{preview_scale*25}}cm; display: inline-block;">
{% if i == target_count-1 %}
{% with target_width=preview_scale * 30, target_height=preview_scale * 85 %}
{% include 'popper_svg.html' %}
{% endwith %}
{% else %}
{% with target_width=preview_scale * 20, target_height=preview_scale * 56 %}
{% include 'popper_svg.html' %}
{% endwith %}
{% endif %}
</div>
{% 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 %}
{% with target_width=scale * 30, target_height=scale * 85 %}
{% include 'popper_svg.html' %}
{% endwith %}
{% else %}
{% with target_width=scale * 20, target_height=scale * 56 %}
{% include 'popper_svg.html' %}
{% endwith %}
{% 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%}
{% if i > 1%}
{%trans%}or{%endtrans%} {{gap|round(1,'ceil')}}cm {%trans%}from previous marker{%endtrans%}
{% endif %}
(Shootoff)</div>
{% endif %}
<div class="mounting-point"></div>
</div>
</div>
{% endfor %}
</body>
</html>