mirror of
https://gitlab.com/wgp/dougal/software.git
synced 2025-12-06 09:47:08 +00:00
Update default sequence HTML template
This commit is contained in:
@@ -6,13 +6,17 @@
|
||||
<style>
|
||||
|
||||
@media print {
|
||||
html, table {
|
||||
body, html, table {
|
||||
font-size: 10px !important;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
tr.aside {
|
||||
font-size: 8px !important;
|
||||
}
|
||||
}
|
||||
|
||||
html {
|
||||
@@ -66,22 +70,26 @@ main {
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
|
||||
table#summary td:nth-of-type(1) {
|
||||
table.summary td:nth-of-type(1) {
|
||||
text-align: right;
|
||||
padding-inline-start: 1em;
|
||||
}
|
||||
|
||||
table#summary td:nth-of-type(2) {
|
||||
table.summary td:nth-of-type(2) {
|
||||
font-size: smaller;
|
||||
vertical-align: middle;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
#comments {
|
||||
.comments {
|
||||
margin-top: 1em;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
div.sequence:not(:nth-of-type(1)) {
|
||||
break-before: page;
|
||||
}
|
||||
|
||||
.comment {
|
||||
margin: 0.5em 2em;
|
||||
border: thin solid lightgray;
|
||||
@@ -95,19 +103,74 @@ table#summary td:nth-of-type(2) {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
table#events th,
|
||||
table#events td {
|
||||
table.events th,
|
||||
table.events td {
|
||||
padding: 4pt 8pt;
|
||||
}
|
||||
|
||||
table#events tr > td:nth-of-type(1) {
|
||||
table.events tr > td:nth-of-type(1) {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
table#events tr > td:nth-of-type(3) {
|
||||
table.events tr > td:nth-of-type(3) {
|
||||
min-width: 20ex;
|
||||
}
|
||||
|
||||
/*
|
||||
* In this section we deal with equipment
|
||||
*/
|
||||
|
||||
|
||||
div.equipment-details {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
column-gap: 2em;
|
||||
row-gap: 2em;
|
||||
}
|
||||
|
||||
/* Bug in Firefox: causes the content to overlap
|
||||
|
||||
div.equipment-details table {
|
||||
break-inside: avoid;
|
||||
}
|
||||
*/
|
||||
/* So we try this instead */
|
||||
div.equipment {
|
||||
break-inside: avoid;
|
||||
}
|
||||
|
||||
table.equipment {
|
||||
margin-bottom: 2em;
|
||||
font-size: 80%;
|
||||
}
|
||||
|
||||
table.equipment thead {
|
||||
border-bottom: 1px solid darkgray;
|
||||
}
|
||||
|
||||
table.equipment tbody + tbody::before {
|
||||
content: "";
|
||||
display: table-row;
|
||||
height: 1.2em;
|
||||
}
|
||||
|
||||
table.equipment tr.aside {
|
||||
font-size: small;
|
||||
color: gray;
|
||||
}
|
||||
|
||||
/*
|
||||
Get rid of Markdown-induced paragraph spacing
|
||||
while respecting inter-paragraph margins.
|
||||
*/
|
||||
table.equipment p:nth-of-type(1) {
|
||||
margin-top: 0;
|
||||
}
|
||||
table.equipment p:nth-last-of-type(1) {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
footer {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
@@ -135,9 +198,10 @@ footer {
|
||||
{% for Sequence in Sequences %}
|
||||
{% set Begin = Sequence.Entries | find("EntryTypeId", 3000) %}
|
||||
{% set End = Sequence.Entries | find("EntryTypeId", 3007) %}
|
||||
<div class="sequence" id="sequence-{{ Sequence.SequenceNumber |padStart(3, "0") }}">
|
||||
<h2>Sequence {{ Sequence.SequenceNumber |padStart(3, "0") }} ({{Begin.LineType}}{% if End.IsNTBP %} – NTBP{% endif %})</h2>
|
||||
|
||||
<table id="summary">
|
||||
<table class="summary">
|
||||
<tr>
|
||||
<th>Line</th>
|
||||
<td>{{Sequence.DglSailline}}</td>
|
||||
@@ -181,7 +245,7 @@ footer {
|
||||
|
||||
{% if Begin.Reshoot %}Reshoot{% endif -%}
|
||||
|
||||
<div id="comments">
|
||||
<div class="comments">
|
||||
<h3>Sequence comments</h3>
|
||||
|
||||
{% for Comment in Sequence.DglSequenceComments %}
|
||||
@@ -191,10 +255,10 @@ footer {
|
||||
{% if not Sequence.DglSequenceComments %}<div class="nocomment">(Nil)</div>{% endif %}
|
||||
</div>
|
||||
|
||||
<div id="events">
|
||||
<div class="events">
|
||||
<h3>Events</h3>
|
||||
|
||||
<table id="events">
|
||||
<table class="events">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Shotpoint</th>
|
||||
@@ -209,13 +273,54 @@ footer {
|
||||
<td>{{ Entry.ShotPointId }}</td>
|
||||
<td>{{Entry.Time |timestamp}}</td>
|
||||
<td>{{Entry.EntryType |join("<br/>")}}</td>
|
||||
<td>{{Entry.Comment |join("<br/>")}}</td>
|
||||
<td>{{Entry.Comment |unique |join("<br/>")}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div> <!-- events -->
|
||||
|
||||
{% if Sequence.DglEquipmentInfo.length %}
|
||||
<div class="equipment">
|
||||
<h3>Equipment Info</h3>
|
||||
|
||||
<div class="equipment-details">
|
||||
{% for kind, items in Sequence.DglEquipmentInfo |sort(false, false, "kind") | groupby("kind") %}
|
||||
<div> <!-- Needed because flex -->
|
||||
<table class="equipment">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2">{{kind}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% for item in items |sort(true, false, "tstamp") %}
|
||||
<tbody>
|
||||
{% if item.description %}
|
||||
<tr>
|
||||
<td colspan="2">{{item.description |markdown}}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% for attr in item.attributes %}
|
||||
<tr>
|
||||
<th>{{attr.key}}</th>
|
||||
<td>{{attr.value |markdownInline}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
<tr class="aside">
|
||||
<td>Last update:</td>
|
||||
<td>{{item.tstamp.substring(0,10)}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div> <!-- Needed because flex -->
|
||||
{% endfor %}
|
||||
</div> <!-- equipment-details -->
|
||||
|
||||
</div> <!-- equipment -->
|
||||
{% endif %}
|
||||
|
||||
</div> <!-- sequence -->
|
||||
{% endfor %}
|
||||
|
||||
</main>
|
||||
|
||||
Reference in New Issue
Block a user