jekyll-maps 2.1.2 → 2.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 215805100683263283d367bc71dbdb0011b12d39
4
- data.tar.gz: b12411f9d3189ad09cb47d274b24d01a10060448
2
+ SHA256:
3
+ metadata.gz: 5d5dffc1c1df660cb9f9c4c0df61c45474a1f6f104f0071f029c361b3249199b
4
+ data.tar.gz: 25ff1ed47a8eda9b6c7d47b234b6241738709b084b3cf9bb637aeb81ef4f0abd
5
5
  SHA512:
6
- metadata.gz: cbc3dcb446af807b3ebbe4784037a57e08a7ce68d30bfe4aa41321c16a966473fe9b9f6ce0b34e315757c41651cfb6c2bdbcf23bb42c48c188c4bcd7182732ee
7
- data.tar.gz: 0fa3f7762910acae8e39c7dd382459912675cdaf91d7d17f1e3f77a7072d28766b129f2cb6ff6f8617af0e3b86c4f2f3d4a7cd2d9413af323593b3fb21a1b2b8
6
+ metadata.gz: b798ed260312306b4a3ceee2a331d21bd2213e868787e98812b1c641ae0e7e4ce6df7b3202a578fa0b01c3307a89318fcbb86c96705c2408437555db0824863c
7
+ data.tar.gz: 3647aa55db8ec0bfa68a1bf088552c78d6e634aaa3b0af0282340b13623b3df6c8b399e1a2e5762f5835d0158e9e9a4371369341b0bb6e62aa665205c292ea00
@@ -79,7 +79,8 @@ var jekyllMaps = (function() {
79
79
  position: position,
80
80
  title: location.title,
81
81
  image: location.image,
82
- url: location.url.length > 0 ? mapOptions.baseUrl + location.url : '',
82
+ icon: location.icon || mapOptions.markerIcon,
83
+ url: markerUrl(mapOptions.baseUrl, location.url),
83
84
  map: map
84
85
  })
85
86
  if (mapOptions.showMarkerPopup) marker.addListener('click', markerPopup)
@@ -87,6 +88,12 @@ var jekyllMaps = (function() {
87
88
  return marker
88
89
  }
89
90
 
91
+ function markerUrl(baseUrl, url) {
92
+ if (/^(https?|\/\/)/.test(url)) return url
93
+
94
+ return url.length > 0 ? baseUrl + url : ''
95
+ }
96
+
90
97
  function markerPopup() {
91
98
  var contentHtml =
92
99
  '<div class="map-info-window"><h5>' + this.title + '</h5>'
@@ -58,7 +58,8 @@ HTML
58
58
  :baseUrl => site.baseurl || "/",
59
59
  :useCluster => !@args[:flags][:no_cluster],
60
60
  :showMarker => @args[:attributes][:show_marker] != "false",
61
- :showMarkerPopup => @args[:attributes][:show_popup] != "false"
61
+ :showMarkerPopup => @args[:attributes][:show_popup] != "false",
62
+ :markerIcon => @args[:attributes][:marker_icon]
62
63
  }
63
64
  if @args[:attributes][:zoom]
64
65
  opts[:customZoom] = @args[:attributes][:zoom].to_i
@@ -25,6 +25,7 @@ module Jekyll
25
25
  :latitude => @options[:attributes][:latitude],
26
26
  :longitude => @options[:attributes][:longitude],
27
27
  :title => @options[:attributes][:marker_title] || page["title"],
28
+ :icon => @options[:attributes][:marker_icon] || page["marker_icon"],
28
29
  :url => @options[:attributes][:marker_url] || fetch_url(page),
29
30
  :image => @options[:attributes][:marker_img] || page["image"] || ""
30
31
  }
@@ -103,6 +104,7 @@ module Jekyll
103
104
  :latitude => location["latitude"],
104
105
  :longitude => location["longitude"],
105
106
  :title => location["title"] || document["title"],
107
+ :icon => location["marker_icon"] || document["marker_icon"],
106
108
  :url => location["url"] || fetch_url(document),
107
109
  :image => location["image"] || document["image"] || ""
108
110
  }
@@ -16,6 +16,7 @@ module Jekyll
16
16
  latitude
17
17
  longitude
18
18
  marker_title
19
+ marker_icon
19
20
  marker_img
20
21
  marker_url
21
22
  ).freeze
@@ -1,5 +1,5 @@
1
1
  module Jekyll
2
2
  module Maps
3
- VERSION = "2.1.2".freeze
3
+ VERSION = "2.2.0".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-maps
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.2
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anatoliy Yastreb
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-02-15 00:00:00.000000000 Z
11
+ date: 2018-03-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -112,7 +112,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
112
112
  version: '0'
113
113
  requirements: []
114
114
  rubyforge_project:
115
- rubygems_version: 2.4.5.1
115
+ rubygems_version: 2.7.3
116
116
  signing_key:
117
117
  specification_version: 4
118
118
  summary: Jekyll Google Maps integration