Skip to content

Commit

Permalink
0.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
aFarkas committed Nov 5, 2014
1 parent b279258 commit a62b7d6
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 18 deletions.
19 changes: 19 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
*.bak
node_modules
*.zip
.*
play
node_modules
bower_components
cfg
test
tests
maxdpr
rias
assets
index.html
Gruntfile.js
component.json
package.json
bower.json
Authors.txt
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "lazysizes",
"repo": "afarkas/lazysizes",
"version": "0.4.0-RC1",
"version": "0.4.0",
"main": "lazysizes.min.js",
"scripts": [
"lazysizes.min.js"
Expand Down
2 changes: 1 addition & 1 deletion component.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lazysizes",
"version": "0.4.0-RC1",
"version": "0.4.0",
"repo": "afarkas/lazysizes",
"main": "lazysizes.min.js",
"scripts": ["lazysizes.min.js"],
Expand Down
2 changes: 1 addition & 1 deletion lazysizes.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 9 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
{
"name": "lazysizes",
"version": "0.4.0-RC1",
"version": "0.4.0",
"author": "Alexander Farkas <[email protected]>",
"repository": {
"type": "git",
"url": "git://github.com/aFarkas/lazysizes.git"
},
"engines": {
"node": ">= 0.8.0"
},
Expand All @@ -23,5 +28,7 @@
"files": [
"lazysizes.min.js"
]
}
},
"description": "High performance (jankfree) lazy loader for images (including responsive images), iframes and scripts (widgets).",
"keywords": ["lazy", "lazyloader", "performance", "responsive", "image", "responsive images", "picture", "srcset"]
}
30 changes: 17 additions & 13 deletions plugins/rias/README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,29 @@
#lazysizes RIaS extension (Responsive image as a service)

The RiaS plugin enables lazySizes to hook into any third party (ReSrc, pixulate, mobify ...) or self hosted restful responsive image service. This is currently the best way to serve adaptive and or retina optimized images.
The RiaS plugin enables lazySizes to hook into any third party (ReSrc, Pixtulate, mobify ...) or self hosted restful responsive image service. This is currently the best way to serve responsive adaptive and / or retina optimized images.

The rias plugin also allows art direction by combining rias with a ``picture`` element.

##Basic/quick usage

* Simply add the rias plugin right after the lazysizes or concat those scripts into your script bundle:
```html
<script src="../lazysizes.js"></script>
<script src="../plugins/rias/ls.rias.js"></script>
```

```html
<script src="../lazysizes.js"></script>
<script src="../plugins/rias/ls.rias.js"></script>
```

* Add the ``lazyload`` class and the ``data-sizes="auto"`` attribute to your image and include the placeholder ``{width}`` at the point, where your image service expects the requested width of the image.
```html
<img
src="http://placehold.it/100"
data-src="http://placehold.it/{width}"
data-sizes="auto"
class="lazyload"
alt="" />
```

```html
<img
src="http://placehold.it/100"
data-src="http://placehold.it/{width}"
data-sizes="auto"
class="lazyload"
alt="" />
```


##[Demo](http://afarkas.github.io/lazysizes/rias/)
A [demo with markup and code examples can be seen here](http://afarkas.github.io/lazysizes/rias/).
Expand Down

0 comments on commit a62b7d6

Please sign in to comment.