Skip to content

Commit

Permalink
Added sliding effect for grid elems. v1.0.2.
Browse files Browse the repository at this point in the history
  • Loading branch information
zaxovaiko committed Aug 22, 2018
1 parent abe85b1 commit 303704e
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 17 deletions.
31 changes: 19 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Stratum.js — Masonry Grid Library

> version 1.0.1
> version 1.0.2
### Table of contents

Expand All @@ -9,17 +9,17 @@
- [Additional information](https://github.com/zaxoavoki/stratum.js#additional-information)
- [Future updates](https://github.com/zaxoavoki/stratum.js#future-updates)
- [Copyright and license](https://github.com/zaxoavoki/stratum.js#copyright-and-license)
- [Changes history](https://github.com/zaxoavoki/stratum.js#changes-history)

### How to install

- You can download it with [stratum.js CDN](https://cdn.rawgit.com/zaxoavoki/stratum.js/31373231/dist/stratum.min.js)
- You can find it in [npm](https://www.npmjs.com/package/stratum.js)
- Using [NPM](https://www.npmjs.com/package/stratum.js)

Use with npm:

```
npm i stratum.js
```
```
npm i stratum.js
```

- or download [the latest .min version](https://rawgit.com/zaxoavoki/stratum.js/master/dist/stratum.min.js)

### How to use

Expand All @@ -42,17 +42,24 @@ parameter with three options:
### Additional information

You may need to add a grid element once, but you do not want it to be visible. In this case, simply specify for the child element to have `display: none` or add class with this CSS rule.
If you need to add a grid element, but you do not want it to be visible. In this case, simply specify for the child element to have `display: none` or add class with this CSS rule.

**stratum.js** project is independent of any other packages. That's why it's light weight and is only
*1.7KiB* for minimized version and *7.31KiB* for normal.

### Future updates

- Older browsers supports
- Add responsive grid checker
- Add support of old browsers

### Copyright and license

Code and documentation copyright 2018. Code released under the [MIT License](https://en.wikipedia.org/wiki/MIT_License).

##### Work together

You can improve this plugin with your ideas. Just tell me or send pull request.
You can improve this plugin with your ideas. Just tell me or send pull request.

#### Changes history

`v1.0.2` - Added sliding effect for grid elements.
`v1.0.1` - Initiated project.
4 changes: 2 additions & 2 deletions dist/stratum.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@
if (gridItem.children().css('display') !== 'none') {
gridItem.css({
position: 'absolute',
transition: 'ease .5s',
width: 100 / columns + '%',
padding: padding
});
Expand Down Expand Up @@ -187,8 +188,7 @@
});
});

// Set grid height.
grid.css('height', Math.max.apply(null, sizes));
grid.css('height', Math.max.apply(null, sizes)); // Set grid height
}

$(window).on('load resize', init);
Expand Down
2 changes: 1 addition & 1 deletion dist/stratum.min.js

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

2 changes: 1 addition & 1 deletion package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "stratum.js",
"version": "1.0.1",
"version": "1.0.2",
"description": "Small library for building an excellent grid using Javascript",
"main": "webpack.config.js",
"scripts": {
Expand Down
1 change: 1 addition & 0 deletions stratum.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
if (gridItem.children().css('display') !== 'none') {
gridItem.css({
position: 'absolute',
transition: 'ease .5s',
width: 100 / columns + '%',
padding: padding
});
Expand Down

0 comments on commit 303704e

Please sign in to comment.