diff --git a/.csscomb.json b/.csscomb.json
index b191cd3..b4df350 100644
--- a/.csscomb.json
+++ b/.csscomb.json
@@ -2,7 +2,7 @@
"remove-empty-rulesets": true,
"always-semicolon": true,
"color-case": "lower",
- "block-indent": " ",
+ "block-indent": " ",
"color-shorthand": true,
"element-case": "lower",
"eof-newline": true,
@@ -187,6 +187,11 @@
"-ms-animation-direction",
"-o-animation-direction",
"animation-direction",
+ "-webkit-animation-fill-mode",
+ "-moz-animation-fill-mode",
+ "-ms-animation-fill-mode",
+ "-o-animation-fill-mode",
+ "animation-fill-mode",
"text-align",
"-webkit-text-align-last",
"-moz-text-align-last",
diff --git a/.gitignore b/.gitignore
index 1bf4f66..542377a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
+.DS_Store
.idea/
node_modules/
libs/
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 176ba1a..5205524 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,27 @@
+### 1.0.0
+* Renamed the 'closeOnAnyClick' property to the 'closeOnOutsideClick'.
+* Separated base and theme styles.
+* Renamed the base files.
+* Added the ability to use CSS mixins.
+* Added `#destroy`.
+* Renamed the events.
+* Used states and CSS animations.
+* Made restyling of the default theme.
+* Added the watch task for Grunt.
+* Added Autoprefixer.
+* Used `backface-visibility` for the hardware acceleration instead of `translateZ`.
+* Disabled the auto-resizing of text on mobile devices.
+* Fixed the triggering of the close event, even if a modal is not opened.
+* Added '#getState'.
+* Changed names for the constants.
+* Removed the default custom font.
+* Introduced the `data-remodal-action` attribute.
+* Made code refactoring.
+* Improved anti-FOUC.
+* Updated examples.
+* Updated tests.
+* Updated dependencies.
+
### 0.6.4
* Protocol-relative URL for fonts.
* Scroll to the top, when a modal is displayed.
diff --git a/Gruntfile.js b/Gruntfile.js
index 630da69..d80c31f 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -14,7 +14,42 @@ module.exports = function(grunt) {
' *\n' +
' * Made by <%= pkg.author.name %>\n' +
' * Under <%= pkg.license %> License\n' +
- ' */\n'
+ ' */\n\n'
+ },
+
+ autoprefixer: {
+ dist: {
+ src: 'dist/**/*.css'
+ },
+ options: {
+ browsers: ['> 0.1%'],
+ cascade: false
+ }
+ },
+
+ browserSync: {
+ dev: {
+ bsFiles: {
+ src: ['dist/**/*', 'examples/**/*']
+ },
+ options: {
+ watchTask: true,
+ server: './'
+ }
+ }
+ },
+
+ concat: {
+ dist: {
+ files: {
+ 'dist/remodal.js': 'src/remodal.js',
+ 'dist/remodal.css': 'src/remodal.css',
+ 'dist/remodal-default-theme.css': 'src/remodal-default-theme.css'
+ },
+ options: {
+ banner: '<%= meta.banner %>'
+ }
+ }
},
connect: {
@@ -25,6 +60,26 @@ module.exports = function(grunt) {
}
},
+ csscomb: {
+ all: {
+ files: {
+ 'src/remodal.css': 'src/remodal.css',
+ 'src/remodal-default-theme.css': 'src/remodal-default-theme.css',
+ 'dist/remodal.css': 'dist/remodal.css',
+ 'dist/remodal-default-theme.css': 'dist/remodal-default-theme.css'
+ }
+ }
+ },
+
+ githooks: {
+ all: {
+ 'pre-commit': 'lint'
+ },
+ options: {
+ command: 'node_modules/.bin/grunt'
+ }
+ },
+
jshint: {
gruntfile: {
src: 'Gruntfile.js'
@@ -33,7 +88,7 @@ module.exports = function(grunt) {
src: 'src/**/*.js'
},
test: {
- src: 'test/**/*.js'
+ src: ['test/**/*.js', 'libs/jquery-loader.js']
},
options: {
jshintrc: '.jshintrc'
@@ -48,15 +103,7 @@ module.exports = function(grunt) {
src: 'src/**/*.js'
},
test: {
- src: 'test/**/*.js'
- }
- },
-
- csscomb: {
- all: {
- files: {
- 'src/jquery.remodal.css': 'src/jquery.remodal.css'
- }
+ src: ['test/**/*.js', 'libs/jquery-loader.js']
}
},
@@ -76,22 +123,10 @@ module.exports = function(grunt) {
}
},
- concat: {
- dist: {
- files: {
- 'dist/jquery.remodal.js': 'src/jquery.remodal.js',
- 'dist/jquery.remodal.css': 'src/jquery.remodal.css'
- },
- options: {
- banner: '<%= meta.banner %>'
- }
- }
- },
-
uglify: {
remodal: {
files: {
- 'dist/jquery.remodal.min.js': 'src/jquery.remodal.js'
+ 'dist/remodal.min.js': 'src/remodal.js'
}
},
options: {
@@ -99,12 +134,13 @@ module.exports = function(grunt) {
}
},
- githooks: {
- all: {
- 'pre-commit': 'lint'
+ watch: {
+ src: {
+ files: ['src/**/*', 'examples/**/*'],
+ tasks: ['build']
},
options: {
- command: 'node_modules/.bin/grunt'
+ spawn: false
}
}
});
@@ -114,14 +150,17 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-qunit');
grunt.loadNpmTasks('grunt-contrib-uglify');
+ grunt.loadNpmTasks('grunt-contrib-watch');
+ grunt.loadNpmTasks('grunt-autoprefixer');
+ grunt.loadNpmTasks('grunt-browser-sync');
grunt.loadNpmTasks('grunt-csscomb');
grunt.loadNpmTasks('grunt-githooks');
grunt.loadNpmTasks('grunt-jscs');
- // Tasks.
+ // Tasks
grunt.registerTask('lint', ['jshint', 'jscs']);
grunt.registerTask('test', ['connect', 'lint', 'qunit']);
- grunt.registerTask('default', [
- 'connect', 'csscomb', 'jshint', 'jscs', 'qunit', 'concat', 'uglify', 'githooks'
- ]);
+ grunt.registerTask('build', ['concat', 'autoprefixer', 'csscomb', 'uglify', 'githooks']);
+ grunt.registerTask('bsync', ['browserSync', 'watch']);
+ grunt.registerTask('default', ['test', 'build']);
};
diff --git a/README.md b/README.md
index c8e5e46..0791b7f 100644
--- a/README.md
+++ b/README.md
@@ -1,37 +1,43 @@
+[![NPM version](https://img.shields.io/npm/v/remodal.svg?style=flat)](https://npmjs.org/package/remodal)
[![Bower version](https://badge.fury.io/bo/remodal.svg)](http://badge.fury.io/bo/remodal)
[![Travis](https://travis-ci.org/VodkaBears/Remodal.svg?branch=master)](https://travis-ci.org/VodkaBears/Remodal)
-[![devDependency Status](https://david-dm.org/vodkabears/remodal/dev-status.svg)](https://david-dm.org/vodkabears/remodal#info=devDependencies)
Remodal
=======
-Flat, responsive, lightweight, fast, easy customizable modal window plugin with declarative state notation and hash tracking.
+Responsive, lightweight, fast, synchronized with CSS animations, fully customizable modal window plugin with declarative configuration and hash tracking.
+
+![logo](https://raw.githubusercontent.com/VodkaBears/vodkabears.github.com/master/remodal/remodal.png)
#IMPORTANT!
-**v0.4.0 has incompatible changes.**
+**v1.0.0 has a lot of incompatible changes.**
## Notes
* All modern browsers are supported.
-* Only webkit browsers have a blur effect in the default css theme. If you want a blur for other browsers, use this: https://github.com/Schepp/CSS-Filters-Polyfill, but it's not fast like a native css3 blur.
-* IE8+. To enable IE8 styles add `lt-ie9` class to the `html` element, as modernizr does.
-* Zepto support.
+* IE8+. To enable IE8 styles add the `lt-ie9` class to the `html` element, as modernizr does.
+* jQuery, jQuery2, Zepto support.
+* Browserify support.
## Start
-That's very simple to start using Remodal.
-
-[Download it](https://github.com/VodkaBears/Remodal/releases/latest). You can use bower: `bower install remodal`.
+Download the latest version from [GitHub](https://github.com/VodkaBears/Remodal/releases/latest
+) or via package managers:
+```
+npm install remodal
+bower install remodal
+```
-Add this in the head section:
+Include the CSS files from the dist folder in the head section:
```html
-
+
+
```
-Add this before the `