jekyll-theme-artsy 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/css/bootstrap.min.css +8143 -0
- data/css/galleries.css +150 -0
- data/css/home.css +151 -0
- data/css/journal.css +235 -0
- data/css/magnificpopup.css +352 -0
- data/css/main.css +856 -0
- data/css/selena.css +50 -0
- data/css/super-search.css +110 -0
- data/css/tags-wrap.css +35 -0
- data/img/404.jpg +0 -0
- data/img/about-bg.jpg +0 -0
- data/img/add-to-cart.png +0 -0
- data/img/archive-bg.jpg +0 -0
- data/img/avatar.png +0 -0
- data/img/bookbutton.png +0 -0
- data/img/cart-empty.png +0 -0
- data/img/cart-full.png +0 -0
- data/img/donate.png +0 -0
- data/img/gallery-bg.jpg +0 -0
- data/img/journal/post01.jpg +0 -0
- data/img/journal/post02.jpg +0 -0
- data/img/journal/post03.jpg +0 -0
- data/img/left-arrow.svg +36 -0
- data/img/lightbox/close.png +0 -0
- data/img/lightbox/loading.gif +0 -0
- data/img/lightbox/next.png +0 -0
- data/img/lightbox/prev.png +0 -0
- data/img/loading.gif +0 -0
- data/img/logo.png +0 -0
- data/img/misc-bg.jpg +0 -0
- data/img/postcover/pc001.jpg +0 -0
- data/img/postcover/pc002.jpg +0 -0
- data/img/postcover/pc003.jpg +0 -0
- data/img/postcover/pc004.jpg +0 -0
- data/img/postcover/pc005.jpg +0 -0
- data/img/postcover/pc006.jpg +0 -0
- data/img/postcover/pc007.jpg +0 -0
- data/img/postcover/pc008.jpg +0 -0
- data/img/right-arrow.svg +36 -0
- data/img/siteicon.png +0 -0
- data/img/watermark-1900x1900-alt.png +0 -0
- data/img/watermark-1900x1900.png +0 -0
- data/img/watermark-800x800.png +0 -0
- data/img/writing-bg.jpg +0 -0
- data/js/dripload.js +37 -0
- data/js/fullcart.js +22 -0
- data/js/isotope.pkgd.min.js +8 -0
- data/js/jquery.cycle.min.js +1 -0
- data/js/jquery.isotope.min.js +13 -0
- data/js/jquery.lazylinepainter.min.js +17 -0
- data/js/jquery.magnific-popup.js +1861 -0
- data/js/jquery.mousewheel.min.js +8 -0
- data/js/jquery.tinycarousel.min.js +7 -0
- data/js/kenburns.min.js +6 -0
- data/js/main.min.js +588 -0
- data/js/modernizr.js +2 -0
- data/js/owlcarousel/.gitattributes +5 -0
- data/js/owlcarousel/.gitignore +18 -0
- data/js/owlcarousel/.travis.yml +14 -0
- data/js/owlcarousel/CONTRIBUTING.md +88 -0
- data/js/owlcarousel/Gruntfile.js +320 -0
- data/js/owlcarousel/ISSUE_TEMPLATE.md +14 -0
- data/js/owlcarousel/LICENSE +23 -0
- data/js/owlcarousel/README.md +122 -0
- data/js/owlcarousel/ROADMAP.md +57 -0
- data/js/owlcarousel/_config.json +30 -0
- data/js/owlcarousel/bower.json +13 -0
- data/js/owlcarousel/dist/LICENSE +23 -0
- data/js/owlcarousel/dist/README.md +122 -0
- data/js/owlcarousel/dist/assets/ajax-loader.gif +0 -0
- data/js/owlcarousel/dist/assets/owl.carousel.css +186 -0
- data/js/owlcarousel/dist/assets/owl.carousel.min.css +6 -0
- data/js/owlcarousel/dist/assets/owl.theme.default.css +50 -0
- data/js/owlcarousel/dist/assets/owl.theme.default.min.css +6 -0
- data/js/owlcarousel/dist/assets/owl.theme.green.css +50 -0
- data/js/owlcarousel/dist/assets/owl.theme.green.min.css +6 -0
- data/js/owlcarousel/dist/assets/owl.video.play.png +0 -0
- data/js/owlcarousel/dist/owl.carousel.js +3448 -0
- data/js/owlcarousel/dist/owl.carousel.min.js +7 -0
- data/js/owlcarousel/docs/assets/css/animate.css +3303 -0
- data/js/owlcarousel/docs/assets/css/docs.theme.min.css +1 -0
- data/js/owlcarousel/docs/assets/img/bird_blue_32.png +0 -0
- data/js/owlcarousel/docs/assets/img/download.png +0 -0
- data/js/owlcarousel/docs/assets/img/feature-drag.png +0 -0
- data/js/owlcarousel/docs/assets/img/feature-modern.png +0 -0
- data/js/owlcarousel/docs/assets/img/feature-module.png +0 -0
- data/js/owlcarousel/docs/assets/img/feature-options.png +0 -0
- data/js/owlcarousel/docs/assets/img/feature-responsive.png +0 -0
- data/js/owlcarousel/docs/assets/img/feature-zombie.png +0 -0
- data/js/owlcarousel/docs/assets/img/owl-logo.png +0 -0
- data/js/owlcarousel/docs/assets/img/twitter_25.png +0 -0
- data/js/owlcarousel/docs/assets/js/app.js +32 -0
- data/js/owlcarousel/docs/assets/js/foundation.min.js +3 -0
- data/js/owlcarousel/docs/assets/owlcarousel/README.md +122 -0
- data/js/owlcarousel/docs/assets/owlcarousel/assets/ajax-loader.gif +0 -0
- data/js/owlcarousel/docs/assets/owlcarousel/assets/owl.carousel.css +186 -0
- data/js/owlcarousel/docs/assets/owlcarousel/assets/owl.carousel.min.css +6 -0
- data/js/owlcarousel/docs/assets/owlcarousel/assets/owl.theme.default.css +50 -0
- data/js/owlcarousel/docs/assets/owlcarousel/assets/owl.theme.default.min.css +6 -0
- data/js/owlcarousel/docs/assets/owlcarousel/assets/owl.theme.green.css +50 -0
- data/js/owlcarousel/docs/assets/owlcarousel/assets/owl.theme.green.min.css +6 -0
- data/js/owlcarousel/docs/assets/owlcarousel/assets/owl.video.play.png +0 -0
- data/js/owlcarousel/docs/assets/owlcarousel/owl.carousel.js +3448 -0
- data/js/owlcarousel/docs/assets/owlcarousel/owl.carousel.min.js +7 -0
- data/js/owlcarousel/docs/assets/vendors/foundation.min.js +3 -0
- data/js/owlcarousel/docs/assets/vendors/highlight.js +1 -0
- data/js/owlcarousel/docs/assets/vendors/jquery.min.js +2 -0
- data/js/owlcarousel/docs/assets/vendors/jquery.min.map +1 -0
- data/js/owlcarousel/docs/assets/vendors/jquery.mousewheel.min.js +8 -0
- data/js/owlcarousel/docs/demos/animate.html +272 -0
- data/js/owlcarousel/docs/demos/autoheight.html +165 -0
- data/js/owlcarousel/docs/demos/autoplay.html +186 -0
- data/js/owlcarousel/docs/demos/autowidth.html +185 -0
- data/js/owlcarousel/docs/demos/basic.html +199 -0
- data/js/owlcarousel/docs/demos/center.html +239 -0
- data/js/owlcarousel/docs/demos/demos.html +198 -0
- data/js/owlcarousel/docs/demos/events.html +207 -0
- data/js/owlcarousel/docs/demos/lazyLoad.html +165 -0
- data/js/owlcarousel/docs/demos/merge.html +202 -0
- data/js/owlcarousel/docs/demos/mousewheel.html +209 -0
- data/js/owlcarousel/docs/demos/responsive.html +297 -0
- data/js/owlcarousel/docs/demos/rtl.html +202 -0
- data/js/owlcarousel/docs/demos/stagepadding.html +202 -0
- data/js/owlcarousel/docs/demos/test.html +144 -0
- data/js/owlcarousel/docs/demos/urlhashnav.html +190 -0
- data/js/owlcarousel/docs/demos/video.html +189 -0
- data/js/owlcarousel/docs/docs/api-classes.html +227 -0
- data/js/owlcarousel/docs/docs/api-events.html +358 -0
- data/js/owlcarousel/docs/docs/api-options.html +395 -0
- data/js/owlcarousel/docs/docs/dev-buildin-plugins.html +157 -0
- data/js/owlcarousel/docs/docs/dev-external.html +151 -0
- data/js/owlcarousel/docs/docs/dev-plugin-api.html +160 -0
- data/js/owlcarousel/docs/docs/dev-styles.html +171 -0
- data/js/owlcarousel/docs/docs/started-faq.html +162 -0
- data/js/owlcarousel/docs/docs/started-installation.html +173 -0
- data/js/owlcarousel/docs/docs/started-welcome.html +196 -0
- data/js/owlcarousel/docs/docs/support-changelog.html +169 -0
- data/js/owlcarousel/docs/docs/support-contact.html +140 -0
- data/js/owlcarousel/docs/docs/support-contributing.html +162 -0
- data/js/owlcarousel/docs/index.html +239 -0
- data/js/owlcarousel/package-lock.json +6169 -0
- data/js/owlcarousel/package.json +57 -0
- data/js/owlcarousel/src/img/ajax-loader.gif +0 -0
- data/js/owlcarousel/src/img/owl.video.play.png +0 -0
- data/js/owlcarousel/src/js/.jscsrc +47 -0
- data/js/owlcarousel/src/js/.jshintrc +13 -0
- data/js/owlcarousel/src/js/owl.animate.js +121 -0
- data/js/owlcarousel/src/js/owl.autoheight.js +132 -0
- data/js/owlcarousel/src/js/owl.autoplay.js +233 -0
- data/js/owlcarousel/src/js/owl.autorefresh.js +111 -0
- data/js/owlcarousel/src/js/owl.carousel.js +1750 -0
- data/js/owlcarousel/src/js/owl.hash.js +122 -0
- data/js/owlcarousel/src/js/owl.lazyload.js +149 -0
- data/js/owlcarousel/src/js/owl.navigation.js +406 -0
- data/js/owlcarousel/src/js/owl.support.js +83 -0
- data/js/owlcarousel/src/js/owl.support.modernizr.js +66 -0
- data/js/owlcarousel/src/js/owl.video.js +327 -0
- data/js/owlcarousel/src/scss/_animate.scss +28 -0
- data/js/owlcarousel/src/scss/_autoheight.scss +7 -0
- data/js/owlcarousel/src/scss/_core.scss +126 -0
- data/js/owlcarousel/src/scss/_lazyload.scss +25 -0
- data/js/owlcarousel/src/scss/_theme.default.scss +30 -0
- data/js/owlcarousel/src/scss/_theme.green.scss +30 -0
- data/js/owlcarousel/src/scss/_theme.scss +64 -0
- data/js/owlcarousel/src/scss/_video.scss +53 -0
- data/js/owlcarousel/src/scss/owl.carousel.scss +5 -0
- data/js/owlcarousel/src/scss/owl.theme.default.scss +1 -0
- data/js/owlcarousel/src/scss/owl.theme.green.scss +1 -0
- data/js/owlcarousel/test/index.html +32 -0
- data/js/owlcarousel/test/unit/autoplay.js +86 -0
- data/js/owlcarousel/test/unit/core.js +140 -0
- data/js/retina.min.js +10 -0
- data/js/scripts.js +204 -0
- data/js/super-search.js +136 -0
- data/js/zepto.min.js +2 -0
- metadata +176 -1
@@ -0,0 +1,57 @@
|
|
1
|
+
{
|
2
|
+
"name": "owl.carousel",
|
3
|
+
"description": "Touch enabled jQuery plugin that lets you create beautiful responsive carousel slider.",
|
4
|
+
"version": "2.3.4",
|
5
|
+
"homepage": "https://github.com/OwlCarousel2/OwlCarousel2",
|
6
|
+
"main": "./dist/owl.carousel.js",
|
7
|
+
"style": "./dist/assets/owl.carousel.css",
|
8
|
+
"author": {
|
9
|
+
"name": "David Deutsch",
|
10
|
+
"email": "deutsch@medienpark.net",
|
11
|
+
"url": "https://owlcarousel2.github.io/OwlCarousel2"
|
12
|
+
},
|
13
|
+
"license": "SEE LICENSE IN https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE",
|
14
|
+
"bugs": {
|
15
|
+
"url": "https://github.com/OwlCarousel2/OwlCarousel2/issues",
|
16
|
+
"email": "deutsch@medienpark.net"
|
17
|
+
},
|
18
|
+
"repository": {
|
19
|
+
"type": "git",
|
20
|
+
"url": "git://github.com/OwlCarousel2/OwlCarousel2.git"
|
21
|
+
},
|
22
|
+
"dependencies": {
|
23
|
+
"jquery": ">=1.8.3"
|
24
|
+
},
|
25
|
+
"devDependencies": {
|
26
|
+
"assemble": "~0.4.37",
|
27
|
+
"blanket": "^1.1.7",
|
28
|
+
"foundation-sites": "~5.5.2",
|
29
|
+
"grunt": "^0.4.5",
|
30
|
+
"grunt-autoprefixer": "^3.0.3",
|
31
|
+
"grunt-banner": "^0.4.0",
|
32
|
+
"grunt-blanket-qunit": "^0.2.0",
|
33
|
+
"grunt-contrib-clean": "~0.6.0",
|
34
|
+
"grunt-contrib-compress": "~0.13.0",
|
35
|
+
"grunt-contrib-concat": "~0.5.1",
|
36
|
+
"grunt-contrib-connect": "~0.10.1",
|
37
|
+
"grunt-contrib-copy": "~0.8.0",
|
38
|
+
"grunt-contrib-cssmin": "^0.12.3",
|
39
|
+
"grunt-contrib-jshint": "^0.11.2",
|
40
|
+
"grunt-contrib-qunit": ">=0.2.1",
|
41
|
+
"grunt-contrib-uglify": "^0.9.1",
|
42
|
+
"grunt-contrib-watch": "^0.6.1",
|
43
|
+
"grunt-gh-pages": "^0.10.0",
|
44
|
+
"grunt-jscs": "~1.8.0",
|
45
|
+
"grunt-sass": "^1.0.0",
|
46
|
+
"load-grunt-tasks": "^3.2.0",
|
47
|
+
"pretty": "^1.0.0",
|
48
|
+
"qunitjs": "^1.18.0"
|
49
|
+
},
|
50
|
+
"keywords": [
|
51
|
+
"responsive",
|
52
|
+
"carousel",
|
53
|
+
"owlcarousel",
|
54
|
+
"jQuery",
|
55
|
+
"plugin"
|
56
|
+
]
|
57
|
+
}
|
Binary file
|
Binary file
|
@@ -0,0 +1,47 @@
|
|
1
|
+
{
|
2
|
+
"requireCurlyBraces": [ "if", "else", "for", "while", "do" ],
|
3
|
+
"requireSpaceAfterKeywords": [ "if", "else", "for", "while", "do", "switch", "return" ],
|
4
|
+
"disallowKeywords": [ "with" ],
|
5
|
+
"disallowKeywordsOnNewLine": [ "else" ],
|
6
|
+
|
7
|
+
"requireSpacesInFunctionExpression": {
|
8
|
+
"beforeOpeningCurlyBrace": true
|
9
|
+
},
|
10
|
+
"disallowSpacesInFunctionExpression": {
|
11
|
+
"beforeOpeningRoundBrace": true
|
12
|
+
},
|
13
|
+
|
14
|
+
"disallowSpaceAfterObjectKeys": true,
|
15
|
+
|
16
|
+
"requireMultipleVarDecl": "onevar",
|
17
|
+
"disallowMixedSpacesAndTabs": "smart",
|
18
|
+
"disallowTrailingWhitespace": true,
|
19
|
+
|
20
|
+
"requireSpacesInsideObjectBrackets": "all",
|
21
|
+
"requireSpacesInsideArrayBrackets": "all",
|
22
|
+
|
23
|
+
"requireSpacesInConditionalExpression": true,
|
24
|
+
"requireSpaceBeforeBinaryOperators": [
|
25
|
+
"=", "+=", "-=", "*=", "/=", "%=", "<<=", ">>=", ">>>=",
|
26
|
+
"&=", "|=", "^=", "+=",
|
27
|
+
|
28
|
+
"+", "-", "*", "/", "%", "<<", ">>", ">>>", "&",
|
29
|
+
"|", "^", "&&", "||", "===", "==", ">=",
|
30
|
+
"<=", "<", ">", "!=", "!=="
|
31
|
+
],
|
32
|
+
"requireSpaceAfterBinaryOperators": [
|
33
|
+
"=", "+=", "-=", "*=", "/=", "%=", "<<=", ">>=", ">>>=",
|
34
|
+
"&=", "|=", "^=", "+=",
|
35
|
+
|
36
|
+
"+", "-", "*", "/", "%", "<<", ">>", ">>>", "&",
|
37
|
+
"|", "^", "&&", "||", "===", "==", ">=",
|
38
|
+
"<=", "<", ">", "!=", "!=="
|
39
|
+
],
|
40
|
+
"disallowSpaceAfterPrefixUnaryOperators": [ "++", "--" ],
|
41
|
+
"disallowSpaceBeforePostfixUnaryOperators": [ "++", "--" ],
|
42
|
+
"disallowSpaceBeforeBinaryOperators": [ ",", ":" ],
|
43
|
+
|
44
|
+
"disallowMultipleLineBreaks": true,
|
45
|
+
"requireLineFeedAtFileEnd": true,
|
46
|
+
"validateLineBreaks": "LF"
|
47
|
+
}
|
@@ -0,0 +1,121 @@
|
|
1
|
+
/**
|
2
|
+
* Animate Plugin
|
3
|
+
* @version 2.3.4
|
4
|
+
* @author Bartosz Wojciechowski
|
5
|
+
* @author David Deutsch
|
6
|
+
* @license The MIT License (MIT)
|
7
|
+
*/
|
8
|
+
;(function($, window, document, undefined) {
|
9
|
+
|
10
|
+
/**
|
11
|
+
* Creates the animate plugin.
|
12
|
+
* @class The Navigation Plugin
|
13
|
+
* @param {Owl} scope - The Owl Carousel
|
14
|
+
*/
|
15
|
+
var Animate = function(scope) {
|
16
|
+
this.core = scope;
|
17
|
+
this.core.options = $.extend({}, Animate.Defaults, this.core.options);
|
18
|
+
this.swapping = true;
|
19
|
+
this.previous = undefined;
|
20
|
+
this.next = undefined;
|
21
|
+
|
22
|
+
this.handlers = {
|
23
|
+
'change.owl.carousel': $.proxy(function(e) {
|
24
|
+
if (e.namespace && e.property.name == 'position') {
|
25
|
+
this.previous = this.core.current();
|
26
|
+
this.next = e.property.value;
|
27
|
+
}
|
28
|
+
}, this),
|
29
|
+
'drag.owl.carousel dragged.owl.carousel translated.owl.carousel': $.proxy(function(e) {
|
30
|
+
if (e.namespace) {
|
31
|
+
this.swapping = e.type == 'translated';
|
32
|
+
}
|
33
|
+
}, this),
|
34
|
+
'translate.owl.carousel': $.proxy(function(e) {
|
35
|
+
if (e.namespace && this.swapping && (this.core.options.animateOut || this.core.options.animateIn)) {
|
36
|
+
this.swap();
|
37
|
+
}
|
38
|
+
}, this)
|
39
|
+
};
|
40
|
+
|
41
|
+
this.core.$element.on(this.handlers);
|
42
|
+
};
|
43
|
+
|
44
|
+
/**
|
45
|
+
* Default options.
|
46
|
+
* @public
|
47
|
+
*/
|
48
|
+
Animate.Defaults = {
|
49
|
+
animateOut: false,
|
50
|
+
animateIn: false
|
51
|
+
};
|
52
|
+
|
53
|
+
/**
|
54
|
+
* Toggles the animation classes whenever an translations starts.
|
55
|
+
* @protected
|
56
|
+
* @returns {Boolean|undefined}
|
57
|
+
*/
|
58
|
+
Animate.prototype.swap = function() {
|
59
|
+
|
60
|
+
if (this.core.settings.items !== 1) {
|
61
|
+
return;
|
62
|
+
}
|
63
|
+
|
64
|
+
if (!$.support.animation || !$.support.transition) {
|
65
|
+
return;
|
66
|
+
}
|
67
|
+
|
68
|
+
this.core.speed(0);
|
69
|
+
|
70
|
+
var left,
|
71
|
+
clear = $.proxy(this.clear, this),
|
72
|
+
previous = this.core.$stage.children().eq(this.previous),
|
73
|
+
next = this.core.$stage.children().eq(this.next),
|
74
|
+
incoming = this.core.settings.animateIn,
|
75
|
+
outgoing = this.core.settings.animateOut;
|
76
|
+
|
77
|
+
if (this.core.current() === this.previous) {
|
78
|
+
return;
|
79
|
+
}
|
80
|
+
|
81
|
+
if (outgoing) {
|
82
|
+
left = this.core.coordinates(this.previous) - this.core.coordinates(this.next);
|
83
|
+
previous.one($.support.animation.end, clear)
|
84
|
+
.css( { 'left': left + 'px' } )
|
85
|
+
.addClass('animated owl-animated-out')
|
86
|
+
.addClass(outgoing);
|
87
|
+
}
|
88
|
+
|
89
|
+
if (incoming) {
|
90
|
+
next.one($.support.animation.end, clear)
|
91
|
+
.addClass('animated owl-animated-in')
|
92
|
+
.addClass(incoming);
|
93
|
+
}
|
94
|
+
};
|
95
|
+
|
96
|
+
Animate.prototype.clear = function(e) {
|
97
|
+
$(e.target).css( { 'left': '' } )
|
98
|
+
.removeClass('animated owl-animated-out owl-animated-in')
|
99
|
+
.removeClass(this.core.settings.animateIn)
|
100
|
+
.removeClass(this.core.settings.animateOut);
|
101
|
+
this.core.onTransitionEnd();
|
102
|
+
};
|
103
|
+
|
104
|
+
/**
|
105
|
+
* Destroys the plugin.
|
106
|
+
* @public
|
107
|
+
*/
|
108
|
+
Animate.prototype.destroy = function() {
|
109
|
+
var handler, property;
|
110
|
+
|
111
|
+
for (handler in this.handlers) {
|
112
|
+
this.core.$element.off(handler, this.handlers[handler]);
|
113
|
+
}
|
114
|
+
for (property in Object.getOwnPropertyNames(this)) {
|
115
|
+
typeof this[property] != 'function' && (this[property] = null);
|
116
|
+
}
|
117
|
+
};
|
118
|
+
|
119
|
+
$.fn.owlCarousel.Constructor.Plugins.Animate = Animate;
|
120
|
+
|
121
|
+
})(window.Zepto || window.jQuery, window, document);
|
@@ -0,0 +1,132 @@
|
|
1
|
+
/**
|
2
|
+
* AutoHeight Plugin
|
3
|
+
* @version 2.3.4
|
4
|
+
* @author Bartosz Wojciechowski
|
5
|
+
* @author David Deutsch
|
6
|
+
* @license The MIT License (MIT)
|
7
|
+
*/
|
8
|
+
;(function($, window, document, undefined) {
|
9
|
+
|
10
|
+
/**
|
11
|
+
* Creates the auto height plugin.
|
12
|
+
* @class The Auto Height Plugin
|
13
|
+
* @param {Owl} carousel - The Owl Carousel
|
14
|
+
*/
|
15
|
+
var AutoHeight = function(carousel) {
|
16
|
+
/**
|
17
|
+
* Reference to the core.
|
18
|
+
* @protected
|
19
|
+
* @type {Owl}
|
20
|
+
*/
|
21
|
+
this._core = carousel;
|
22
|
+
|
23
|
+
this._previousHeight = null;
|
24
|
+
|
25
|
+
/**
|
26
|
+
* All event handlers.
|
27
|
+
* @protected
|
28
|
+
* @type {Object}
|
29
|
+
*/
|
30
|
+
this._handlers = {
|
31
|
+
'initialized.owl.carousel refreshed.owl.carousel': $.proxy(function(e) {
|
32
|
+
if (e.namespace && this._core.settings.autoHeight) {
|
33
|
+
this.update();
|
34
|
+
}
|
35
|
+
}, this),
|
36
|
+
'changed.owl.carousel': $.proxy(function(e) {
|
37
|
+
if (e.namespace && this._core.settings.autoHeight && e.property.name === 'position'){
|
38
|
+
this.update();
|
39
|
+
}
|
40
|
+
}, this),
|
41
|
+
'loaded.owl.lazy': $.proxy(function(e) {
|
42
|
+
if (e.namespace && this._core.settings.autoHeight
|
43
|
+
&& e.element.closest('.' + this._core.settings.itemClass).index() === this._core.current()) {
|
44
|
+
this.update();
|
45
|
+
}
|
46
|
+
}, this)
|
47
|
+
};
|
48
|
+
|
49
|
+
// set default options
|
50
|
+
this._core.options = $.extend({}, AutoHeight.Defaults, this._core.options);
|
51
|
+
|
52
|
+
// register event handlers
|
53
|
+
this._core.$element.on(this._handlers);
|
54
|
+
this._intervalId = null;
|
55
|
+
var refThis = this;
|
56
|
+
|
57
|
+
// These changes have been taken from a PR by gavrochelegnou proposed in #1575
|
58
|
+
// and have been made compatible with the latest jQuery version
|
59
|
+
$(window).on('load', function() {
|
60
|
+
if (refThis._core.settings.autoHeight) {
|
61
|
+
refThis.update();
|
62
|
+
}
|
63
|
+
});
|
64
|
+
|
65
|
+
// Autoresize the height of the carousel when window is resized
|
66
|
+
// When carousel has images, the height is dependent on the width
|
67
|
+
// and should also change on resize
|
68
|
+
$(window).resize(function() {
|
69
|
+
if (refThis._core.settings.autoHeight) {
|
70
|
+
if (refThis._intervalId != null) {
|
71
|
+
clearTimeout(refThis._intervalId);
|
72
|
+
}
|
73
|
+
|
74
|
+
refThis._intervalId = setTimeout(function() {
|
75
|
+
refThis.update();
|
76
|
+
}, 250);
|
77
|
+
}
|
78
|
+
});
|
79
|
+
|
80
|
+
};
|
81
|
+
|
82
|
+
/**
|
83
|
+
* Default options.
|
84
|
+
* @public
|
85
|
+
*/
|
86
|
+
AutoHeight.Defaults = {
|
87
|
+
autoHeight: false,
|
88
|
+
autoHeightClass: 'owl-height'
|
89
|
+
};
|
90
|
+
|
91
|
+
/**
|
92
|
+
* Updates the view.
|
93
|
+
*/
|
94
|
+
AutoHeight.prototype.update = function() {
|
95
|
+
var start = this._core._current,
|
96
|
+
end = start + this._core.settings.items,
|
97
|
+
lazyLoadEnabled = this._core.settings.lazyLoad,
|
98
|
+
visible = this._core.$stage.children().toArray().slice(start, end),
|
99
|
+
heights = [],
|
100
|
+
maxheight = 0;
|
101
|
+
|
102
|
+
$.each(visible, function(index, item) {
|
103
|
+
heights.push($(item).height());
|
104
|
+
});
|
105
|
+
|
106
|
+
maxheight = Math.max.apply(null, heights);
|
107
|
+
|
108
|
+
if (maxheight <= 1 && lazyLoadEnabled && this._previousHeight) {
|
109
|
+
maxheight = this._previousHeight;
|
110
|
+
}
|
111
|
+
|
112
|
+
this._previousHeight = maxheight;
|
113
|
+
|
114
|
+
this._core.$stage.parent()
|
115
|
+
.height(maxheight)
|
116
|
+
.addClass(this._core.settings.autoHeightClass);
|
117
|
+
};
|
118
|
+
|
119
|
+
AutoHeight.prototype.destroy = function() {
|
120
|
+
var handler, property;
|
121
|
+
|
122
|
+
for (handler in this._handlers) {
|
123
|
+
this._core.$element.off(handler, this._handlers[handler]);
|
124
|
+
}
|
125
|
+
for (property in Object.getOwnPropertyNames(this)) {
|
126
|
+
typeof this[property] !== 'function' && (this[property] = null);
|
127
|
+
}
|
128
|
+
};
|
129
|
+
|
130
|
+
$.fn.owlCarousel.Constructor.Plugins.AutoHeight = AutoHeight;
|
131
|
+
|
132
|
+
})(window.Zepto || window.jQuery, window, document);
|
@@ -0,0 +1,233 @@
|
|
1
|
+
/**
|
2
|
+
* Autoplay Plugin
|
3
|
+
* @version 2.3.4
|
4
|
+
* @author Bartosz Wojciechowski
|
5
|
+
* @author Artus Kolanowski
|
6
|
+
* @author David Deutsch
|
7
|
+
* @author Tom De Caluwé
|
8
|
+
* @license The MIT License (MIT)
|
9
|
+
*/
|
10
|
+
;(function($, window, document, undefined) {
|
11
|
+
|
12
|
+
/**
|
13
|
+
* Creates the autoplay plugin.
|
14
|
+
* @class The Autoplay Plugin
|
15
|
+
* @param {Owl} scope - The Owl Carousel
|
16
|
+
*/
|
17
|
+
var Autoplay = function(carousel) {
|
18
|
+
/**
|
19
|
+
* Reference to the core.
|
20
|
+
* @protected
|
21
|
+
* @type {Owl}
|
22
|
+
*/
|
23
|
+
this._core = carousel;
|
24
|
+
|
25
|
+
/**
|
26
|
+
* The autoplay timeout id.
|
27
|
+
* @type {Number}
|
28
|
+
*/
|
29
|
+
this._call = null;
|
30
|
+
|
31
|
+
/**
|
32
|
+
* Depending on the state of the plugin, this variable contains either
|
33
|
+
* the start time of the timer or the current timer value if it's
|
34
|
+
* paused. Since we start in a paused state we initialize the timer
|
35
|
+
* value.
|
36
|
+
* @type {Number}
|
37
|
+
*/
|
38
|
+
this._time = 0;
|
39
|
+
|
40
|
+
/**
|
41
|
+
* Stores the timeout currently used.
|
42
|
+
* @type {Number}
|
43
|
+
*/
|
44
|
+
this._timeout = 0;
|
45
|
+
|
46
|
+
/**
|
47
|
+
* Indicates whenever the autoplay is paused.
|
48
|
+
* @type {Boolean}
|
49
|
+
*/
|
50
|
+
this._paused = true;
|
51
|
+
|
52
|
+
/**
|
53
|
+
* All event handlers.
|
54
|
+
* @protected
|
55
|
+
* @type {Object}
|
56
|
+
*/
|
57
|
+
this._handlers = {
|
58
|
+
'changed.owl.carousel': $.proxy(function(e) {
|
59
|
+
if (e.namespace && e.property.name === 'settings') {
|
60
|
+
if (this._core.settings.autoplay) {
|
61
|
+
this.play();
|
62
|
+
} else {
|
63
|
+
this.stop();
|
64
|
+
}
|
65
|
+
} else if (e.namespace && e.property.name === 'position' && this._paused) {
|
66
|
+
// Reset the timer. This code is triggered when the position
|
67
|
+
// of the carousel was changed through user interaction.
|
68
|
+
this._time = 0;
|
69
|
+
}
|
70
|
+
}, this),
|
71
|
+
'initialized.owl.carousel': $.proxy(function(e) {
|
72
|
+
if (e.namespace && this._core.settings.autoplay) {
|
73
|
+
this.play();
|
74
|
+
}
|
75
|
+
}, this),
|
76
|
+
'play.owl.autoplay': $.proxy(function(e, t, s) {
|
77
|
+
if (e.namespace) {
|
78
|
+
this.play(t, s);
|
79
|
+
}
|
80
|
+
}, this),
|
81
|
+
'stop.owl.autoplay': $.proxy(function(e) {
|
82
|
+
if (e.namespace) {
|
83
|
+
this.stop();
|
84
|
+
}
|
85
|
+
}, this),
|
86
|
+
'mouseover.owl.autoplay': $.proxy(function() {
|
87
|
+
if (this._core.settings.autoplayHoverPause && this._core.is('rotating')) {
|
88
|
+
this.pause();
|
89
|
+
}
|
90
|
+
}, this),
|
91
|
+
'mouseleave.owl.autoplay': $.proxy(function() {
|
92
|
+
if (this._core.settings.autoplayHoverPause && this._core.is('rotating')) {
|
93
|
+
this.play();
|
94
|
+
}
|
95
|
+
}, this),
|
96
|
+
'touchstart.owl.core': $.proxy(function() {
|
97
|
+
if (this._core.settings.autoplayHoverPause && this._core.is('rotating')) {
|
98
|
+
this.pause();
|
99
|
+
}
|
100
|
+
}, this),
|
101
|
+
'touchend.owl.core': $.proxy(function() {
|
102
|
+
if (this._core.settings.autoplayHoverPause) {
|
103
|
+
this.play();
|
104
|
+
}
|
105
|
+
}, this)
|
106
|
+
};
|
107
|
+
|
108
|
+
// register event handlers
|
109
|
+
this._core.$element.on(this._handlers);
|
110
|
+
|
111
|
+
// set default options
|
112
|
+
this._core.options = $.extend({}, Autoplay.Defaults, this._core.options);
|
113
|
+
};
|
114
|
+
|
115
|
+
/**
|
116
|
+
* Default options.
|
117
|
+
* @public
|
118
|
+
*/
|
119
|
+
Autoplay.Defaults = {
|
120
|
+
autoplay: false,
|
121
|
+
autoplayTimeout: 5000,
|
122
|
+
autoplayHoverPause: false,
|
123
|
+
autoplaySpeed: false
|
124
|
+
};
|
125
|
+
|
126
|
+
/**
|
127
|
+
* Transition to the next slide and set a timeout for the next transition.
|
128
|
+
* @private
|
129
|
+
* @param {Number} [speed] - The animation speed for the animations.
|
130
|
+
*/
|
131
|
+
Autoplay.prototype._next = function(speed) {
|
132
|
+
this._call = window.setTimeout(
|
133
|
+
$.proxy(this._next, this, speed),
|
134
|
+
this._timeout * (Math.round(this.read() / this._timeout) + 1) - this.read()
|
135
|
+
);
|
136
|
+
|
137
|
+
if (this._core.is('interacting') || document.hidden) {
|
138
|
+
return;
|
139
|
+
}
|
140
|
+
this._core.next(speed || this._core.settings.autoplaySpeed);
|
141
|
+
}
|
142
|
+
|
143
|
+
/**
|
144
|
+
* Reads the current timer value when the timer is playing.
|
145
|
+
* @public
|
146
|
+
*/
|
147
|
+
Autoplay.prototype.read = function() {
|
148
|
+
return new Date().getTime() - this._time;
|
149
|
+
};
|
150
|
+
|
151
|
+
/**
|
152
|
+
* Starts the autoplay.
|
153
|
+
* @public
|
154
|
+
* @param {Number} [timeout] - The interval before the next animation starts.
|
155
|
+
* @param {Number} [speed] - The animation speed for the animations.
|
156
|
+
*/
|
157
|
+
Autoplay.prototype.play = function(timeout, speed) {
|
158
|
+
var elapsed;
|
159
|
+
|
160
|
+
if (!this._core.is('rotating')) {
|
161
|
+
this._core.enter('rotating');
|
162
|
+
}
|
163
|
+
|
164
|
+
timeout = timeout || this._core.settings.autoplayTimeout;
|
165
|
+
|
166
|
+
// Calculate the elapsed time since the last transition. If the carousel
|
167
|
+
// wasn't playing this calculation will yield zero.
|
168
|
+
elapsed = Math.min(this._time % (this._timeout || timeout), timeout);
|
169
|
+
|
170
|
+
if (this._paused) {
|
171
|
+
// Start the clock.
|
172
|
+
this._time = this.read();
|
173
|
+
this._paused = false;
|
174
|
+
} else {
|
175
|
+
// Clear the active timeout to allow replacement.
|
176
|
+
window.clearTimeout(this._call);
|
177
|
+
}
|
178
|
+
|
179
|
+
// Adjust the origin of the timer to match the new timeout value.
|
180
|
+
this._time += this.read() % timeout - elapsed;
|
181
|
+
|
182
|
+
this._timeout = timeout;
|
183
|
+
this._call = window.setTimeout($.proxy(this._next, this, speed), timeout - elapsed);
|
184
|
+
};
|
185
|
+
|
186
|
+
/**
|
187
|
+
* Stops the autoplay.
|
188
|
+
* @public
|
189
|
+
*/
|
190
|
+
Autoplay.prototype.stop = function() {
|
191
|
+
if (this._core.is('rotating')) {
|
192
|
+
// Reset the clock.
|
193
|
+
this._time = 0;
|
194
|
+
this._paused = true;
|
195
|
+
|
196
|
+
window.clearTimeout(this._call);
|
197
|
+
this._core.leave('rotating');
|
198
|
+
}
|
199
|
+
};
|
200
|
+
|
201
|
+
/**
|
202
|
+
* Pauses the autoplay.
|
203
|
+
* @public
|
204
|
+
*/
|
205
|
+
Autoplay.prototype.pause = function() {
|
206
|
+
if (this._core.is('rotating') && !this._paused) {
|
207
|
+
// Pause the clock.
|
208
|
+
this._time = this.read();
|
209
|
+
this._paused = true;
|
210
|
+
|
211
|
+
window.clearTimeout(this._call);
|
212
|
+
}
|
213
|
+
};
|
214
|
+
|
215
|
+
/**
|
216
|
+
* Destroys the plugin.
|
217
|
+
*/
|
218
|
+
Autoplay.prototype.destroy = function() {
|
219
|
+
var handler, property;
|
220
|
+
|
221
|
+
this.stop();
|
222
|
+
|
223
|
+
for (handler in this._handlers) {
|
224
|
+
this._core.$element.off(handler, this._handlers[handler]);
|
225
|
+
}
|
226
|
+
for (property in Object.getOwnPropertyNames(this)) {
|
227
|
+
typeof this[property] != 'function' && (this[property] = null);
|
228
|
+
}
|
229
|
+
};
|
230
|
+
|
231
|
+
$.fn.owlCarousel.Constructor.Plugins.autoplay = Autoplay;
|
232
|
+
|
233
|
+
})(window.Zepto || window.jQuery, window, document);
|