diff --git a/app.py b/app.py index e0ba360..87d2c1e 100644 --- a/app.py +++ b/app.py @@ -222,6 +222,7 @@ def generate_pdf_ipsc(): preview_size = 15 if size == 'a3' else 10 preview_scale = preview_size /target_line box_position = target_line / 2 + preview_margin=preview_scale * IPSC_TARGET_WIDTH/2 rendered_html = render_template( 'pdf_template_ipsc.html', @@ -231,9 +232,10 @@ def generate_pdf_ipsc(): target_height=scale * IPSC_TARGET_HEIGHT, target_width=scale * IPSC_TARGET_WIDTH, gap=scale * IPSC_GAP + scale * IPSC_TARGET_WIDTH, - preview_margin=(wall_extra_space_for_paper - preview_size) / 2, - scale=scale, - preview_scale=preview_scale, + preview_target_height=preview_scale * IPSC_TARGET_HEIGHT, + preview_target_width=preview_scale * IPSC_TARGET_WIDTH, + preview_margin=preview_margin, + preview_gap=preview_scale * IPSC_GAP + preview_margin, box_position=box_position ) # return rendered_html diff --git a/static/images/a3.png b/static/images/a3.png deleted file mode 100644 index e8ed670..0000000 Binary files a/static/images/a3.png and /dev/null differ diff --git a/static/images/a3.webp b/static/images/a3.webp new file mode 100644 index 0000000..3a97425 Binary files /dev/null and b/static/images/a3.webp differ diff --git a/static/images/a4.png b/static/images/a4.png deleted file mode 100644 index befded3..0000000 Binary files a/static/images/a4.png and /dev/null differ diff --git a/static/images/a4.webp b/static/images/a4.webp new file mode 100644 index 0000000..9a521d1 Binary files /dev/null and b/static/images/a4.webp differ diff --git a/static/images/accelerator.png b/static/images/accelerator.png deleted file mode 100644 index 9d570e3..0000000 Binary files a/static/images/accelerator.png and /dev/null differ diff --git a/static/images/accelerator.webp b/static/images/accelerator.webp new file mode 100644 index 0000000..7574019 Binary files /dev/null and b/static/images/accelerator.webp differ diff --git a/static/images/el_presidente_preview.webp b/static/images/el_presidente_preview.webp new file mode 100644 index 0000000..746b515 Binary files /dev/null and b/static/images/el_presidente_preview.webp differ diff --git a/static/images/five_to_go.png b/static/images/five_to_go.png deleted file mode 100644 index d6d4d53..0000000 Binary files a/static/images/five_to_go.png and /dev/null differ diff --git a/static/images/five_to_go.webp b/static/images/five_to_go.webp new file mode 100644 index 0000000..ded039c Binary files /dev/null and b/static/images/five_to_go.webp differ diff --git a/static/images/floor.png b/static/images/floor.png deleted file mode 100644 index 6bacc24..0000000 Binary files a/static/images/floor.png and /dev/null differ diff --git a/static/images/floor.webp b/static/images/floor.webp new file mode 100644 index 0000000..a259a4a Binary files /dev/null and b/static/images/floor.webp differ diff --git a/static/images/ipsc.png b/static/images/ipsc.png deleted file mode 100644 index a6aa04b..0000000 Binary files a/static/images/ipsc.png and /dev/null differ diff --git a/static/images/ipsc.svg b/static/images/ipsc.svg deleted file mode 100644 index baf564b..0000000 --- a/static/images/ipsc.svg +++ /dev/null @@ -1,9 +0,0 @@ - - ipsc-svg - - - - - - \ No newline at end of file diff --git a/static/images/ipsc_preview.png b/static/images/ipsc_preview.png deleted file mode 100644 index f189547..0000000 Binary files a/static/images/ipsc_preview.png and /dev/null differ diff --git a/static/images/ipsc_preview.webp b/static/images/ipsc_preview.webp new file mode 100644 index 0000000..77affd0 Binary files /dev/null and b/static/images/ipsc_preview.webp differ diff --git a/static/images/pendulum.png b/static/images/pendulum.png deleted file mode 100644 index 7cf9432..0000000 Binary files a/static/images/pendulum.png and /dev/null differ diff --git a/static/images/pendulum.webp b/static/images/pendulum.webp new file mode 100644 index 0000000..cbf9df6 Binary files /dev/null and b/static/images/pendulum.webp differ diff --git a/static/images/roundabout.png b/static/images/roundabout.png deleted file mode 100644 index 8983127..0000000 Binary files a/static/images/roundabout.png and /dev/null differ diff --git a/static/images/roundabout.webp b/static/images/roundabout.webp new file mode 100644 index 0000000..b6c947f Binary files /dev/null and b/static/images/roundabout.webp differ diff --git a/static/images/shootoff.png b/static/images/shootoff.png deleted file mode 100644 index fb43625..0000000 Binary files a/static/images/shootoff.png and /dev/null differ diff --git a/static/images/shootoff.webp b/static/images/shootoff.webp new file mode 100644 index 0000000..4d01bb0 Binary files /dev/null and b/static/images/shootoff.webp differ diff --git a/static/images/showdown_left.png b/static/images/showdown_left.png deleted file mode 100644 index 4ab36da..0000000 Binary files a/static/images/showdown_left.png and /dev/null differ diff --git a/static/images/showdown_left.webp b/static/images/showdown_left.webp new file mode 100644 index 0000000..6d19f9f Binary files /dev/null and b/static/images/showdown_left.webp differ diff --git a/static/images/showdown_right.png b/static/images/showdown_right.png deleted file mode 100644 index c0b4f67..0000000 Binary files a/static/images/showdown_right.png and /dev/null differ diff --git a/static/images/showdown_right.webp b/static/images/showdown_right.webp new file mode 100644 index 0000000..a4d5567 Binary files /dev/null and b/static/images/showdown_right.webp differ diff --git a/static/images/smoke_and_hope.png b/static/images/smoke_and_hope.png deleted file mode 100644 index 02ad13b..0000000 Binary files a/static/images/smoke_and_hope.png and /dev/null differ diff --git a/static/images/smoke_and_hope.webp b/static/images/smoke_and_hope.webp new file mode 100644 index 0000000..ede2694 Binary files /dev/null and b/static/images/smoke_and_hope.webp differ diff --git a/static/images/speed_option.png b/static/images/speed_option.png deleted file mode 100644 index afad10a..0000000 Binary files a/static/images/speed_option.png and /dev/null differ diff --git a/static/images/speed_option.webp b/static/images/speed_option.webp new file mode 100644 index 0000000..d953b7c Binary files /dev/null and b/static/images/speed_option.webp differ diff --git a/static/images/wall.png b/static/images/wall.png deleted file mode 100644 index f72e260..0000000 Binary files a/static/images/wall.png and /dev/null differ diff --git a/static/images/wall.webp b/static/images/wall.webp new file mode 100644 index 0000000..976a0fb Binary files /dev/null and b/static/images/wall.webp differ diff --git a/templates/ipsc.html b/templates/ipsc.html index 4aeac3f..37a8efe 100644 --- a/templates/ipsc.html +++ b/templates/ipsc.html @@ -1,13 +1,15 @@ {% extends "base.html" %} {% block title %}IPSC - El Presidente{% endblock %} {% block content %} + +
{% include 'setup.html' %}

IPSC - El Presidente

- IPSC - El Presidente + IPSC - El Presidente
diff --git a/templates/pdf_template_ipsc.html b/templates/pdf_template_ipsc.html index f902dd5..5ba4b31 100644 --- a/templates/pdf_template_ipsc.html +++ b/templates/pdf_template_ipsc.html @@ -57,14 +57,6 @@ position: absolute; bottom: 30%; } - .preview-img { - width: {{target_width*preview_scale}}cm; - height: {{target_height*preview_scale}}cm; - } - .img { - width: {{target_width}}cm; - height: {{target_height}}cm; - } @@ -72,15 +64,17 @@

Paper Challenge

IPSC - El Presidente

-
{% for i in range(3) %} -
- IPSC - El Presidente +
+ + + + +
{% endfor %}
-

Wymagana długość ściany: {{ wall_length|round(1,'ceil') }}cm

Odległość od ściany: {{ distance|round(1,'ceil') }}cm

Przygotowanie toru:

@@ -100,9 +94,11 @@ {% for i in range(3) %}
-
- IPSC - El Presidente -
+ + + + + {% if i==0 %}
punkt ZERO (El Presidente)
diff --git a/templates/sc.html b/templates/sc.html index 8a036f7..87f16e9 100644 --- a/templates/sc.html +++ b/templates/sc.html @@ -11,14 +11,14 @@
@@ -26,7 +26,7 @@
@@ -34,35 +34,35 @@
diff --git a/templates/setup.html b/templates/setup.html index f2d74eb..76caa5a 100644 --- a/templates/setup.html +++ b/templates/setup.html @@ -3,14 +3,14 @@
@@ -26,13 +26,13 @@
diff --git a/templates/shootoff.html b/templates/shootoff.html index b20e06a..207beaa 100644 --- a/templates/shootoff.html +++ b/templates/shootoff.html @@ -8,7 +8,7 @@

Shootoff

- Shootoff + Shootoff