Skip to content

Commit

Permalink
Merge pull request #192 from ZeLonewolf/1ec5-cn
Browse files Browse the repository at this point in the history
PRC and Hong Kong shields
  • Loading branch information
ZeLonewolf authored Feb 25, 2022
2 parents 3b273ba + cc9c77a commit afbb684
Show file tree
Hide file tree
Showing 8 changed files with 131 additions and 0 deletions.
6 changes: 6 additions & 0 deletions style/icons/shield40_cn_national_expressway_2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions style/icons/shield40_cn_national_expressway_3.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions style/icons/shield40_cn_national_expressway_4.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions style/icons/shield40_cn_regional_expressway_2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions style/icons/shield40_cn_regional_expressway_3.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions style/icons/shield40_cn_regional_expressway_4.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions style/icons/shield40_hk.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
91 changes: 91 additions & 0 deletions style/js/shield_defs.js
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,97 @@ export function loadShields(shieldImages) {
shields["US:WA:Alternate"] = banneredShield(shields["US:WA"], ["ALT"]);

// Asia
shields["CN:national"] = roundedRectShield(
"#bf2033",
"white",
"white",
2,
1,
null
);
shields["CN:expressway"] = {
backgroundImage: [
shieldImages.shield40_cn_national_expressway_2,
shieldImages.shield40_cn_national_expressway_3,
shieldImages.shield40_cn_national_expressway_4,
],
textColor: "white",
padding: {
left: 2,
right: 2,
top: 6,
bottom: 2,
},
};
[
"AH",
"BJ",
"CQ",
"FJ",
"GD",
"GS",
"GX",
"GZ",
"HA",
"HB",
"HE",
"HI",
"HL",
"HN",
"JL",
"JS",
"JX",
"LN",
"NM",
"NX",
"QH",
"SC",
"SD",
"SH",
"SN",
"SX",
"TJ",
"XJ",
"XZ",
"YN",
"ZJ",
].forEach((province) => {
shields[`CN:${province}`] = roundedRectShield(
"#ffcd00",
"black",
"black",
2,
1,
null
);
shields[`CN:${province}:expressway`] = {
backgroundImage: [
shieldImages.shield40_cn_regional_expressway_2,
shieldImages.shield40_cn_regional_expressway_3,
shieldImages.shield40_cn_regional_expressway_4,
],
textColor: "white",
padding: {
left: 2,
right: 2,
top: 6,
bottom: 2,
},
};
});

shields["HK"] = {
backgroundImage: shieldImages.shield40_hk,
textLayoutConstraint: ShieldText.southHalfellipseTextConstraint,
textColor: "black",
padding: {
left: 1,
right: 1,
top: 1,
bottom: 12,
},
};

shields["TW:freeway"] = {
backgroundImage: shieldImages.shield40_tw_freeway,
textLayoutConstraint: ShieldText.ellipseTextConstraint,
Expand Down

0 comments on commit afbb684

Please sign in to comment.