diff --git a/vasl_templates/webapp/data/default-template-pack/ob_vo.image.include b/vasl_templates/webapp/data/default-template-pack/ob_vo.image.include new file mode 100644 index 0000000..826ca32 --- /dev/null +++ b/vasl_templates/webapp/data/default-template-pack/ob_vo.image.include @@ -0,0 +1 @@ +{%if vo.image%} {%endif%} diff --git a/vasl_templates/webapp/data/default-template-pack/ob_vo.j2 b/vasl_templates/webapp/data/default-template-pack/ob_vo.j2 index f367680..3b7a8d1 100644 --- a/vasl_templates/webapp/data/default-template-pack/ob_vo.j2 +++ b/vasl_templates/webapp/data/default-template-pack/ob_vo.j2 @@ -6,40 +6,68 @@ td { margin: 0 ; padding: 0 ; } sup { font-size: 75% ; } -.note { margin-top: 2px ; font-size: 90% ; font-style: italic ; color: #808080 ; } +.note { font-size: 90% ; font-style: italic ; color: #808080 ; } +.capability {} .comment { font-size: 90% ; font-style: italic ; color: #404040 ; } +{# NOTE: We set a narrow width to stop lots of notes making us very wide. #}
- {%if PLAYER_FLAG%} {%endif%}{{PLAYER_NAME}} {{VO_TYPES}} + |
+ | ||
- {{vo.name}} {%if vo.elite%}Ⓔ{%endif%}
- {%if vo.image%} {%endif%} -
- {%if vo.extn_id%} ❖ {%endif%}
- {%if vo.notes%}
- {{vo.note_number}}, {{vo.notes | join(", ")}}
- {%else%}
- {{vo.note_number}}
- {%endif%}
-
- |
- {%for cap in vo.capabilities%} {{cap}} {%endfor%}
- {%for cmnt in vo.comments%} {{cmnt}} {%endfor%}
+
+{% if vo.index == 0 %}
+ | ||
+ {{INCLUDE:ob_vo.name}} + {{INCLUDE:ob_vo.image}} +{%else%} +{# NOTE: If the vehicle/ordnance name is long, put it on its own line, and the capabilities underneath. #} + | + {{INCLUDE:ob_vo.name}} + | ||
+ {{INCLUDE:ob_vo.image}}
+{%endif%}
+
+{% if vo.capabilities_len >= 5 or !vo.image %}
+{# NOTE: If there are a lot of capabilities, tuck the note number & notes under the image. #}
+{# But if there is no image, we always do this, and squeeze them in to the left of the capabilities. #}
+
+ {{INCLUDE:ob_vo.notes}}
+
+{%endif%}
+
+ |
+ {%for cap in vo.capabilities%} {{cap|nobr}} {%endfor%}
+ {%for cmnt in vo.comments%} {{cmnt}} {%endfor%}
+
+{% if vo.capabilities_len < 5 and vo.image %}
+{# NOTE: If there are only a few capabilities, let the note number & notes spread full-width. #}
+{# But if there is no image, we never do this (see above). #}
+ | ||
+ {{INCLUDE:ob_vo.notes}} +{%endif%} + {%endfor%} |