diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2015-08-15 05:22:07 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-08-15 05:22:07 -0700 |
commit | 2455a5dec70d1baa2d0009e602db6b4f19941b56 (patch) | |
tree | 49a74aed6f2186fbdf5c9b301fa353e764da3a07 /printing_templates | |
parent | 0aafa2556e6abefc54469bc7fa3e258c2ce10b51 (diff) | |
parent | f3c5699714e43e91c8ff8f66119da454b314264d (diff) | |
download | subsurface-2455a5dec70d1baa2d0009e602db6b4f19941b56.tar.gz |
Merge branch 'custom-print' of github.com:neolit123/subsurface
Diffstat (limited to 'printing_templates')
-rw-r--r-- | printing_templates/Flowlayout.html | 88 | ||||
-rw-r--r-- | printing_templates/One Dive.html | 91 | ||||
-rw-r--r-- | printing_templates/Six Dives.html | 182 | ||||
-rw-r--r-- | printing_templates/Table.html | 24 | ||||
-rw-r--r-- | printing_templates/Two Dives.html | 107 |
5 files changed, 352 insertions, 140 deletions
diff --git a/printing_templates/Flowlayout.html b/printing_templates/Flowlayout.html index a3f7951d9..2615c35a8 100644 --- a/printing_templates/Flowlayout.html +++ b/printing_templates/Flowlayout.html @@ -15,11 +15,17 @@ font-size: {{ template_options.font_size }}vw; } + p { + float: left; + font-size: {{ template_options.font_size }}vw; + } + table { -webkit-box-sizing: border-box; box-sizing: border-box; - border:max(1px, 0.1vw); + border-width: {{ template_options.borderwidth }}px; border-style:solid; + border-color: {{ template_options.color6 }}; } td { @@ -32,57 +38,59 @@ } .mainContainer { - width: 96%; - margin-left: 2%; - margin-right: 2%; + width: 100%; + margin-left: 0%; + margin-right: 0%; margin-top: 0%; - margin-bottom: 0%; + margin-bottom: 2%; overflow: hidden; border-width: 0; page-break-inside: avoid; } .innerContainer { - width: 98%; - padding: 1%; + width: 100%; + padding: 0%; overflow: hidden; } .diveDetails { - width: 98%; - -webkit-box-sizing: border-box; - box-sizing: border-box; - border:max(1px, 0.1vw); - border-style:solid; + width: 100%; float: left; } .dataSection { - width: 98%; - margin: 1%; + width: 100%; } .fieldTitle { background-color: {{ template_options.color2 }}; overflow: hidden; + color: {{ template_options.color4 }}; + } + + .fieldData { + color: {{ template_options.color5 }}; + background-color: {{ template_options.color3 }}; } .table_class { float: left; - margin: 1%; - width: 48%; + width: 49.25%; + margin: 0.5%; } .notes_table_class { overflow: hidden; - width: 98%; - margin: 1%; + width: 99%; + margin: 0.5%; } .textArea { line-height: {{ template_options.line_spacing }}; max-height: 19vh; overflow: hidden; + color: {{ template_options.color4 }}; } </style> </head> @@ -90,7 +98,7 @@ <div id="body_div"> {% block main_rows %} {% for dive in dives %} - <div class="mainContainer"> + <div class="mainContainer dontbreak"> <div class="innerContainer"> <div class="diveDetails"> <div class="dataSection"> @@ -99,39 +107,40 @@ <td class="fieldTitle"> <h1> Dive No. </h1> </td> - <td> - <h1> {{ dive.number }} </h1> + <td class="fieldData"> + <p> {{ dive.number }} </p> </td> </tr> <tr> <td class="fieldTitle"> <h1> Date </h1> </td> - <td><h1> {{ dive.date }} </h1> + <td class="fieldData"> + <p> {{ dive.date }} </p> </td> </tr> <tr> <td class="fieldTitle"> <h1> Location </h1> </td> - <td> - <h1> {{ dive.location }} </h1> + <td class="fieldData"> + <p> {{ dive.location }} </p> </td> </tr> <tr> <td class="fieldTitle"> <h1> Max depth </h1> </td> - <td> - <h1> {{ dive.depth }} </h1> + <td class="fieldData"> + <p> {{ dive.depth }} </p> </td> </tr> <tr> <td class="fieldTitle"> <h1> Duration </h1> </td> - <td> - <h1> {{ dive.duration }} </h1> + <td class="fieldData"> + <p> {{ dive.duration }} </p> </td> </tr> </tbody></table> @@ -140,39 +149,40 @@ <td class="fieldTitle"> <h1> Time. </h1> </td> - <td> - <h1> {{ dive.time }} </h1> + <td class="fieldData"> + <p> {{ dive.time }} </p> </td> </tr> <tr> <td class="fieldTitle"> <h1> Air Temp. </h1> </td> - <td><h1> {{ dive.airTemp }} </h1> + <td class="fieldData"> + <p> {{ dive.airTemp }} </p> </td> </tr> <tr> <td class="fieldTitle"> <h1> Water Temp. </h1> </td> - <td> - <h1> {{ dive.waterTemp }} </h1> + <td class="fieldData"> + <p> {{ dive.waterTemp }} </p> </td> </tr> <tr> <td class="fieldTitle"> <h1> Buddy </h1> </td> - <td> - <h1> {{ dive.buddy }} </h1> + <td class="fieldData"> + <p> {{ dive.buddy }} </p> </td> </tr> <tr> <td class="fieldTitle"> <h1> Dive Master </h1> </td> - <td> - <h1> {{ dive.divemaster }} </h1> + <td class="fieldData"> + <p> {{ dive.divemaster }} </p> </td> </tr> </tbody> @@ -185,9 +195,9 @@ </td> </tr> <tr> - <td> + <td class="fieldData"> <div class="textArea"> - <h1> {{ dive.notes }} </h1> + <p> {{ dive.notes }} </p> </div> </td> </tr> diff --git a/printing_templates/One Dive.html b/printing_templates/One Dive.html index 40c02b395..020c67b30 100644 --- a/printing_templates/One Dive.html +++ b/printing_templates/One Dive.html @@ -15,11 +15,17 @@ font-size: {{ template_options.font_size }}vw; } + p { + float: left; + font-size: {{ template_options.font_size }}vw; + } + table { -webkit-box-sizing: border-box; box-sizing: border-box; - border:max(1px, 0.1vw); + border-width: {{ template_options.borderwidth }}px; border-style:solid; + border-color: {{ template_options.color6 }}; } td { @@ -32,10 +38,10 @@ } .mainContainer { - width: 96%; + width: 98%; height: 100%; - margin-left: 2%; - margin-right: 2%; + margin-left: 1%; + margin-right: 1%; margin-top: 0%; margin-bottom: 0%; overflow: hidden; @@ -44,53 +50,56 @@ } .innerContainer { - width: 98%; - height: 98%; - padding: 1%; + width: 100%; + height: 99%; + padding-top: 1%; overflow: hidden; } .diveDetails { - width: 98%; + width: 100%; height: 98%; - -webkit-box-sizing: border-box; - box-sizing: border-box; - border:max(1px, 0.1vw); - border-style:solid; float: left; } .diveProfile { - width: 96%; + width: 99%; height: 40%; - margin: 2%; + margin: 0.5%; } .dataSection { - width: 98%; + width: 100%; height: 40%; - margin: 1%; + margin: 0%; } .fieldTitle { background-color: {{ template_options.color2 }}; overflow: hidden; + color: {{ template_options.color4 }}; + } + + .fieldData { + background-color: {{ template_options.color3 }}; + color: {{ template_options.color5 }}; } .table_class { float: left; - margin: 1%; - width: 48%; + margin: 0.5%; + width: 49%; } .notes_table_class { overflow: hidden; - width: 98%; - margin: 1%; + width: 99%; + margin: 0.5%; } .textArea { line-height: {{ template_options.line_spacing }}; + color: {{ template_options.color5 }}; max-height: 19vh; overflow: hidden; } @@ -111,39 +120,40 @@ <td class="fieldTitle"> <h1> Dive No. </h1> </td> - <td> - <h1> {{ dive.number }} </h1> + <td class="fieldData"> + <p> {{ dive.number }} </p> </td> </tr> <tr> <td class="fieldTitle"> <h1> Date </h1> </td> - <td><h1> {{ dive.date }} </h1> + <td class="fieldData"> + <p> {{ dive.date }} </p> </td> </tr> <tr> <td class="fieldTitle"> <h1> Location </h1> </td> - <td> - <h1> {{ dive.location }} </h1> + <td class="fieldData"> + <p> {{ dive.location }} </p> </td> </tr> <tr> <td class="fieldTitle"> <h1> Max depth </h1> </td> - <td> - <h1> {{ dive.depth }} </h1> + <td class="fieldData"> + <p> {{ dive.depth }} </p> </td> </tr> <tr> <td class="fieldTitle"> <h1> Duration </h1> </td> - <td> - <h1> {{ dive.duration }} </h1> + <td class="fieldData"> + <p> {{ dive.duration }} </p> </td> </tr> </tbody></table> @@ -152,39 +162,40 @@ <td class="fieldTitle"> <h1> Time. </h1> </td> - <td> - <h1> {{ dive.time }} </h1> + <td class="fieldData"> + <p> {{ dive.time }} </p> </td> </tr> <tr> <td class="fieldTitle"> <h1> Air Temp. </h1> </td> - <td><h1> {{ dive.airTemp }} </h1> + <td class="fieldData"> + <p> {{ dive.airTemp }} </p> </td> </tr> <tr> <td class="fieldTitle"> <h1> Water Temp. </h1> </td> - <td> - <h1> {{ dive.waterTemp }} </h1> + <td class="fieldData"> + <p> {{ dive.waterTemp }} </p> </td> </tr> <tr> <td class="fieldTitle"> <h1> Buddy </h1> </td> - <td> - <h1> {{ dive.buddy }} </h1> + <td class="fieldData"> + <p> {{ dive.buddy }} </p> </td> </tr> <tr> <td class="fieldTitle"> <h1> Dive Master </h1> </td> - <td> - <h1> {{ dive.divemaster }} </h1> + <td class="fieldData"> + <p> {{ dive.divemaster }} </p> </td> </tr> </tbody> @@ -197,9 +208,9 @@ </td> </tr> <tr> - <td> + <td class="fieldData"> <div class="textArea"> - <h1> {{ dive.notes }} </h1> + <p> {{ dive.notes }} </p> </div> </td> </tr> diff --git a/printing_templates/Six Dives.html b/printing_templates/Six Dives.html new file mode 100644 index 000000000..3f2c7b95e --- /dev/null +++ b/printing_templates/Six Dives.html @@ -0,0 +1,182 @@ +<html> +<head> + <style> + body { + {{ print_options.grayscale }}; + padding: 0px; + margin: 0px; + font-size: {{ template_options.font_size }}vw; + line-height: {{ template_options.line_spacing }}; + font-family: {{ template_options.font }}; + color: {{ template_options.color4 }}; + } + + h1 { + font-size: {{ template_options.font_size }}vw; + float: left; + margin: 0px; + } + + p { + font-size: {{ template_options.font_size }}vw; + float: left; + margin: 0px; + } + + td { + margin:0px; + } + + #footer { + height: 100%; + width: 100%; + float: left; + } + + #body_div { + background-color: {{ template_options.color1 }}; + float: left; + } + + .mainContainer { + width: 50%; + height: 33.333333%; + margin-left: 0%; + margin-right: 0%; + margin-top: 0; + margin-bottom: 0; + overflow: hidden; + page-break-inside: avoid; + float: left; + } + + .innerContainer { + height: 99%; + width: 98%; + padding-left: 1%; + padding-right: 1%; + padding-top: 1%; + overflow: hidden; + } + + .table_class { + overflow: hidden; + width: 100%; + margin: 0%; + float: left; + -webkit-box-sizing: border-box; + box-sizing: border-box; + border-width: {{ template_options.borderwidth }}px; + border-style:solid; + border-color: {{ template_options.color6 }}; + font-size: {{ template_options.font_size }}vw; + background-color: {{ template_options.color3 }}; + color: {{ template_options.color4 }}; + } + + .notes_table_class { + overflow: hidden; + max-width: 100%; + min-width: 100%; + margin: 0.5%; + float: left; + } + + .diveProfile { + width: 100%; + height: 95%; + margin-left: 0%; + margin-right: 0%; + margin-bottom: 0%; + margin-top: 0%; + float: right; + } + + .diveDetails { + width: 100%; + float: left; + } + + .dataPart { + height: 45%; + max-height: 60%; + } + + .dataSection{ + width: 100%; + } + + .textArea { + overflow: hidden !important; + text-overflow: ellipsis; + line-height: {{ template_options.line_spacing }}; + } + </style> +</head> +<body data-numberofdives = 6> +<div id="body_div"> +{% block main_rows %} + {% for dive in dives %} + <div class="mainContainer"> + <div class="innerContainer"> + <div class="diveDetails"> + <div class="dataPart"> + <div class="diveProfile" id="dive_{{ dive.id }}"> + </div> + <div class="dataSection"> + <table style="float:left;width:100%;"> + <tr> + <td> + <h1> Dive # {{ dive.number }} - {{ dive.date }} {{ dive.time }}</h1> + <p style="float:right;"> Max depth: {{ dive.depth }} </p> + </td> + </tr> + <tr> + <td> + <p> {{ dive.location }} </p> + <p style="float:right;"> Duration: {{ dive.duration }} </p> + </td> + </tr> + </table> + <table class="table_class"> + <tr> + <td> Gas used: {{ dive.gas }}</td> + <td> Tags: {{ dive.tags }}</td> + <td> SAC: {{ dive.sac }}</td> + </tr> + <tr> + <td> Divemaster: {{ dive.divemaster }}</td> + <td> Buddy: {{ dive.buddy }}</td> + <td> Rating: {{ dive.rating }}/5</td> + </tr> + </table> + </div> + </div> + <div class="notesPart"> + <table class="notes_table_class"> + <tbody> + <tr> + <td> + <p> Notes: </p> + </td> + </tr> + <tr> + <td> + <div class="textArea"> + <p> {{ dive.notes }} </p> + </div> + </td> + </tr> + </tbody> + </table> + </div> + </div> + </div> + </div> + {% endfor %} +{% endblock %} +<div id="footer"> +</div> +</div> +</body> +</html> diff --git a/printing_templates/Table.html b/printing_templates/Table.html index c97267405..e4d921fae 100644 --- a/printing_templates/Table.html +++ b/printing_templates/Table.html @@ -21,6 +21,11 @@ -webkit-column-break-inside: avoid; padding-top: 1vh; padding-bottom: 1vh; + -webkit-box-sizing: border-box; + box-sizing: border-box; + border-width: {{ template_options.borderwidth }}px; + border-style:solid; + border-color: {{ template_options.color6 }}; } #body_div { @@ -28,10 +33,10 @@ } .mainContainer { - width: 96%; + width: 99%; height: 100%; - margin-left: 2%; - margin-right: 2%; + margin-left: 0.5%; + margin-right: 0.5%; margin-top: 0%; margin-bottom: 0%; overflow: hidden; @@ -41,13 +46,8 @@ .table_class { overflow: hidden; - width: 97%; - margin: 1.5%; - -webkit-box-sizing: border-box; - box-sizing: border-box; - border:max(0.1vw, 1px); - border-style:solid; - border-color: color: {{ template_options.color5 }}; + width: 100%; + margin: 0%; } </style> @@ -55,7 +55,7 @@ <body data-numberofdives = 0> <div id="body_div"> <table class="table_class"> - <tr style="background-color: {{ template_options.color2 }}; color: {{ template_options.color3 }}"> + <tr style="background-color: {{ template_options.color2 }}; color: {{ template_options.color4 }}"> <th>Dive #</th> <th>Date</th> <th>Time</th> @@ -66,7 +66,7 @@ </tr> {% block main_rows %} {% for dive in dives %} - <tr style="color: {{ template_options.color4 }}"> + <tr class="dontbreak" style="background-color: {{ template_options.color3 }}; color: {{ template_options.color5 }};"> <th>{{ dive.number }}</th> <th>{{ dive.date }}</th> <th>{{ dive.time }}</th> diff --git a/printing_templates/Two Dives.html b/printing_templates/Two Dives.html index 5dba74303..95cc9a088 100644 --- a/printing_templates/Two Dives.html +++ b/printing_templates/Two Dives.html @@ -15,15 +15,20 @@ float: left; } + p { + font-size: {{ template_options.font_size }}vw; + float: left; + } + #body_div { background-color: {{ template_options.color1 }}; } .mainContainer { - width: 96%; + width: 99%; height: 50%; - margin-left: 2%; - margin-right: 2%; + margin-left: 0.5%; + margin-right: 0.5%; margin-top: 0; margin-bottom: 0; overflow: hidden; @@ -32,68 +37,70 @@ .innerContainer { height: 85%; - padding: 0.5%; margin-top: 1%; margin-bottom: 1%; overflow: hidden; - -webkit-box-sizing: border-box; - box-sizing: border-box; - border:max(0.1vw, 1px); - border-style:solid; } .table_class { overflow: hidden; - max-width: 25%; - min-width: 25%; + width: 25%; + height: 99%; margin: 0.5%; float: left; -webkit-box-sizing: border-box; box-sizing: border-box; - border:max(0.1vw, 1px); + border-width: {{ template_options.borderwidth }}px; border-style:solid; + border-color: {{ template_options.color6 }}; } .notes_table_class { overflow: hidden; - max-width: 100%; - min-width: 100%; + width: 99%; margin: 0.5%; - float: left; -webkit-box-sizing: border-box; box-sizing: border-box; - border:max(0.1vw, 1px); + border-width: {{ template_options.borderwidth }}px; border-style:solid; + border-color: {{ template_options.color6 }}; } .fieldTitle { background-color: {{ template_options.color2 }}; - overflow: hidden; - padding:0; + color: {{ template_options.color4 }}; + padding-left: 2%; + } + + .fieldData { + color: {{ template_options.color5 }}; + background-color: {{ template_options.color3 }}; + padding-left: 2%; } .diveProfile { - width: 48%; - height: 95%; - margin-left: 0%; - margin-right: 0%; - margin-bottom: 0%; - margin-top: 0.5%; - float: right; + float: left; + height: 99%; + width: 47%; + margin: 0.5%; } .diveDetails { - width: 98.5%; + width: 100%; float: left; } .dataPart { - height: 45%; - max-height: 60%; + height: 64%; + padding-bottom: 1%; + width: 100%; + float: left; } .notesPart { height: 35%; + width: 100%; + float: left; } .textArea { @@ -122,39 +129,40 @@ <td class="fieldTitle"> <h1> Dive No. </h1> </td> - <td> - <h1> {{ dive.number }} </h1> + <td class="fieldData"> + <p> {{ dive.number }} </p> </td> </tr> <tr> <td class="fieldTitle"> <h1> Date </h1> </td> - <td><h1> {{ dive.date }} </h1> + <td class="fieldData"> + <p> {{ dive.date }} </p> </td> </tr> <tr> <td class="fieldTitle"> <h1> Location </h1> </td> - <td> - <h1> {{ dive.location }} </h1> + <td class="fieldData"> + <p> {{ dive.location }} </p> </td> </tr> <tr> <td class="fieldTitle"> <h1> Max depth </h1> </td> - <td> - <h1> {{ dive.depth }} </h1> + <td class="fieldData"> + <p> {{ dive.depth }} </p> </td> </tr> <tr> <td class="fieldTitle"> <h1> Duration </h1> </td> - <td> - <h1> {{ dive.duration }} </h1> + <td class="fieldData"> + <p> {{ dive.duration }} </p> </td> </tr> </tbody></table> @@ -163,39 +171,40 @@ <td class="fieldTitle"> <h1> Time. </h1> </td> - <td> - <h1> {{ dive.time }} </h1> + <td class="fieldData"> + <p> {{ dive.time }} </p> </td> </tr> <tr> <td class="fieldTitle"> <h1> Air Temp. </h1> </td> - <td><h1> {{ dive.airTemp }} </h1> + <td class="fieldData"> + <p> {{ dive.airTemp }} </p> </td> </tr> <tr> <td class="fieldTitle"> <h1> Water Temp. </h1> </td> - <td> - <h1> {{ dive.waterTemp }} </h1> + <td class="fieldData"> + <p> {{ dive.waterTemp }} </p> </td> </tr> <tr> <td class="fieldTitle"> <h1> Buddy </h1> </td> - <td> - <h1> {{ dive.buddy }} </h1> + <td class="fieldData"> + <p> {{ dive.buddy }} </p> </td> </tr> <tr> <td class="fieldTitle"> <h1> Dive Master </h1> </td> - <td> - <h1> {{ dive.divemaster }} </h1> + <td class="fieldData"> + <p> {{ dive.divemaster }} </p> </td> </tr> </tbody></table> @@ -205,14 +214,14 @@ <div class="notesPart"> <table class="notes_table_class"> <tbody><tr> - <td class="fieldTitle"> + <td style="padding-left:1%" class="fieldTitle"> <h1> Notes </h1> </td> </tr> <tr> - <td> + <td class="fieldData"> <div class="textArea"> - <h1> {{ dive.notes }} </h1> + <p> {{ dive.notes }} </p> </div> </td> </tr> @@ -224,7 +233,7 @@ {% endfor %} {% endblock %} <div id="footer"> -<div> +</div> </div> </body> </html> |