From a671df108ec48f55a805a95873dccd14c59ff152 Mon Sep 17 00:00:00 2001 From: Clay Smalley Date: Wed, 15 Jun 2022 20:51:03 -0400 Subject: [PATCH 1/2] Add shields for Brazil --- icons/shield40_br.svg | 5 ++ icons/shield40_pentagon_white_angled_2.svg | 3 + icons/shield40_pentagon_white_angled_3.svg | 3 + src/js/shield_defs.js | 71 ++++++++++++++++++---- 4 files changed, 71 insertions(+), 11 deletions(-) create mode 100644 icons/shield40_br.svg create mode 100644 icons/shield40_pentagon_white_angled_2.svg create mode 100644 icons/shield40_pentagon_white_angled_3.svg diff --git a/icons/shield40_br.svg b/icons/shield40_br.svg new file mode 100644 index 000000000..92417505f --- /dev/null +++ b/icons/shield40_br.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/icons/shield40_pentagon_white_angled_2.svg b/icons/shield40_pentagon_white_angled_2.svg new file mode 100644 index 000000000..7abffbd64 --- /dev/null +++ b/icons/shield40_pentagon_white_angled_2.svg @@ -0,0 +1,3 @@ + + + diff --git a/icons/shield40_pentagon_white_angled_3.svg b/icons/shield40_pentagon_white_angled_3.svg new file mode 100644 index 000000000..6dba6ca27 --- /dev/null +++ b/icons/shield40_pentagon_white_angled_3.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/js/shield_defs.js b/src/js/shield_defs.js index 48f70bb30..1492abefa 100644 --- a/src/js/shield_defs.js +++ b/src/js/shield_defs.js @@ -114,12 +114,6 @@ export function loadShields(shieldImages) { }, }; - let padding_pentagon = { - left: 2, - right: 2, - top: 2, - bottom: 5, - }; let pentagonShieldBlueYellow = { backgroundImage: [ shieldImages.shield40_pentagon_blue_yellow_2, @@ -127,16 +121,20 @@ export function loadShields(shieldImages) { ], textLayoutConstraint: ShieldText.ellipseTextConstraint, textColor: Color.shields.yellow, - padding: padding_pentagon, + padding: { + left: 2, + right: 2, + top: 2, + bottom: 5, + }, }; let pentagonShieldGreenWhite = { + ...pentagonShieldBlueYellow, backgroundImage: [ shieldImages.shield40_pentagon_green_white_2, shieldImages.shield40_pentagon_green_white_3, ], - textLayoutConstraint: ShieldText.ellipseTextConstraint, textColor: Color.shields.white, - padding: padding_pentagon, }; let badgeShield = { @@ -1524,13 +1522,12 @@ export function loadShields(shieldImages) { ); shields["US:NM:San_Juan:NCM"] = banneredShield( { + ...pentagonShieldBlueYellow, backgroundImage: [ shieldImages.shield40_pentagon_white_pink_2, shieldImages.shield40_pentagon_white_pink_3, ], - textLayoutConstraint: ShieldText.ellipseTextConstraint, textColor: Color.shields.pink, - padding: padding_pentagon, }, ["NCM"] ); @@ -2243,6 +2240,58 @@ export function loadShields(shieldImages) { (county) => (shields[`US:WY:${county}`] = pentagonShieldBlueYellow) ); + // South America + + shields["BR"] = { + backgroundImage: shieldImages.shield40_br, + textColor: Color.shields.black, + padding: { + left: 2, + right: 2, + top: 4, + bottom: 5, + }, + }; + [ + "AC", + "AL", + "AM", + "AP", + "BA", + "CE", + "DF", + "ES", + "GO", + "MA", + "MG", + "MS", + "MT", + "PA", + "PB", + "PE", + "PI", + "PR", + "RJ", + "RN", + "RO", + "RR", + "RS", + "SC", + "SE", + "SP", + "TO", + ].forEach( + (state) => + (shields[`BR:${state}`] = { + ...pentagonShieldBlueYellow, + backgroundImage: [ + shieldImages.shield40_pentagon_white_angled_2, + shieldImages.shield40_pentagon_white_angled_3, + ], + textColor: Color.shields.black, + }) + ); + // Asia shields["BD:national"] = roundedRectShield( Color.shields.green, From a9a2282d38155f3d230327a7223598846aba1552 Mon Sep 17 00:00:00 2001 From: Clay Smalley Date: Sun, 26 Jun 2022 21:55:15 -0400 Subject: [PATCH 2/2] Add Brazil to shield map --- doc-img/shield_map_world.svg | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/doc-img/shield_map_world.svg b/doc-img/shield_map_world.svg index 0b93815a7..d2c93276b 100644 --- a/doc-img/shield_map_world.svg +++ b/doc-img/shield_map_world.svg @@ -116,6 +116,7 @@ See the end of this file for a list of available jurisdictions and their codes. .ca, .us, +.br, .bd, .cn, .hk, @@ -127,6 +128,7 @@ See the end of this file for a list of available jurisdictions and their codes. .tw, .vn, .at, +.ax, .ba, .be, .bg, @@ -145,17 +147,17 @@ See the end of this file for a list of available jurisdictions and their codes. .md, .me, .mk, -.nl, .cw, +.nl, .pl, .pt, .ro, .rs, .ru, +.se, .si, .sk, .ua, -.xk, -.se { fill: #8250df; } +.xk { fill: #8250df; } /* Color individual borders For example, to color the border between Angola and Namibia in green, add this line in the space below: @@ -2291,4 +2293,4 @@ If overlapping claims in Antarctica are configured to be shown at the same time, .aqclgb: portion claimed by Chile and the United Kingdom .aqarcl: portion claimed by Argentina, Chile and the United Kingdom --> - + \ No newline at end of file