From 4de47fbd8713b422ca66f38299dc2c0dac4d8507 Mon Sep 17 00:00:00 2001 From: Willem Ferguson Date: Sun, 19 Nov 2017 16:17:36 +0200 Subject: PATCH: Update the single-dive per page print template 1) Place the dive profile below the synoptic info for the dive. 2) Re-arrange the synoptic info items. 3) In the synoptic info, replace air temperature info with gas and cylinder info. 4) If any items among the the synoptic data take more than one line, the the alignment of cells in the synoptic info table is maintained. In the previous version this caused a ragged bottom edge of the synoptic info table. Signed-off-by: Willem Ferguson --- printing_templates/One Dive.html | 192 ++++++++++++++++++++++----------------- 1 file changed, 109 insertions(+), 83 deletions(-) (limited to 'printing_templates/One Dive.html') diff --git a/printing_templates/One Dive.html b/printing_templates/One Dive.html index 7f7945396..7192610d4 100644 --- a/printing_templates/One Dive.html +++ b/printing_templates/One Dive.html @@ -4,19 +4,17 @@ body { {{ print_options.grayscale }}; padding: 0; - margin: 0; + margin: 0 0 0 6%; font-size: {{ template_options.font_size }}vw; line-height: {{ template_options.line_spacing }}; font-family: {{ template_options.font }}; } h1 { - float: left; font-size: {{ template_options.font_size }}vw; } p { - float: left; font-size: {{ template_options.font_size }}vw; } @@ -26,11 +24,17 @@ border-width: {{ template_options.borderwidth }}px; border-style:solid; border-color: {{ template_options.color6 }}; + border-collapse: separate; + } + + tr { + height: 4vh; } td { - padding-left: 0.5vw; - padding-right: 0.5vw; + padding: 0; + margin: 0; + padding-left: 1%; } #body_div { @@ -38,70 +42,101 @@ } .mainContainer { - width: 98%; + width: 97%; height: 100%; - margin-left: 1%; + margin-left: 0%; margin-right: 1%; margin-top: 0%; margin-bottom: 0%; - overflow: hidden; - border-width: 0; + border-width: 1px; page-break-inside: avoid; } .innerContainer { - width: 100%; + width: 99%; height: 99%; - padding-top: 1%; - overflow: hidden; + padding-top: 0%; } .diveDetails { width: 100%; - height: 98%; - float: left; + margin: 0.0%; + } + + .dataSection { + width: 100%; + margin: 0.0% 0% 0% 0%; } .diveProfile { - width: 99%; - height: 40%; - margin: 0.5%; + width: 99.5%; + height: 45%; + margin: 0.2% 0% 0.5% 0.5%; } - .dataSection { + .notesSection { width: 100%; - height: 40%; - margin: 0%; + margin: 0.0%; + min-height: 35%; } .fieldTitle { background-color: {{ template_options.color2 }}; overflow: hidden; color: {{ template_options.color4 }}; + width: 7%; + padding-left:5px; } .fieldData { background-color: {{ template_options.color3 }}; color: {{ template_options.color5 }}; + width: 13%; + padding: o$ 1% 0% 1%; } .table_class { - float: left; - margin: 0.5%; - width: 49%; + margin: 0%; + width: 100%; } + td.insert_column_inner { + border-left-style:solid; + border-left-color: {{ template_options.color6 }}; + background-color: {{ template_options.color2 }}; + color: {{ template_options.color4 }}; + border: 5px solid black; + } + + td.insert_column_outer { + background-color: {{ template_options.color2 }}; + color: {{ template_options.color4 }}; + } + .notes_table_class { overflow: hidden; - width: 99%; - margin: 0.5%; + width: 100%; + margin: 0.0% 0% 0% 0%; + max-height: 35%; } + .notes_table_class td.fieldTitle { + max-height: 0.15vh; + } + .textArea { line-height: {{ template_options.line_spacing }}; color: {{ template_options.color5 }}; - max-height: 19vh; - overflow: hidden; + font-size: {{ template_options.font_size }}vw; + padding: 1%; + } + + td.fieldTitle b { + font-size: {{ template_options.font_size }}vw; + } + + .hidden_div { + display: none; } @@ -111,80 +146,59 @@ {% for dive in dives %}
-
-
-
-
+
- - - - - - - - -
-

Dive No.

-
-

{{ dive.number }}

-
-

Date

+ Date

{{ dive.date }}

-

Location

+ Dive No.
-

{{ dive.location }}

+

{{ dive.number }}

-

Max. depth

+ Time
-

{{ dive.depth }}

+

{{ dive.time }}

-

Duration

+ Gases
-

{{ dive.duration }}

+

{{ dive.gas }}

- - + - - - - - - -
-

Time.

+ Location
-

{{ dive.time }}

+

{{ dive.location }}

-

Air Temp.

+ Water Temp.
-

{{ dive.airTemp }}

+

{{ dive.waterTemp }}

-

Water Temp.

+ Max Depth
-

{{ dive.waterTemp }}

+

{{ dive.depth }}

-

Buddy

+ Buddy

{{ dive.buddy }}

@@ -192,36 +206,48 @@
-

Divemaster

+ Duration
-

{{ dive.divemaster }}

+

{{ dive.duration }}

- - - - - -
-

Notes

+ Dive Master
-
-

{{ dive.notes|safe }}

-
+

{{ dive.divemaster }}

-
-
-
+ +
+
+ +
+ + + + + + + + + +
+ Notes +
+

{{ dive.notes|safe }}

+
+
+ +
+ + {% endfor %} {% endblock %} - + + + -- cgit v1.2.3-70-g09d2 From 6895c0eca5550b449ee616b7d3b3c5beb8b54ab3 Mon Sep 17 00:00:00 2001 From: "Lubomir I. Ivanov" Date: Wed, 22 Nov 2017 20:58:42 +0200 Subject: printing: delete `One Dive Simple.html` and cleanup The previous commit by Willem introduced a new HTML template file which is not needed, as it was decided to override the default `One Dive.html`. This patch also include small cleanup in the new version of `One Dive.html`. Signed-off-by: Lubomir I. Ivanov --- printing_templates/One Dive Simple.html | 227 -------------------------------- printing_templates/One Dive.html | 12 +- 2 files changed, 5 insertions(+), 234 deletions(-) delete mode 100644 printing_templates/One Dive Simple.html (limited to 'printing_templates/One Dive.html') diff --git a/printing_templates/One Dive Simple.html b/printing_templates/One Dive Simple.html deleted file mode 100644 index 7f7945396..000000000 --- a/printing_templates/One Dive Simple.html +++ /dev/null @@ -1,227 +0,0 @@ - - - - - -
-{% block main_rows %} - {% for dive in dives %} -
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - -
-

Dive No.

-
-

{{ dive.number }}

-
-

Date

-
-

{{ dive.date }}

-
-

Location

-
-

{{ dive.location }}

-
-

Max. depth

-
-

{{ dive.depth }}

-
-

Duration

-
-

{{ dive.duration }}

-
- - - - - - - - - - - - - - - - - - - - - - -
-

Time.

-
-

{{ dive.time }}

-
-

Air Temp.

-
-

{{ dive.airTemp }}

-
-

Water Temp.

-
-

{{ dive.waterTemp }}

-
-

Buddy

-
-

{{ dive.buddy }}

-
-

Divemaster

-
-

{{ dive.divemaster }}

-
- - - - - - - - - -
-

Notes

-
-
-

{{ dive.notes|safe }}

-
-
-
-
-
-
- {% endfor %} -{% endblock %} -
- - diff --git a/printing_templates/One Dive.html b/printing_templates/One Dive.html index 7192610d4..a9ee00471 100644 --- a/printing_templates/One Dive.html +++ b/printing_templates/One Dive.html @@ -4,7 +4,7 @@ body { {{ print_options.grayscale }}; padding: 0; - margin: 0 0 0 6%; + margin: 0 0 0 6%; font-size: {{ template_options.font_size }}vw; line-height: {{ template_options.line_spacing }}; font-family: {{ template_options.font }}; @@ -239,15 +239,13 @@ - + - - + + {% endfor %} {% endblock %} - - - + -- cgit v1.2.3-70-g09d2