Skip to content

Commit

Permalink
homepage map fix
Browse files Browse the repository at this point in the history
  • Loading branch information
codecalm committed Feb 19, 2022
1 parent 8acc19d commit 25568ba
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 6 deletions.
3 changes: 2 additions & 1 deletion src/pages/_data/libs.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"litepicker": "litepicker/dist/litepicker.js",
"tom-select": "tom-select/dist/js/tom-select.base.min.js",
"jsvectormap": "jsvectormap/dist/js/jsvectormap.min.js",
"jsvectormap-world": "jsvectormap/dist/maps/world-merc.js"
"jsvectormap-world": "jsvectormap/dist/maps/world.js",
"jsvectormap-world-merc": "jsvectormap/dist/maps/world-merc.js"
},
"css": {
"mapbox": "https://api.mapbox.com/mapbox-gl-js/v1.8.0/mapbox-gl.css"
Expand Down
6 changes: 6 additions & 0 deletions src/pages/_data/maps-vector.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
world:
title: World map
map: world
color: blue
values: '{ "AF": 16, "AL": 11, "DZ": 158, "AO": 85, "AG": 1, "AR": 351, "AM": 8, "AU": 1219, "AT": 366, "AZ": 52, "BS": 7, "BH": 21, "BD": 105, "BB": 3, "BY": 52, "BE": 461, "BZ": 1, "BJ": 6, "BT": 1, "BO": 19, "BA": 16, "BW": 12, "BR": 2023, "BN": 11, "BG": 44, "BF": 8, "BI": 1, "KH": 11, "CM": 21, "CA": 1563, "CV": 1, "CF": 2, "TD": 7, "CL": 199, "CN": 5745, "CO": 283, "KM": 0, "CD": 12, "CG": 11, "CR": 35, "CI": 22, "HR": 59, "CY": 22, "CZ": 195, "DK": 304, "DJ": 1, "DM": 0, "DO": 50, "EC": 61, "EG": 216, "SV": 21, "GQ": 14, "ER": 2, "EE": 19, "ET": 30, "FJ": 3, "FI": 231, "FR": 2555, "GA": 12, "GM": 1, "GE": 11, "DE": 3305, "GH": 18, "GR": 305, "GD": 0, "GT": 40, "GN": 4, "GW": 0, "GY": 2, "HT": 6, "HN": 15, "HK": 226, "HU": 132, "IS": 12, "IN": 1430, "ID": 695, "IR": 337, "IQ": 84, "IE": 204, "IL": 201, "IT": 2036, "JM": 13, "JP": 5390, "JO": 27, "KZ": 129, "KE": 32, "KI": 0, "KR": 986, "KW": 117, "KG": 4, "LA": 6, "LV": 23, "LB": 39, "LS": 1, "LR": 0, "LY": 77, "LT": 35, "LU": 52, "MK": 9, "MG": 8, "MW": 5, "MY": 218, "MV": 1, "ML": 9, "MT": 7, "MR": 3, "MU": 9, "MX": 1004, "MD": 5, "MN": 5, "ME": 3, "MA": 91, "MZ": 10, "MM": 35, "NA": 11, "NP": 15, "NL": 770, "NZ": 138, "NI": 6, "NE": 5, "NG": 206, "NO": 413, "OM": 53, "PK": 174, "PA": 27, "PG": 8, "PY": 17, "PE": 153, "PH": 189, "PL": 438, "PT": 223, "QA": 126, "RO": 158, "RU": 1476, "RW": 5, "WS": 0, "ST": 0, "SA": 434, "SN": 12, "RS": 38, "SC": 0, "SL": 1, "SG": 217, "SK": 86, "SI": 46, "SB": 0, "ZA": 354, "ES": 1374, "LK": 48, "KN": 0, "LC": 1, "VC": 0, "SD": 65, "SR": 3, "SZ": 3, "SE": 444, "CH": 522, "SY": 59, "TW": 426, "TJ": 5, "TZ": 22, "TH": 312, "TL": 0, "TG": 3, "TO": 0, "TT": 21, "TN": 43, "TR": 729, "TM": 0, "UG": 17, "UA": 136, "AE": 239, "GB": 2258, "US": 4624, "UY": 40, "UZ": 37, "VU": 0, "VE": 285, "VN": 101, "YE": 30, "ZM": 15, "ZW": 5 }'

world-merc:
title: World map
map: world_merc
color: blue
Expand Down
2 changes: 1 addition & 1 deletion src/pages/_includes/cards/map-vector.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
{% if include.title %}
<h3 class="card-title">{{ include.title }}</h3>
{% endif %}
{% include ui/map-vector.html map-id=map color="blue" height=15 %}
{% include ui/map-vector.html map-id=map color="blue" ratio="21x9" %}
</div>
</div>
2 changes: 1 addition & 1 deletion src/pages/_includes/ui/map-vector.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{% assign color = include.color | default: data.color | default: 'green' %}

{% if data %}
<div class="ratio ratio-4x3">
<div class="ratio ratio-{{ include.ratio | default: '4x3' }}">
<div>
<div id="map-{{ id }}" class="w-100 h-100"></div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/_layouts/homepage.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
page-header: Dashboard
page-header-pretitle: Overview
page-header-actions: buttons
libs: apexcharts, jsvectormap, jsvectormap-world
libs: apexcharts, jsvectormap, jsvectormap-world, jsvectormap-world-merc
---

{% include layout/homepage.html %}
4 changes: 2 additions & 2 deletions src/pages/maps-vector.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
title: Vector Maps
page-header: Vector Maps
menu: base.maps-vector
libs: jsvectormap, jsvectormap-world
libs: jsvectormap, jsvectormap-world, jsvectormap-world-merc
---

<div class="row row-cards">
<div class="col-md-6">
<div class="card">
<div class="card-body">
<h3 class="card-title">World map</h3>
{% include ui/map-vector.html map-id="world" %}
{% include ui/map-vector.html map-id="world-merc" %}
</div>
</div>
</div>
Expand Down

0 comments on commit 25568ba

Please sign in to comment.