Show a larger flag in label headings that use a larger font.

master
Pacman Ghost 3 years ago
parent 540f770b3a
commit da5ced479f
  1. 2
      vasl_templates/webapp/data/default-template-pack/atmm-romanian.j2
  2. 2
      vasl_templates/webapp/data/default-template-pack/atmm.j2
  3. 2
      vasl_templates/webapp/data/default-template-pack/baz-cpva16.j2
  4. 2
      vasl_templates/webapp/data/default-template-pack/baz-cpva17.j2
  5. 2
      vasl_templates/webapp/data/default-template-pack/baz.j2
  6. 2
      vasl_templates/webapp/data/default-template-pack/baz45.j2
  7. 2
      vasl_templates/webapp/data/default-template-pack/baz50.j2
  8. 2
      vasl_templates/webapp/data/default-template-pack/extras/kgs/grenade-bundles.j2
  9. 2
      vasl_templates/webapp/data/default-template-pack/extras/kgs/molotov-cocktails.j2
  10. 2
      vasl_templates/webapp/data/default-template-pack/mol-p.j2
  11. 2
      vasl_templates/webapp/data/default-template-pack/mol.j2
  12. 2
      vasl_templates/webapp/data/default-template-pack/nat_caps.j2
  13. 2
      vasl_templates/webapp/data/default-template-pack/ob_ma_notes.j2
  14. 2
      vasl_templates/webapp/data/default-template-pack/ob_vo.j2
  15. 2
      vasl_templates/webapp/data/default-template-pack/ob_vo_note.j2
  16. 2
      vasl_templates/webapp/data/default-template-pack/pf-finnish.j2
  17. 2
      vasl_templates/webapp/data/default-template-pack/pf-hungarian.j2
  18. 2
      vasl_templates/webapp/data/default-template-pack/pf-romanian.j2
  19. 2
      vasl_templates/webapp/data/default-template-pack/pf.j2
  20. 2
      vasl_templates/webapp/data/default-template-pack/piat.j2
  21. 2
      vasl_templates/webapp/data/default-template-pack/player_flag_large.include
  22. 2
      vasl_templates/webapp/data/default-template-pack/psk.j2
  23. 2
      vasl_templates/webapp/data/default-template-pack/thh.j2
  24. 4
      vasl_templates/webapp/snippets.py
  25. BIN
      vasl_templates/webapp/static/images/flags/american.png
  26. BIN
      vasl_templates/webapp/static/images/flags/anzac.png
  27. BIN
      vasl_templates/webapp/static/images/flags/belgian.png
  28. BIN
      vasl_templates/webapp/static/images/flags/british.png
  29. BIN
      vasl_templates/webapp/static/images/flags/british~canadian.png
  30. BIN
      vasl_templates/webapp/static/images/flags/british~newzealand.png
  31. BIN
      vasl_templates/webapp/static/images/flags/bulgarian.png
  32. BIN
      vasl_templates/webapp/static/images/flags/burmese.png
  33. BIN
      vasl_templates/webapp/static/images/flags/chinese.png
  34. BIN
      vasl_templates/webapp/static/images/flags/chinese~gmd.png
  35. BIN
      vasl_templates/webapp/static/images/flags/croatian.png
  36. BIN
      vasl_templates/webapp/static/images/flags/danish.png
  37. BIN
      vasl_templates/webapp/static/images/flags/dutch.png
  38. BIN
      vasl_templates/webapp/static/images/flags/filipino.png
  39. BIN
      vasl_templates/webapp/static/images/flags/finnish.png
  40. BIN
      vasl_templates/webapp/static/images/flags/free-french.png
  41. BIN
      vasl_templates/webapp/static/images/flags/french.png
  42. BIN
      vasl_templates/webapp/static/images/flags/german.png
  43. BIN
      vasl_templates/webapp/static/images/flags/greek.png
  44. BIN
      vasl_templates/webapp/static/images/flags/hungarian.png
  45. BIN
      vasl_templates/webapp/static/images/flags/indonesian.png
  46. BIN
      vasl_templates/webapp/static/images/flags/italian.png
  47. BIN
      vasl_templates/webapp/static/images/flags/japanese.png
  48. BIN
      vasl_templates/webapp/static/images/flags/kfw-cpva.png
  49. BIN
      vasl_templates/webapp/static/images/flags/kfw-kpa.png
  50. BIN
      vasl_templates/webapp/static/images/flags/kfw-ounc.png
  51. BIN
      vasl_templates/webapp/static/images/flags/kfw-rok.png
  52. BIN
      vasl_templates/webapp/static/images/flags/polish.png
  53. BIN
      vasl_templates/webapp/static/images/flags/romanian.png
  54. BIN
      vasl_templates/webapp/static/images/flags/russian.png
  55. BIN
      vasl_templates/webapp/static/images/flags/slovakian.png
  56. BIN
      vasl_templates/webapp/static/images/flags/thai.png
  57. BIN
      vasl_templates/webapp/static/images/flags/yugoslavian.png
  58. 5
      vasl_templates/webapp/static/snippets.js

@ -14,7 +14,7 @@
padding: 2px 5px ;
font-size: 105% ; font-weight: bold ;
">
{{INCLUDE:player_flag}}Anti-Tank Magnetic Mines
{{INCLUDE:player_flag_large}}Anti-Tank Magnetic Mines
<tr>
<td style="padding:2px 5px;">

@ -14,7 +14,7 @@
padding: 2px 5px ;
font-size: 105% ; font-weight: bold ;
">
{{INCLUDE:player_flag}}Anti-Tank Magnetic Mines
{{INCLUDE:player_flag_large}}Anti-Tank Magnetic Mines
<tr>
<td style="padding:2px 5px;">

@ -16,7 +16,7 @@
padding: 2px 5px ;
font-size: 105% ; font-weight: bold ;
">
{{INCLUDE:player_flag}}Bazooka '44
{{INCLUDE:player_flag_large}}Bazooka '44
<tr>

@ -16,7 +16,7 @@
padding: 2px 5px ;
font-size: 105% ; font-weight: bold ;
">
{{INCLUDE:player_flag}}Bazooka Type 51
{{INCLUDE:player_flag_large}}Bazooka Type 51
<tr>

@ -16,7 +16,7 @@
padding: 2px 5px ;
font-size: 105% ; font-weight: bold ;
">
{{INCLUDE:player_flag}}Bazooka {%if BAZ_TYPE%} ('{{BAZ_TYPE}}) {%endif%}
{{INCLUDE:player_flag_large}}Bazooka {%if BAZ_TYPE%} ('{{BAZ_TYPE}}) {%endif%}
<tr>

@ -16,7 +16,7 @@
padding: 2px 5px ;
font-size: 105% ; font-weight: bold ;
">
{{INCLUDE:player_flag}}Bazooka '45
{{INCLUDE:player_flag_large}}Bazooka '45
<tr>

@ -16,7 +16,7 @@
padding: 2px 5px ;
font-size: 105% ; font-weight: bold ;
">
{{INCLUDE:player_flag}}Bazooka '50
{{INCLUDE:player_flag_large}}Bazooka '50
<tr>

@ -18,7 +18,7 @@
font-size: 105% ; font-weight: bold ;
">
{# Some versions of Java require <img> tags to have the width and height specified!?! #}
{%if PLAYER_FLAGS["german"]%}<img src="{{PLAYER_FLAGS["german"]}}" {{PLAYER_FLAG_SIZE}}>&nbsp;{%endif%}Grenade Bundles
{%if PLAYER_FLAGS["german"]%}<img src="{{PLAYER_FLAGS["german"]}}" {{PLAYER_FLAG_SIZE_LARGE}}>&nbsp;{%endif%}Grenade Bundles
<tr>
<td style="padding:3px 5px 0 5px;">

@ -18,7 +18,7 @@
font-size: 105% ; font-weight: bold ;
">
{# Some versions of Java require <img> tags to have the width and height specified!?! #}
{%if PLAYER_FLAGS["german"]%}<img src="{{PLAYER_FLAGS["german"]}}" {{PLAYER_FLAG_SIZE}}>&nbsp;{%endif%}Molotov Cocktails
{%if PLAYER_FLAGS["german"]%}<img src="{{PLAYER_FLAGS["german"]}}" {{PLAYER_FLAG_SIZE_LARGE}}>&nbsp;{%endif%}Molotov Cocktails
<tr>
<td style="padding:3px 5px 0 5px;">

@ -16,7 +16,7 @@
padding: 2px 5px ;
font-size: 105% ; font-weight: bold ;
">
{{INCLUDE:player_flag}}MOL Projector
{{INCLUDE:player_flag_large}}MOL Projector
<tr>

@ -16,7 +16,7 @@
padding: 2px 5px ;
font-size: 105% ; font-weight: bold ;
">
{{INCLUDE:player_flag}}Molotov Cocktail
{{INCLUDE:player_flag_large}}Molotov Cocktail
<tr>
<td style="padding:0 5px;">

@ -17,7 +17,7 @@ span.comment { font-size: 85% ; font-style: italic ; color: #404040 ; }
border-bottom: 1px solid {{OB_COLOR_2}} ;
font-size: 105% ; font-weight: bold ;
">
<nobr>{{INCLUDE:player_flag}}{{PLAYER_NAME|nbsp}}&nbsp;Capabilities</nobr>
<nobr>{{INCLUDE:player_flag_large}}{{PLAYER_NAME|nbsp}}&nbsp;Capabilities</nobr>
<tr> <td>

@ -33,7 +33,7 @@
padding: 2px 5px ;
font-size: 105% ; font-weight: bold ;
">
{{INCLUDE:player_flag}}{{PLAYER_NAME}} {{VO_TYPE}} Notes
{{INCLUDE:player_flag_large}}{{PLAYER_NAME}} {{VO_TYPE}} Notes
{%if OB_MA_NOTES%}
<tr> <td style="padding:0 5px;">

@ -26,7 +26,7 @@
white-space: nowrap ;
">
{# CSS "white-space:nowrap" doesn't always work in VASSAL, we need to use <nobr> and &nbsp; here :-/ #}
<nobr>{{INCLUDE:player_flag}}{{PLAYER_NAME|nbsp}}&nbsp;{{VO_TYPES}}</nobr>
<nobr>{{INCLUDE:player_flag_large}}{{PLAYER_NAME|nbsp}}&nbsp;{{VO_TYPES}}</nobr>
{%for vo in OB_VO%}

@ -17,7 +17,7 @@
padding: 2px 5px ;
font-size: 105% ; font-weight: bold ;
">
{{INCLUDE:player_flag}}{{VO_NAME}}
{{INCLUDE:player_flag_large}}{{VO_NAME}}
<tr>
<td style="padding-top:2px;"> {{VO_NOTE_HTML}}

@ -14,7 +14,7 @@
padding: 2px 5px ;
font-size: 105% ; font-weight: bold ;
">
{{INCLUDE:player_flag}}Panzerfaust
{{INCLUDE:player_flag_large}}Panzerfaust
<tr>

@ -14,7 +14,7 @@
padding: 2px 5px ;
font-size: 105% ; font-weight: bold ;
">
{{INCLUDE:player_flag}}Panzerfaust
{{INCLUDE:player_flag_large}}Panzerfaust
<tr>

@ -14,7 +14,7 @@
padding: 2px 5px ;
font-size: 105% ; font-weight: bold ;
">
{{INCLUDE:player_flag}}Panzerfaust
{{INCLUDE:player_flag_large}}Panzerfaust
<tr>

@ -14,7 +14,7 @@
padding: 2px 5px ;
font-size: 105% ; font-weight: bold ;
">
{{INCLUDE:player_flag}}Panzerfaust
{{INCLUDE:player_flag_large}}Panzerfaust
<tr>

@ -14,7 +14,7 @@
padding: 2px 5px ;
font-size: 105% ; font-weight: bold ;
">
{{INCLUDE:player_flag}}PIAT
{{INCLUDE:player_flag_large}}PIAT
<tr>

@ -0,0 +1,2 @@
{# Some versions of Java require <img> tags to have the width and height specified!?! #}
{%if PLAYER_FLAG%}<img src="{{PLAYER_FLAG}}" {{PLAYER_FLAG_SIZE_LARGE}}>&nbsp;{%endif%}

@ -14,7 +14,7 @@
padding: 2px 5px ;
font-size: 105% ; font-weight: bold ;
">
{{INCLUDE:player_flag}}Panzerschrek
{{INCLUDE:player_flag_large}}Panzerschrek
<tr>

@ -14,7 +14,7 @@
padding: 2px 5px ;
font-size: 105% ; font-weight: bold ;
">
{{INCLUDE:player_flag}}Tank-Hunter Heroes
{{INCLUDE:player_flag_large}}Tank-Hunter Heroes
<tr>

@ -194,7 +194,9 @@ def get_flag( nat ):
if not re.search( "^[-a-z~]+$", nat ):
abort( 404 )
key = "flags:{}".format( nat )
height = app.config.get( "DEFAULT_FLAG_HEIGHT", 11 )
# NOTE: Most of the flags are at the larger size, so we default to that size (since we get better results
# doing that, and scaling down to the smaller size as needed, rather than the other way around).
height = app.config.get( "DEFAULT_FLAG_HEIGHT", 13 )
# check if a custom flag has been configured
if globvars.template_pack:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.5 KiB

After

Width:  |  Height:  |  Size: 615 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 708 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 589 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 698 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 432 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 698 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 607 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 363 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.8 KiB

After

Width:  |  Height:  |  Size: 608 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 697 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 607 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 589 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 589 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.1 KiB

After

Width:  |  Height:  |  Size: 566 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.7 KiB

After

Width:  |  Height:  |  Size: 485 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 705 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.6 KiB

After

Width:  |  Height:  |  Size: 691 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 589 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 607 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 321 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 637 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 579 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 487 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 548 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 703 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.9 KiB

After

Width:  |  Height:  |  Size: 577 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 572 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 607 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.7 KiB

After

Width:  |  Height:  |  Size: 618 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 644 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.1 KiB

After

Width:  |  Height:  |  Size: 302 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 589 B

@ -138,6 +138,11 @@ function make_snippet( $btn, params, extra_params, show_date_warnings )
params.CUSTOM_LIST_BULLETS = true ;
// some versions of Java require <img> tags to have the width and height specified!?!
params.PLAYER_FLAG_SIZE = "width='11' height='11'" ;
// FUDGE! A lot of labels use a larger font for their heading (e.g. V/O notes, PF, ATMM, etc.) and so
// we would like to show a larger flag to match, or at least vertically center the flag. This would be
// trivial to do with CSS, but VASSAL's HTML engine can't handle it, so we have to manually force
// the flag to render at a larger size >:-/
params.PLAYER_FLAG_SIZE_LARGE = "width='13' height='13'" ;
// set player-specific parameters
var player_no ;

Loading…
Cancel
Save