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,83 @@
|
|
1
|
+
/**
|
2
|
+
* Support Plugin
|
3
|
+
*
|
4
|
+
* @version 2.3.4
|
5
|
+
* @author Vivid Planet Software GmbH
|
6
|
+
* @author Artus Kolanowski
|
7
|
+
* @author David Deutsch
|
8
|
+
* @license The MIT License (MIT)
|
9
|
+
*/
|
10
|
+
;(function($, window, document, undefined) {
|
11
|
+
|
12
|
+
var style = $('<support>').get(0).style,
|
13
|
+
prefixes = 'Webkit Moz O ms'.split(' '),
|
14
|
+
events = {
|
15
|
+
transition: {
|
16
|
+
end: {
|
17
|
+
WebkitTransition: 'webkitTransitionEnd',
|
18
|
+
MozTransition: 'transitionend',
|
19
|
+
OTransition: 'oTransitionEnd',
|
20
|
+
transition: 'transitionend'
|
21
|
+
}
|
22
|
+
},
|
23
|
+
animation: {
|
24
|
+
end: {
|
25
|
+
WebkitAnimation: 'webkitAnimationEnd',
|
26
|
+
MozAnimation: 'animationend',
|
27
|
+
OAnimation: 'oAnimationEnd',
|
28
|
+
animation: 'animationend'
|
29
|
+
}
|
30
|
+
}
|
31
|
+
},
|
32
|
+
tests = {
|
33
|
+
csstransforms: function() {
|
34
|
+
return !!test('transform');
|
35
|
+
},
|
36
|
+
csstransforms3d: function() {
|
37
|
+
return !!test('perspective');
|
38
|
+
},
|
39
|
+
csstransitions: function() {
|
40
|
+
return !!test('transition');
|
41
|
+
},
|
42
|
+
cssanimations: function() {
|
43
|
+
return !!test('animation');
|
44
|
+
}
|
45
|
+
};
|
46
|
+
|
47
|
+
function test(property, prefixed) {
|
48
|
+
var result = false,
|
49
|
+
upper = property.charAt(0).toUpperCase() + property.slice(1);
|
50
|
+
|
51
|
+
$.each((property + ' ' + prefixes.join(upper + ' ') + upper).split(' '), function(i, property) {
|
52
|
+
if (style[property] !== undefined) {
|
53
|
+
result = prefixed ? property : true;
|
54
|
+
return false;
|
55
|
+
}
|
56
|
+
});
|
57
|
+
|
58
|
+
return result;
|
59
|
+
}
|
60
|
+
|
61
|
+
function prefixed(property) {
|
62
|
+
return test(property, true);
|
63
|
+
}
|
64
|
+
|
65
|
+
if (tests.csstransitions()) {
|
66
|
+
/* jshint -W053 */
|
67
|
+
$.support.transition = new String(prefixed('transition'))
|
68
|
+
$.support.transition.end = events.transition.end[ $.support.transition ];
|
69
|
+
}
|
70
|
+
|
71
|
+
if (tests.cssanimations()) {
|
72
|
+
/* jshint -W053 */
|
73
|
+
$.support.animation = new String(prefixed('animation'))
|
74
|
+
$.support.animation.end = events.animation.end[ $.support.animation ];
|
75
|
+
}
|
76
|
+
|
77
|
+
if (tests.csstransforms()) {
|
78
|
+
/* jshint -W053 */
|
79
|
+
$.support.transform = new String(prefixed('transform'));
|
80
|
+
$.support.transform3d = tests.csstransforms3d();
|
81
|
+
}
|
82
|
+
|
83
|
+
})(window.Zepto || window.jQuery, window, document);
|
@@ -0,0 +1,66 @@
|
|
1
|
+
/**
|
2
|
+
* Modernizr Support Plugin
|
3
|
+
*
|
4
|
+
* @version 2.3.4
|
5
|
+
* @author Vivid Planet Software GmbH
|
6
|
+
* @author Artus Kolanowski
|
7
|
+
* @author David Deutsch
|
8
|
+
* @license The MIT License (MIT)
|
9
|
+
*/
|
10
|
+
;(function($, Modernizr, window, document, undefined) {
|
11
|
+
|
12
|
+
var events = {
|
13
|
+
transition: {
|
14
|
+
end: {
|
15
|
+
WebkitTransition: 'webkitTransitionEnd',
|
16
|
+
MozTransition: 'transitionend',
|
17
|
+
OTransition: 'oTransitionEnd',
|
18
|
+
transition: 'transitionend'
|
19
|
+
}
|
20
|
+
},
|
21
|
+
animation: {
|
22
|
+
end: {
|
23
|
+
WebkitAnimation: 'webkitAnimationEnd',
|
24
|
+
MozAnimation: 'animationend',
|
25
|
+
OAnimation: 'oAnimationEnd',
|
26
|
+
animation: 'animationend'
|
27
|
+
}
|
28
|
+
}
|
29
|
+
};
|
30
|
+
|
31
|
+
if (!Modernizr) {
|
32
|
+
throw new Error('Modernizr is not loaded.');
|
33
|
+
}
|
34
|
+
|
35
|
+
$.each([ 'cssanimations', 'csstransitions', 'csstransforms', 'csstransforms3d', 'prefixed' ], function(i, property) {
|
36
|
+
if (typeof Modernizr[property] == 'undefined') {
|
37
|
+
throw new Error([ 'Modernizr "', property, '" is not loaded.' ].join(''));
|
38
|
+
}
|
39
|
+
});
|
40
|
+
|
41
|
+
if (Modernizr.csstransitions) {
|
42
|
+
/* jshint -W053 */
|
43
|
+
$.support.transition = new String(Modernizr.prefixed('transition'))
|
44
|
+
$.support.transition.end = events.transition.end[ $.support.transition ];
|
45
|
+
// fix transitionend support detection, which does not work properly for older Android versions,
|
46
|
+
// as it does not give the prefixed event name. here we use Modernizr to ensure the correct event.
|
47
|
+
// see:
|
48
|
+
// https://github.com/Modernizr/Modernizr/issues/897
|
49
|
+
// https://github.com/niksy/modernizr-detects/commit/05d148fc4f3813b1412c836325a9ca78c7a63f4d
|
50
|
+
if (/Android 4\.[123]/.test(navigator.userAgent)) {
|
51
|
+
$.support.transition.end = 'webkitTransitionEnd';
|
52
|
+
}
|
53
|
+
}
|
54
|
+
|
55
|
+
if (Modernizr.cssanimations) {
|
56
|
+
/* jshint -W053 */
|
57
|
+
$.support.animation = new String(Modernizr.prefixed('animation'))
|
58
|
+
$.support.animation.end = events.animation.end[ $.support.animation ];
|
59
|
+
}
|
60
|
+
|
61
|
+
if (Modernizr.csstransforms) {
|
62
|
+
/* jshint -W053 */
|
63
|
+
$.support.transform = new String(Modernizr.prefixed('transform'));
|
64
|
+
$.support.transform3d = Modernizr.csstransforms3d;
|
65
|
+
}
|
66
|
+
})(window.Zepto || window.jQuery, window.Modernizr, window, document);
|
@@ -0,0 +1,327 @@
|
|
1
|
+
/**
|
2
|
+
* Video 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 video plugin.
|
12
|
+
* @class The Video Plugin
|
13
|
+
* @param {Owl} carousel - The Owl Carousel
|
14
|
+
*/
|
15
|
+
var Video = function(carousel) {
|
16
|
+
/**
|
17
|
+
* Reference to the core.
|
18
|
+
* @protected
|
19
|
+
* @type {Owl}
|
20
|
+
*/
|
21
|
+
this._core = carousel;
|
22
|
+
|
23
|
+
/**
|
24
|
+
* Cache all video URLs.
|
25
|
+
* @protected
|
26
|
+
* @type {Object}
|
27
|
+
*/
|
28
|
+
this._videos = {};
|
29
|
+
|
30
|
+
/**
|
31
|
+
* Current playing item.
|
32
|
+
* @protected
|
33
|
+
* @type {jQuery}
|
34
|
+
*/
|
35
|
+
this._playing = null;
|
36
|
+
|
37
|
+
/**
|
38
|
+
* All event handlers.
|
39
|
+
* @todo The cloned content removale is too late
|
40
|
+
* @protected
|
41
|
+
* @type {Object}
|
42
|
+
*/
|
43
|
+
this._handlers = {
|
44
|
+
'initialized.owl.carousel': $.proxy(function(e) {
|
45
|
+
if (e.namespace) {
|
46
|
+
this._core.register({ type: 'state', name: 'playing', tags: [ 'interacting' ] });
|
47
|
+
}
|
48
|
+
}, this),
|
49
|
+
'resize.owl.carousel': $.proxy(function(e) {
|
50
|
+
if (e.namespace && this._core.settings.video && this.isInFullScreen()) {
|
51
|
+
e.preventDefault();
|
52
|
+
}
|
53
|
+
}, this),
|
54
|
+
'refreshed.owl.carousel': $.proxy(function(e) {
|
55
|
+
if (e.namespace && this._core.is('resizing')) {
|
56
|
+
this._core.$stage.find('.cloned .owl-video-frame').remove();
|
57
|
+
}
|
58
|
+
}, this),
|
59
|
+
'changed.owl.carousel': $.proxy(function(e) {
|
60
|
+
if (e.namespace && e.property.name === 'position' && this._playing) {
|
61
|
+
this.stop();
|
62
|
+
}
|
63
|
+
}, this),
|
64
|
+
'prepared.owl.carousel': $.proxy(function(e) {
|
65
|
+
if (!e.namespace) {
|
66
|
+
return;
|
67
|
+
}
|
68
|
+
|
69
|
+
var $element = $(e.content).find('.owl-video');
|
70
|
+
|
71
|
+
if ($element.length) {
|
72
|
+
$element.css('display', 'none');
|
73
|
+
this.fetch($element, $(e.content));
|
74
|
+
}
|
75
|
+
}, this)
|
76
|
+
};
|
77
|
+
|
78
|
+
// set default options
|
79
|
+
this._core.options = $.extend({}, Video.Defaults, this._core.options);
|
80
|
+
|
81
|
+
// register event handlers
|
82
|
+
this._core.$element.on(this._handlers);
|
83
|
+
|
84
|
+
this._core.$element.on('click.owl.video', '.owl-video-play-icon', $.proxy(function(e) {
|
85
|
+
this.play(e);
|
86
|
+
}, this));
|
87
|
+
};
|
88
|
+
|
89
|
+
/**
|
90
|
+
* Default options.
|
91
|
+
* @public
|
92
|
+
*/
|
93
|
+
Video.Defaults = {
|
94
|
+
video: false,
|
95
|
+
videoHeight: false,
|
96
|
+
videoWidth: false
|
97
|
+
};
|
98
|
+
|
99
|
+
/**
|
100
|
+
* Gets the video ID and the type (YouTube/Vimeo/vzaar only).
|
101
|
+
* @protected
|
102
|
+
* @param {jQuery} target - The target containing the video data.
|
103
|
+
* @param {jQuery} item - The item containing the video.
|
104
|
+
*/
|
105
|
+
Video.prototype.fetch = function(target, item) {
|
106
|
+
var type = (function() {
|
107
|
+
if (target.attr('data-vimeo-id')) {
|
108
|
+
return 'vimeo';
|
109
|
+
} else if (target.attr('data-vzaar-id')) {
|
110
|
+
return 'vzaar'
|
111
|
+
} else {
|
112
|
+
return 'youtube';
|
113
|
+
}
|
114
|
+
})(),
|
115
|
+
id = target.attr('data-vimeo-id') || target.attr('data-youtube-id') || target.attr('data-vzaar-id'),
|
116
|
+
width = target.attr('data-width') || this._core.settings.videoWidth,
|
117
|
+
height = target.attr('data-height') || this._core.settings.videoHeight,
|
118
|
+
url = target.attr('href');
|
119
|
+
|
120
|
+
if (url) {
|
121
|
+
|
122
|
+
/*
|
123
|
+
Parses the id's out of the following urls (and probably more):
|
124
|
+
https://www.youtube.com/watch?v=:id
|
125
|
+
https://youtu.be/:id
|
126
|
+
https://vimeo.com/:id
|
127
|
+
https://vimeo.com/channels/:channel/:id
|
128
|
+
https://vimeo.com/groups/:group/videos/:id
|
129
|
+
https://app.vzaar.com/videos/:id
|
130
|
+
|
131
|
+
Visual example: https://regexper.com/#(http%3A%7Chttps%3A%7C)%5C%2F%5C%2F(player.%7Cwww.%7Capp.)%3F(vimeo%5C.com%7Cyoutu(be%5C.com%7C%5C.be%7Cbe%5C.googleapis%5C.com)%7Cvzaar%5C.com)%5C%2F(video%5C%2F%7Cvideos%5C%2F%7Cembed%5C%2F%7Cchannels%5C%2F.%2B%5C%2F%7Cgroups%5C%2F.%2B%5C%2F%7Cwatch%5C%3Fv%3D%7Cv%5C%2F)%3F(%5BA-Za-z0-9._%25-%5D*)(%5C%26%5CS%2B)%3F
|
132
|
+
*/
|
133
|
+
|
134
|
+
id = url.match(/(http:|https:|)\/\/(player.|www.|app.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com|be\-nocookie\.com)|vzaar\.com)\/(video\/|videos\/|embed\/|channels\/.+\/|groups\/.+\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/);
|
135
|
+
|
136
|
+
if (id[3].indexOf('youtu') > -1) {
|
137
|
+
type = 'youtube';
|
138
|
+
} else if (id[3].indexOf('vimeo') > -1) {
|
139
|
+
type = 'vimeo';
|
140
|
+
} else if (id[3].indexOf('vzaar') > -1) {
|
141
|
+
type = 'vzaar';
|
142
|
+
} else {
|
143
|
+
throw new Error('Video URL not supported.');
|
144
|
+
}
|
145
|
+
id = id[6];
|
146
|
+
} else {
|
147
|
+
throw new Error('Missing video URL.');
|
148
|
+
}
|
149
|
+
|
150
|
+
this._videos[url] = {
|
151
|
+
type: type,
|
152
|
+
id: id,
|
153
|
+
width: width,
|
154
|
+
height: height
|
155
|
+
};
|
156
|
+
|
157
|
+
item.attr('data-video', url);
|
158
|
+
|
159
|
+
this.thumbnail(target, this._videos[url]);
|
160
|
+
};
|
161
|
+
|
162
|
+
/**
|
163
|
+
* Creates video thumbnail.
|
164
|
+
* @protected
|
165
|
+
* @param {jQuery} target - The target containing the video data.
|
166
|
+
* @param {Object} info - The video info object.
|
167
|
+
* @see `fetch`
|
168
|
+
*/
|
169
|
+
Video.prototype.thumbnail = function(target, video) {
|
170
|
+
var tnLink,
|
171
|
+
icon,
|
172
|
+
path,
|
173
|
+
dimensions = video.width && video.height ? 'width:' + video.width + 'px;height:' + video.height + 'px;' : '',
|
174
|
+
customTn = target.find('img'),
|
175
|
+
srcType = 'src',
|
176
|
+
lazyClass = '',
|
177
|
+
settings = this._core.settings,
|
178
|
+
create = function(path) {
|
179
|
+
icon = '<div class="owl-video-play-icon"></div>';
|
180
|
+
|
181
|
+
if (settings.lazyLoad) {
|
182
|
+
tnLink = $('<div/>',{
|
183
|
+
"class": 'owl-video-tn ' + lazyClass,
|
184
|
+
"srcType": path
|
185
|
+
});
|
186
|
+
} else {
|
187
|
+
tnLink = $( '<div/>', {
|
188
|
+
"class": "owl-video-tn",
|
189
|
+
"style": 'opacity:1;background-image:url(' + path + ')'
|
190
|
+
});
|
191
|
+
}
|
192
|
+
target.after(tnLink);
|
193
|
+
target.after(icon);
|
194
|
+
};
|
195
|
+
|
196
|
+
// wrap video content into owl-video-wrapper div
|
197
|
+
target.wrap( $( '<div/>', {
|
198
|
+
"class": "owl-video-wrapper",
|
199
|
+
"style": dimensions
|
200
|
+
}));
|
201
|
+
|
202
|
+
if (this._core.settings.lazyLoad) {
|
203
|
+
srcType = 'data-src';
|
204
|
+
lazyClass = 'owl-lazy';
|
205
|
+
}
|
206
|
+
|
207
|
+
// custom thumbnail
|
208
|
+
if (customTn.length) {
|
209
|
+
create(customTn.attr(srcType));
|
210
|
+
customTn.remove();
|
211
|
+
return false;
|
212
|
+
}
|
213
|
+
|
214
|
+
if (video.type === 'youtube') {
|
215
|
+
path = "//img.youtube.com/vi/" + video.id + "/hqdefault.jpg";
|
216
|
+
create(path);
|
217
|
+
} else if (video.type === 'vimeo') {
|
218
|
+
$.ajax({
|
219
|
+
type: 'GET',
|
220
|
+
url: '//vimeo.com/api/v2/video/' + video.id + '.json',
|
221
|
+
jsonp: 'callback',
|
222
|
+
dataType: 'jsonp',
|
223
|
+
success: function(data) {
|
224
|
+
path = data[0].thumbnail_large;
|
225
|
+
create(path);
|
226
|
+
}
|
227
|
+
});
|
228
|
+
} else if (video.type === 'vzaar') {
|
229
|
+
$.ajax({
|
230
|
+
type: 'GET',
|
231
|
+
url: '//vzaar.com/api/videos/' + video.id + '.json',
|
232
|
+
jsonp: 'callback',
|
233
|
+
dataType: 'jsonp',
|
234
|
+
success: function(data) {
|
235
|
+
path = data.framegrab_url;
|
236
|
+
create(path);
|
237
|
+
}
|
238
|
+
});
|
239
|
+
}
|
240
|
+
};
|
241
|
+
|
242
|
+
/**
|
243
|
+
* Stops the current video.
|
244
|
+
* @public
|
245
|
+
*/
|
246
|
+
Video.prototype.stop = function() {
|
247
|
+
this._core.trigger('stop', null, 'video');
|
248
|
+
this._playing.find('.owl-video-frame').remove();
|
249
|
+
this._playing.removeClass('owl-video-playing');
|
250
|
+
this._playing = null;
|
251
|
+
this._core.leave('playing');
|
252
|
+
this._core.trigger('stopped', null, 'video');
|
253
|
+
};
|
254
|
+
|
255
|
+
/**
|
256
|
+
* Starts the current video.
|
257
|
+
* @public
|
258
|
+
* @param {Event} event - The event arguments.
|
259
|
+
*/
|
260
|
+
Video.prototype.play = function(event) {
|
261
|
+
var target = $(event.target),
|
262
|
+
item = target.closest('.' + this._core.settings.itemClass),
|
263
|
+
video = this._videos[item.attr('data-video')],
|
264
|
+
width = video.width || '100%',
|
265
|
+
height = video.height || this._core.$stage.height(),
|
266
|
+
html,
|
267
|
+
iframe;
|
268
|
+
|
269
|
+
if (this._playing) {
|
270
|
+
return;
|
271
|
+
}
|
272
|
+
|
273
|
+
this._core.enter('playing');
|
274
|
+
this._core.trigger('play', null, 'video');
|
275
|
+
|
276
|
+
item = this._core.items(this._core.relative(item.index()));
|
277
|
+
|
278
|
+
this._core.reset(item.index());
|
279
|
+
|
280
|
+
html = $( '<iframe frameborder="0" allowfullscreen mozallowfullscreen webkitAllowFullScreen ></iframe>' );
|
281
|
+
html.attr( 'height', height );
|
282
|
+
html.attr( 'width', width );
|
283
|
+
if (video.type === 'youtube') {
|
284
|
+
html.attr( 'src', '//www.youtube.com/embed/' + video.id + '?autoplay=1&rel=0&v=' + video.id );
|
285
|
+
} else if (video.type === 'vimeo') {
|
286
|
+
html.attr( 'src', '//player.vimeo.com/video/' + video.id + '?autoplay=1' );
|
287
|
+
} else if (video.type === 'vzaar') {
|
288
|
+
html.attr( 'src', '//view.vzaar.com/' + video.id + '/player?autoplay=true' );
|
289
|
+
}
|
290
|
+
|
291
|
+
iframe = $(html).wrap( '<div class="owl-video-frame" />' ).insertAfter(item.find('.owl-video'));
|
292
|
+
|
293
|
+
this._playing = item.addClass('owl-video-playing');
|
294
|
+
};
|
295
|
+
|
296
|
+
/**
|
297
|
+
* Checks whether an video is currently in full screen mode or not.
|
298
|
+
* @todo Bad style because looks like a readonly method but changes members.
|
299
|
+
* @protected
|
300
|
+
* @returns {Boolean}
|
301
|
+
*/
|
302
|
+
Video.prototype.isInFullScreen = function() {
|
303
|
+
var element = document.fullscreenElement || document.mozFullScreenElement ||
|
304
|
+
document.webkitFullscreenElement;
|
305
|
+
|
306
|
+
return element && $(element).parent().hasClass('owl-video-frame');
|
307
|
+
};
|
308
|
+
|
309
|
+
/**
|
310
|
+
* Destroys the plugin.
|
311
|
+
*/
|
312
|
+
Video.prototype.destroy = function() {
|
313
|
+
var handler, property;
|
314
|
+
|
315
|
+
this._core.$element.off('click.owl.video');
|
316
|
+
|
317
|
+
for (handler in this._handlers) {
|
318
|
+
this._core.$element.off(handler, this._handlers[handler]);
|
319
|
+
}
|
320
|
+
for (property in Object.getOwnPropertyNames(this)) {
|
321
|
+
typeof this[property] != 'function' && (this[property] = null);
|
322
|
+
}
|
323
|
+
};
|
324
|
+
|
325
|
+
$.fn.owlCarousel.Constructor.Plugins.Video = Video;
|
326
|
+
|
327
|
+
})(window.Zepto || window.jQuery, window, document);
|