jekyll-maps 2.3.0 → 2.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.codeclimate.yml +0 -0
- data/.gitignore +1 -0
- data/.rubocop.yml +0 -0
- data/.travis.yml +0 -0
- data/Gemfile +0 -0
- data/History.md +5 -0
- data/LICENSE +0 -0
- data/README.md +0 -0
- data/Rakefile +0 -0
- data/jekyll-maps.gemspec +0 -0
- data/lib/jekyll-maps.rb +0 -0
- data/lib/jekyll-maps/google_map_api.js +14 -8
- data/lib/jekyll-maps/google_map_api.rb +0 -0
- data/lib/jekyll-maps/google_map_tag.rb +0 -0
- data/lib/jekyll-maps/location_finder.rb +20 -15
- data/lib/jekyll-maps/options_parser.rb +1 -0
- data/lib/jekyll-maps/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e1f7764e330ca8398f9b8ac424b3ab6dafa38d6bd0a8b91f39f1f8dc85fef981
|
4
|
+
data.tar.gz: 699cdb8682423e5508a5aa4fed846c6017a2a4b1fecc6878c9de369d1392a521
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 88ff121fe971e8676931c22bfb1610d70aeb93023dbc9e216fd975fa6331eed665fccb26726f538001557e5cb32e5069b376ddb7a34655f88e8fc3ccbeacca43
|
7
|
+
data.tar.gz: 1ae331ad6d9afa9689e5ba27a8dcc778289cef50ee339bbd4a0cf9c8051ab1048c2c6713bf6c423c6fa3012cc1d6ffb6c89da5154e12e496aab2312895b474c1
|
data/.codeclimate.yml
CHANGED
File without changes
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
File without changes
|
data/.travis.yml
CHANGED
File without changes
|
data/Gemfile
CHANGED
File without changes
|
data/History.md
CHANGED
data/LICENSE
CHANGED
File without changes
|
data/README.md
CHANGED
File without changes
|
data/Rakefile
CHANGED
File without changes
|
data/jekyll-maps.gemspec
CHANGED
File without changes
|
data/lib/jekyll-maps.rb
CHANGED
File without changes
|
@@ -79,6 +79,7 @@ var jekyllMaps = (function() {
|
|
79
79
|
position: position,
|
80
80
|
title: location.title,
|
81
81
|
image: location.image,
|
82
|
+
popup_html: location.popup_html,
|
82
83
|
icon: location.icon || mapOptions.markerIcon,
|
83
84
|
url: markerUrl(mapOptions.baseUrl, location.url),
|
84
85
|
url_text: location.url_text,
|
@@ -97,14 +98,19 @@ var jekyllMaps = (function() {
|
|
97
98
|
|
98
99
|
function markerPopup() {
|
99
100
|
var content = '<div class="map-info-window"><h5>' + this.title + '</h5>'
|
100
|
-
|
101
|
-
this.
|
102
|
-
|
103
|
-
|
104
|
-
var
|
105
|
-
|
106
|
-
|
107
|
-
|
101
|
+
if (this.popup_html.length > 0) {
|
102
|
+
content += this.popup_html
|
103
|
+
}
|
104
|
+
else {
|
105
|
+
var imageTag =
|
106
|
+
this.image.length > 0 &&
|
107
|
+
'<img src="' + this.image + '" alt="' + this.title + '"/>'
|
108
|
+
if (this.url.length > 0) {
|
109
|
+
var linkContent = imageTag || this.url_text || 'View'
|
110
|
+
content += '<a href="' + this.url + '">' + linkContent + '</a>'
|
111
|
+
} else if (imageTag) {
|
112
|
+
content += imageTag
|
113
|
+
}
|
108
114
|
}
|
109
115
|
content += '</div>'
|
110
116
|
infoWindow.setContent(content)
|
File without changes
|
File without changes
|
@@ -22,12 +22,13 @@ module Jekyll
|
|
22
22
|
private
|
23
23
|
def location_from_options(page)
|
24
24
|
{
|
25
|
-
:latitude
|
26
|
-
:longitude
|
27
|
-
:title
|
28
|
-
:icon
|
29
|
-
:url
|
30
|
-
:image
|
25
|
+
:latitude => @options[:attributes][:latitude],
|
26
|
+
:longitude => @options[:attributes][:longitude],
|
27
|
+
:title => @options[:attributes][:marker_title] || page["title"],
|
28
|
+
:icon => @options[:attributes][:marker_icon] || page["marker_icon"],
|
29
|
+
:url => @options[:attributes][:marker_url] || fetch_url(page),
|
30
|
+
:image => @options[:attributes][:marker_img] || page["image"] || "",
|
31
|
+
:popup_html => @options[:attributes][:marker_popup_html] || ""
|
31
32
|
}
|
32
33
|
end
|
33
34
|
|
@@ -75,12 +76,14 @@ module Jekyll
|
|
75
76
|
def match_filters?(doc)
|
76
77
|
@options[:filters].each do |filter, value|
|
77
78
|
if filter == "src"
|
78
|
-
|
79
|
-
|
79
|
+
if doc.respond_to?(:relative_path)
|
80
|
+
return false unless doc.relative_path.start_with?(value)
|
81
|
+
end
|
80
82
|
elsif doc[filter].nil? || doc[filter] != value
|
81
83
|
return false
|
82
84
|
end
|
83
85
|
end
|
86
|
+
return true
|
84
87
|
end
|
85
88
|
|
86
89
|
private
|
@@ -103,13 +106,15 @@ module Jekyll
|
|
103
106
|
private
|
104
107
|
def convert(document, location)
|
105
108
|
{
|
106
|
-
:latitude
|
107
|
-
:longitude
|
108
|
-
:title
|
109
|
-
:icon
|
110
|
-
:url
|
111
|
-
:url_text
|
112
|
-
:image
|
109
|
+
:latitude => location["latitude"],
|
110
|
+
:longitude => location["longitude"],
|
111
|
+
:title => location["title"] || document["title"],
|
112
|
+
:icon => location["marker_icon"] || document["marker_icon"],
|
113
|
+
:url => location["url"] || fetch_url(document),
|
114
|
+
:url_text => location["url_text"],
|
115
|
+
:image => location["image"] || document["image"] || "",
|
116
|
+
:popup_html => location["marker_popup_html"] \
|
117
|
+
|| document["marker_popup_html"] || ""
|
113
118
|
}
|
114
119
|
end
|
115
120
|
|
data/lib/jekyll-maps/version.rb
CHANGED
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.3.
|
4
|
+
version: 2.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Anatoliy Yastreb
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-03-02 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.7.
|
115
|
+
rubygems_version: 2.7.6
|
116
116
|
signing_key:
|
117
117
|
specification_version: 4
|
118
118
|
summary: Jekyll Google Maps integration
|