responsive_image_tag 0.0.8 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0
|
1
|
+
0.1.0
|
@@ -7,10 +7,9 @@ function replaceImages(){
|
|
7
7
|
for(i = 0; i < noOfresponsiveImages; i = i + 1 ){
|
8
8
|
var newImg = window.document.createElement("img");
|
9
9
|
newImg.src = responsiveImages[i].getAttribute("data-fullsrc");
|
10
|
-
var imgNo = i+1;
|
11
10
|
responsiveImages[i].previous().appendChild(newImg);
|
12
11
|
responsiveImages[i].style.display = "none";
|
13
|
-
}
|
12
|
+
}
|
14
13
|
|
15
14
|
}
|
16
15
|
|
data/lib/responsive_image_tag.rb
CHANGED
@@ -7,9 +7,9 @@ module ResponsiveImageTag
|
|
7
7
|
# asset_tag_helper.
|
8
8
|
#
|
9
9
|
def responsive_image_tag(small, big, options = {})
|
10
|
-
options["data-fullsrc"] = image_path(big)
|
11
10
|
output = tag "span", {:class => "img-placeholder"}
|
12
|
-
output += tag "
|
11
|
+
output += tag "/span"
|
12
|
+
output += tag "noscript", {"data-fullsrc" => image_path(big), :class => "responsivize"}, true
|
13
13
|
output += image_tag(small, options)
|
14
14
|
output += tag "/noscript", nil, true
|
15
15
|
output
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: responsive_image_tag
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 27
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
+
- 1
|
8
9
|
- 0
|
9
|
-
|
10
|
-
version: 0.0.8
|
10
|
+
version: 0.1.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Dave Hrycyszyn
|