Skip to content

Commit 28d44f9

Browse files
committed
scrollReveal v2.0.0
0 parents  commit 28d44f9

File tree

9 files changed

+1286
-0
lines changed

9 files changed

+1286
-0
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
## generic files to ignore
2+
*~
3+
*.lock
4+
*.DS_Store
5+
node_modules

Gulpfile.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
var gulp = require('gulp'),
2+
uglify = require('gulp-uglify'),
3+
umd = require('gulp-wrap-umd'),
4+
rename = require('gulp-rename');
5+
6+
gulp.task('wrap', function(){
7+
gulp.src('scrollReveal.js')
8+
.pipe(umd({ namespace: 'scrollReveal', exports: 'scrollReveal' }))
9+
.pipe(gulp.dest('dist'))
10+
});
11+
12+
gulp.task('minify', function(){
13+
gulp.src('scrollReveal.js')
14+
.pipe(umd({ namespace: 'scrollReveal', exports: 'scrollReveal' }))
15+
.pipe(uglify())
16+
.pipe(rename('scrollReveal.min.js'))
17+
.pipe(gulp.dest('dist'))
18+
});
19+
20+
gulp.task('default', ['wrap', 'minify']);

LICENSE.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
License
2+
-------
3+
4+
The MIT License (MIT)
5+
6+
Copyright © 2014 [Julian Lloyd](https://twitter.com/julianlloyd)
7+
8+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
11+
12+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
#scrollReveal.js
2+
[![scrollReveal version](http://img.shields.io/badge/scrollReveal.js-v2.0.0-brightgreen.svg)](http://scrollrevealjs.org) [![License](http://img.shields.io/badge/License-MIT-blue.svg)](http://opensource.org/licenses/MIT)
3+
4+
### Easily reveal elements as they enter the viewport.
5+
6+
- Developed for modern browsers
7+
- An open-source project by [Julian Lloyd](https://twitter.com/julianlloyd)
8+
9+
***
10+
11+
### [→ See Demo ←](http://scrollrevealjs.org/)
12+
13+
***
14+
15+
Installation
16+
------------
17+
18+
Please use which ever is more comfortable:
19+
20+
- [Download ZIP](https://github.com/julianlloyd/scrollReveal.js/archive/master.zip)
21+
- `git clone https://github.com/julianlloyd/scrollReveal.js.git`
22+
- `bower install scrollReveal.js`
23+
24+
Once you’ve got `scrollReveal.min.js` into your project’s JavaScript directory, let’s instantiate it!
25+
26+
```html
27+
<!DOCTYPE html>
28+
<html>
29+
<body>
30+
31+
<!-- All your stuff up here... -->
32+
33+
<script src='/js/scrollReveal.min.js'></script>
34+
<script>
35+
36+
window.sr = new scrollReveal();
37+
38+
</script>
39+
</body>
40+
</html>
41+
```
42+
43+
Basic Usage
44+
-----------
45+
46+
How does it work? It’s as simple as adding `data-sr` to an element, it will reveal as it enters the viewport.
47+
```html
48+
<p data-sr> Chips Ahoy! </p>
49+
```
50+
51+
Taking Control
52+
--------------
53+
54+
You guessed it, the `data-sr` attribute is waiting for _you_ to describe the type of animation you want. It’s as simple as using a few **keywords** and natural language.
55+
```html
56+
<div data-sr="enter left please, and hustle 20px"> Foo </div>
57+
<div data-sr="enter bottom and move 50px after 1s"> Bar </div>
58+
<div data-sr="wait 2.5s and then ease-in-out 100px"> Baz </div>
59+
```
60+
What you enter into the `data-sr` attribute is parsed for specific words:
61+
62+
- **Keywords** that expect to be followed by a **value**. (e.g. move 50px)
63+
- **Sugar** (optional) for fun and comprehension. (e.g. and, then, please, etc.)
64+
65+
***
66+
67+
### Recommended Next: [Keywords →](https://github.com/julianlloyd/scrollReveal.js/wiki/Keywords)

bower.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"name": "scrollReveal.js",
3+
"version": "2.0.0",
4+
"homepage": "https://github.com/julianlloyd/scrollReveal.js",
5+
"authors": [
6+
"Julian Lloyd <https://twitter.com/julianlloyd>"
7+
],
8+
"description": "Easily reveal elements as they enter the viewport.",
9+
"main": ["scrollReveal.js"],
10+
"keywords": [
11+
"scrollReveal",
12+
"scroll",
13+
"reveal",
14+
"animation",
15+
"CSS",
16+
"transition",
17+
"JavaScript"
18+
],
19+
"license": "MIT",
20+
"ignore": [
21+
"**/.*",
22+
"node_modules",
23+
"bower_components",
24+
"app/bower_components"
25+
]
26+
}

0 commit comments

Comments
 (0)