aboutsummaryrefslogtreecommitdiffstats
path: root/printing_templates
diff options
context:
space:
mode:
authorGravatar Gehad elrobey <gehadelrobey@gmail.com>2015-07-23 15:19:53 +0200
committerGravatar Lubomir I. Ivanov <neolit123@gmail.com>2015-07-28 11:37:05 +0300
commitc6116b0269c6ec8adee2832f1812d1cf8f8e6e70 (patch)
tree5ace4ff34977fff9a47d33ccfe8026da254dd342 /printing_templates
parent75e736a66b4ed5fa502e06a5ed7e02690981165e (diff)
downloadsubsurface-c6116b0269c6ec8adee2832f1812d1cf8f8e6e70.tar.gz
Printing: add a "Table" template
The "Table" template shows a simple table of user dives. The fields shown are: Dive number, Date, Time, Depth, Duration, Master and Location. Other fields can be added by the user. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Diffstat (limited to 'printing_templates')
-rw-r--r--printing_templates/table.html83
1 files changed, 83 insertions, 0 deletions
diff --git a/printing_templates/table.html b/printing_templates/table.html
new file mode 100644
index 000000000..c97267405
--- /dev/null
+++ b/printing_templates/table.html
@@ -0,0 +1,83 @@
+<html>
+<head>
+ <style>
+ body {
+ {{ print_options.grayscale }};
+ padding: 0;
+ margin: 0;
+ 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;
+ }
+
+ th {
+ font-size: {{ template_options.font_size }}vw;
+ page-break-inside: avoid;
+ -webkit-column-break-inside: avoid;
+ padding-top: 1vh;
+ padding-bottom: 1vh;
+ }
+
+ #body_div {
+ background-color: {{ template_options.color1 }};
+ }
+
+ .mainContainer {
+ width: 96%;
+ height: 100%;
+ margin-left: 2%;
+ margin-right: 2%;
+ margin-top: 0%;
+ margin-bottom: 0%;
+ overflow: hidden;
+ border-width: 0;
+ page-break-inside: avoid;
+ }
+
+ .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 }};
+ }
+
+ </style>
+</head>
+<body data-numberofdives = 0>
+<div id="body_div">
+<table class="table_class">
+ <tr style="background-color: {{ template_options.color2 }}; color: {{ template_options.color3 }}">
+ <th>Dive #</th>
+ <th>Date</th>
+ <th>Time</th>
+ <th>Depth</th>
+ <th>Duration</th>
+ <th>Master</th>
+ <th>Location</th>
+ </tr>
+{% block main_rows %}
+ {% for dive in dives %}
+ <tr style="color: {{ template_options.color4 }}">
+ <th>{{ dive.number }}</th>
+ <th>{{ dive.date }}</th>
+ <th>{{ dive.time }}</th>
+ <th>{{ dive.depth }}</th>
+ <th>{{ dive.duration }}</th>
+ <th>{{ dive.divemaster }}</th>
+ <th>{{ dive.location }}</th>
+ </tr>
+ {% endfor %}
+{% endblock %}
+</table>
+</div>
+</body>
+</html>