jekyll-theme-glueckkanja 0.8.3 → 0.8.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -3
- data/_sass/font-awesome/scss/_icons.scss +91 -0
- data/_sass/font-awesome/scss/_rotated-flipped.scss +3 -2
- data/_sass/font-awesome/scss/_variables.scss +93 -1
- data/_sass/font-awesome/scss/brands.scss +1 -4
- data/_sass/font-awesome/scss/fontawesome.scss +0 -4
- data/_sass/font-awesome/scss/regular.scss +1 -4
- data/_sass/font-awesome/scss/solid.scss +1 -4
- data/_sass/font-awesome/scss/v4-shims.scss +0 -4
- data/assets/favicons/de.svg +5 -0
- data/assets/favicons/gk-logo-white.png +0 -0
- data/assets/favicons/us.svg +10 -0
- data/assets/img/cbp-sprite.png +0 -0
- data/assets/js/components/_hs.dropdown.js +612 -0
- data/assets/js/components/gmap/hs.map.js +347 -0
- data/assets/js/components/hs.ajax-autocomplete.js +103 -0
- data/assets/js/components/hs.autocomplete-local-search.js +113 -0
- data/assets/js/components/hs.autocomplete.js +125 -0
- data/assets/js/components/hs.bg-video.js +70 -0
- data/assets/js/components/hs.carousel-materialize.js +75 -0
- data/assets/js/components/hs.carousel-owl.js +89 -0
- data/assets/js/components/hs.carousel-swiper.js +123 -0
- data/assets/js/components/hs.carousel.js +283 -0
- data/assets/js/components/hs.chart-pie.js +220 -0
- data/assets/js/components/hs.chart.js +155 -0
- data/assets/js/components/hs.count-qty.js +92 -0
- data/assets/js/components/hs.countdown.js +359 -0
- data/assets/js/components/hs.counter.js +220 -0
- data/assets/js/components/hs.cubeportfolio.js +163 -0
- data/assets/js/components/hs.datepicker.js +149 -0
- data/assets/js/components/hs.dropdown.js +522 -0
- data/assets/js/components/hs.file-attachement.js +135 -0
- data/assets/js/components/hs.flickr.js +180 -0
- data/assets/js/components/hs.go-to.js +121 -0
- data/assets/js/components/hs.header-fullscreen.js +397 -0
- data/assets/js/components/hs.header-side.js +1096 -0
- data/assets/js/components/hs.header.js +2128 -0
- data/assets/js/components/hs.instagram.js +94 -0
- data/assets/js/components/hs.map.pin.js +82 -0
- data/assets/js/components/hs.map.svg.js +80 -0
- data/assets/js/components/hs.markup-copy.js +102 -0
- data/assets/js/components/hs.masked-input.js +74 -0
- data/assets/js/components/hs.modal-event.js +134 -0
- data/assets/js/components/hs.modal-window.js +422 -0
- data/assets/js/components/hs.navigation.js +690 -0
- data/assets/js/components/hs.nl-form.js +70 -0
- data/assets/js/components/hs.onscroll-animation.js +190 -0
- data/assets/js/components/hs.popup.js +310 -0
- data/assets/js/components/hs.progress-bar.js +353 -0
- data/assets/js/components/hs.rating.js +153 -0
- data/assets/js/components/hs.scroll-nav.js +373 -0
- data/assets/js/components/hs.scrollbar.js +102 -0
- data/assets/js/components/hs.select.js +91 -0
- data/assets/js/components/hs.slider.js +99 -0
- data/assets/js/components/hs.smart-menu.js +233 -0
- data/assets/js/components/hs.step-form-old.js +94 -0
- data/assets/js/components/hs.step-form.js +93 -0
- data/assets/js/components/hs.sticky-block.js +418 -0
- data/assets/js/components/hs.tabs.js +186 -0
- data/assets/js/components/hs.twitter.js +111 -0
- data/assets/js/components/hs.validation.js +111 -0
- data/assets/js/components/hs.video-audio.js +70 -0
- data/assets/js/components/text-animation/hs.text-slideshow.js +348 -0
- data/assets/js/helpers/hs.bg-video.js +23 -0
- data/assets/js/helpers/hs.chart.js +66 -0
- data/assets/js/helpers/hs.compressed-form.js +55 -0
- data/assets/js/helpers/hs.file-attachments.js +39 -0
- data/assets/js/helpers/hs.focus-state.js +37 -0
- data/assets/js/helpers/hs.hamburgers.js +69 -0
- data/assets/js/helpers/hs.height-calc.js +31 -0
- data/assets/js/helpers/hs.hover-blocks.js +43 -0
- data/assets/js/helpers/hs.modal-markup.js +89 -0
- data/assets/js/helpers/hs.navigation-splitted.js +169 -0
- data/assets/js/helpers/hs.not-empty-state.js +34 -0
- data/assets/js/helpers/hs.rating.js +45 -0
- data/assets/js/helpers/hs.selecter.js +14 -0
- data/assets/js/helpers/hs.shortcode-filter.js +39 -0
- data/assets/js/hs.core.js +250 -0
- data/assets/js/hs.popup.js +155 -0
- data/assets/js/vendor/jquery.cubeportfolio.js +6054 -0
- data/assets/js/vendor/jquery.fancybox.js +4936 -0
- data/assets/nav/pixel-trans.png +0 -0
- data/assets/nav/pixel-trans@2x.png +0 -0
- metadata +75 -1
@@ -0,0 +1,70 @@
|
|
1
|
+
/**
|
2
|
+
* NL Form wrapper.
|
3
|
+
*
|
4
|
+
* @author Htmlstream
|
5
|
+
* @version 1.0
|
6
|
+
*
|
7
|
+
*/
|
8
|
+
;(function ($) {
|
9
|
+
'use strict';
|
10
|
+
|
11
|
+
$.HSCore.components.HSNLForm = {
|
12
|
+
/**
|
13
|
+
*
|
14
|
+
*
|
15
|
+
* @var Object _baseConfig
|
16
|
+
*/
|
17
|
+
_baseConfig: {},
|
18
|
+
|
19
|
+
/**
|
20
|
+
*
|
21
|
+
*
|
22
|
+
* @var jQuery pageCollection
|
23
|
+
*/
|
24
|
+
pageCollection: $(),
|
25
|
+
|
26
|
+
/**
|
27
|
+
* Initialization of NL Form wrapper.
|
28
|
+
*
|
29
|
+
* @param String selector (optional)
|
30
|
+
* @param Object config (optional)
|
31
|
+
*
|
32
|
+
* @return jQuery pageCollection - collection of initialized items.
|
33
|
+
*/
|
34
|
+
|
35
|
+
init: function (selector, config) {
|
36
|
+
|
37
|
+
this.collection = selector && $(selector).length ? $(selector) : $();
|
38
|
+
if (!$(selector).length) return;
|
39
|
+
|
40
|
+
this.config = config && $.isPlainObject(config) ?
|
41
|
+
$.extend({}, this._baseConfig, config) : this._baseConfig;
|
42
|
+
|
43
|
+
this.config.itemSelector = selector;
|
44
|
+
|
45
|
+
this.initNLForm();
|
46
|
+
|
47
|
+
return this.pageCollection;
|
48
|
+
|
49
|
+
},
|
50
|
+
|
51
|
+
initNLForm: function () {
|
52
|
+
//Variables
|
53
|
+
var $self = this,
|
54
|
+
collection = $self.pageCollection;
|
55
|
+
|
56
|
+
//Actions
|
57
|
+
this.collection.each(function (i, el) {
|
58
|
+
var $this = $(el)[0].id;
|
59
|
+
|
60
|
+
//Variables
|
61
|
+
var nlform = new NLForm(document.getElementById($this));
|
62
|
+
|
63
|
+
//Actions
|
64
|
+
collection = collection.add($this);
|
65
|
+
});
|
66
|
+
}
|
67
|
+
|
68
|
+
};
|
69
|
+
|
70
|
+
})(jQuery);
|
@@ -0,0 +1,190 @@
|
|
1
|
+
/**
|
2
|
+
* Wrapper for creating animation when an element appear in the screen.
|
3
|
+
*
|
4
|
+
* @author Htmlstream
|
5
|
+
* @version 1.0
|
6
|
+
* @requires appear.js
|
7
|
+
*
|
8
|
+
*/
|
9
|
+
;
|
10
|
+
(function($) {
|
11
|
+
'use strict';
|
12
|
+
|
13
|
+
$.HSCore.components.HSOnScrollAnimation = {
|
14
|
+
|
15
|
+
/**
|
16
|
+
* Base configuration.
|
17
|
+
*
|
18
|
+
* @var Object _baseConfig
|
19
|
+
*/
|
20
|
+
_baseConfig: {
|
21
|
+
bounds: -100,
|
22
|
+
debounce: 50,
|
23
|
+
inViewportClass: 'u-in-viewport',
|
24
|
+
animation: 'fadeInUp',
|
25
|
+
animationOut: false,
|
26
|
+
animationDelay: 0,
|
27
|
+
animationDuration: 1000,
|
28
|
+
afterShow: function(){},
|
29
|
+
onShown: function(){},
|
30
|
+
onHidded: function(){}
|
31
|
+
},
|
32
|
+
|
33
|
+
/**
|
34
|
+
* Collection of all instances of the page.
|
35
|
+
*
|
36
|
+
* @var jQuery _pageCollection
|
37
|
+
*/
|
38
|
+
_pageCollection: $(),
|
39
|
+
|
40
|
+
|
41
|
+
/**
|
42
|
+
* Initialization of animation.
|
43
|
+
*
|
44
|
+
* @param jQuery selector (optional)
|
45
|
+
* @param Object config (optional)
|
46
|
+
*
|
47
|
+
* @return jQuery _pageCollection - collection of initialized items.
|
48
|
+
*/
|
49
|
+
init: function(selector, config) {
|
50
|
+
|
51
|
+
if( !selector || !$(selector).length ) return;
|
52
|
+
|
53
|
+
var self = this;
|
54
|
+
|
55
|
+
this.config = config && $.isPlainObject(config) ? $.extend(true, {}, this._baseConfig, config) : this._baseConfig;
|
56
|
+
|
57
|
+
appear({
|
58
|
+
bounds: self.config['bounds'],
|
59
|
+
reappear: false,
|
60
|
+
debounce: self.config['debounce'],
|
61
|
+
elements: function(){
|
62
|
+
return document.querySelectorAll(selector);
|
63
|
+
},
|
64
|
+
init: function() {
|
65
|
+
$(selector).each(function(i, el){
|
66
|
+
|
67
|
+
var $this = $(el);
|
68
|
+
|
69
|
+
if(!$this.data('HSAnimationElement')) {
|
70
|
+
$this.data('HSAnimationElement', new HSAnimationElement( $this, self.config ));
|
71
|
+
|
72
|
+
self._pageCollection = self._pageCollection.add($this);
|
73
|
+
}
|
74
|
+
|
75
|
+
});
|
76
|
+
},
|
77
|
+
appear: function(el) {
|
78
|
+
|
79
|
+
var $el = $(el);
|
80
|
+
|
81
|
+
if(!$el.hasClass( self.config.inViewportClass )) {
|
82
|
+
$el.data('HSAnimationElement').show();
|
83
|
+
}
|
84
|
+
}
|
85
|
+
|
86
|
+
})
|
87
|
+
|
88
|
+
|
89
|
+
return this._pageCollection;
|
90
|
+
|
91
|
+
}
|
92
|
+
|
93
|
+
}
|
94
|
+
|
95
|
+
/**
|
96
|
+
* HSAnimationElement constructor function.
|
97
|
+
*
|
98
|
+
* @param jQuery element
|
99
|
+
* @param Object config
|
100
|
+
*
|
101
|
+
* @return undefined
|
102
|
+
*/
|
103
|
+
function HSAnimationElement(element, config) {
|
104
|
+
|
105
|
+
if( !element || !element.length ) return;
|
106
|
+
|
107
|
+
var self = this;
|
108
|
+
|
109
|
+
this.element = element;
|
110
|
+
this.config = config && $.isPlainObject(config) ? $.extend(true, {}, config, element.data()) : element.data();
|
111
|
+
|
112
|
+
if( !isFinite( this.config.animationDelay ) ) this.config.animationDelay = 0;
|
113
|
+
if( !isFinite( this.config.animationDuration ) ) this.config.animationDuration = 1000;
|
114
|
+
|
115
|
+
element.css({
|
116
|
+
'animation-duration': self.config.animationDuration + 'ms'
|
117
|
+
});
|
118
|
+
|
119
|
+
}
|
120
|
+
|
121
|
+
/**
|
122
|
+
* Shows element.
|
123
|
+
*
|
124
|
+
* @return undefined
|
125
|
+
*/
|
126
|
+
HSAnimationElement.prototype.show = function() {
|
127
|
+
|
128
|
+
var self = this;
|
129
|
+
|
130
|
+
if(this.config.animationDelay) {
|
131
|
+
this.timeOutId = setTimeout( function(){
|
132
|
+
|
133
|
+
self.element
|
134
|
+
.removeClass(self.config.animationOut)
|
135
|
+
.addClass(self.config.animation + ' ' + self.config.inViewportClass);
|
136
|
+
self.config.afterShow.call( self.element );
|
137
|
+
|
138
|
+
self.callbackTimeoutId = setTimeout( function(){
|
139
|
+
self.config.onShown.call( self.element );
|
140
|
+
}, self.config.animationDuration );
|
141
|
+
|
142
|
+
}, this.config.animationDelay );
|
143
|
+
}
|
144
|
+
else {
|
145
|
+
this.element
|
146
|
+
.removeClass(this.config.animationOut)
|
147
|
+
.addClass(this.config.animation + ' ' + this.config.inViewportClass);
|
148
|
+
this.config.afterShow.call( this.element );
|
149
|
+
|
150
|
+
this.callbackTimeoutId = setTimeout( function(){
|
151
|
+
self.config.onShown.call( self.element );
|
152
|
+
}, this.config.animationDuration );
|
153
|
+
}
|
154
|
+
|
155
|
+
}
|
156
|
+
|
157
|
+
/**
|
158
|
+
* Hides element.
|
159
|
+
*
|
160
|
+
* @return undefined
|
161
|
+
*/
|
162
|
+
HSAnimationElement.prototype.hide = function() {
|
163
|
+
|
164
|
+
var self = this;
|
165
|
+
|
166
|
+
if( !this.element.hasClass(this.config.inViewportClass) ) return;
|
167
|
+
|
168
|
+
if( this.config.animationOut ) {
|
169
|
+
|
170
|
+
this.element
|
171
|
+
.removeClass( this.config.animation )
|
172
|
+
.addClass( this.config.animationOut );
|
173
|
+
|
174
|
+
this.callbackTimeoutId = setTimeout(function(){
|
175
|
+
|
176
|
+
self.element.removeClass(self.config.inViewportClass);
|
177
|
+
self.config.onHidded.call( self.element );
|
178
|
+
|
179
|
+
}, this.config.animationDuration);
|
180
|
+
|
181
|
+
}
|
182
|
+
else {
|
183
|
+
|
184
|
+
this.element.removeClass(this.config.inViewportClass + ' ' + this.config.animation);
|
185
|
+
this.config.onHidded.call( this.element );
|
186
|
+
}
|
187
|
+
|
188
|
+
}
|
189
|
+
|
190
|
+
})(jQuery);
|
@@ -0,0 +1,310 @@
|
|
1
|
+
/**
|
2
|
+
* HSPopup - wrapper of the Fancybox plugin.
|
3
|
+
*
|
4
|
+
* @author Htmlstream
|
5
|
+
* @version 1.0
|
6
|
+
* @requires fancybox.js (v2.1.5)
|
7
|
+
*
|
8
|
+
*/
|
9
|
+
;(function($){
|
10
|
+
'use strict';
|
11
|
+
|
12
|
+
$.HSCore.components.HSPopup = {
|
13
|
+
|
14
|
+
/**
|
15
|
+
* Base configuration of the wrapper.
|
16
|
+
*
|
17
|
+
* @protected
|
18
|
+
*/
|
19
|
+
_baseConfig: {
|
20
|
+
baseClass: 'u-fancybox-theme',
|
21
|
+
slideClass: 'u-fancybox-slide',
|
22
|
+
speed: 1000,
|
23
|
+
slideSpeedCoefficient: 1,
|
24
|
+
infobar: false,
|
25
|
+
slideShow: false,
|
26
|
+
fullScreen: true,
|
27
|
+
thumbs: false,
|
28
|
+
closeBtn: true,
|
29
|
+
baseTpl : '<div class="fancybox-container" role="dialog" tabindex="-1">' +
|
30
|
+
'<div class="fancybox-bg"></div>' +
|
31
|
+
'<div class="fancybox-controls">' +
|
32
|
+
'<div class="fancybox-infobar">' +
|
33
|
+
'<div class="fancybox-infobar__body">' +
|
34
|
+
'<span class="js-fancybox-index"></span> / <span class="js-fancybox-count"></span>' +
|
35
|
+
'</div>' +
|
36
|
+
'</div>' +
|
37
|
+
'<div class="fancybox-buttons">' +
|
38
|
+
'<button data-fancybox-close class="fancybox-button fancybox-button--close" title="Close (Esc)"></button>' +
|
39
|
+
'</div>' +
|
40
|
+
'</div>' +
|
41
|
+
'<div class="fancybox-slider-wrap">' +
|
42
|
+
'<button data-fancybox-previous class="fancybox-button fancybox-button--left" title="Previous"></button>' +
|
43
|
+
'<button data-fancybox-next class="fancybox-button fancybox-button--right" title="Next"></button>' +
|
44
|
+
'<div class="fancybox-slider"></div>' +
|
45
|
+
'</div>' +
|
46
|
+
'<div class="fancybox-caption-wrap"><div class="fancybox-caption"></div></div>' +
|
47
|
+
'</div>',
|
48
|
+
onInit: $.noop,
|
49
|
+
beforeMove: $.noop,
|
50
|
+
beforeClose: $.noop
|
51
|
+
},
|
52
|
+
|
53
|
+
/**
|
54
|
+
* Initialization of the wrapper.
|
55
|
+
*
|
56
|
+
* @param {String} selector
|
57
|
+
* @param {Object} config (optional)
|
58
|
+
* @public
|
59
|
+
*/
|
60
|
+
init: function(selector, config) {
|
61
|
+
|
62
|
+
if(!selector) return;
|
63
|
+
|
64
|
+
var hiddenGallery,
|
65
|
+
$collection = $(selector);
|
66
|
+
|
67
|
+
if(!$collection.length) return;
|
68
|
+
|
69
|
+
config = config && $.isPlainObject(config) ? $.extend(true, {}, this._baseConfig, config) : this._baseConfig;
|
70
|
+
config = this._predefineCallbacks( config );
|
71
|
+
|
72
|
+
this.$body = $('body');
|
73
|
+
|
74
|
+
this.initGallery(selector, config);
|
75
|
+
|
76
|
+
},
|
77
|
+
|
78
|
+
/**
|
79
|
+
* Initialization of a gallery.
|
80
|
+
*
|
81
|
+
* @param {String} selector
|
82
|
+
* @param {Object} config (optional)
|
83
|
+
* @public
|
84
|
+
*/
|
85
|
+
initGallery: function(selector, config) {
|
86
|
+
|
87
|
+
$('body').on('click.HSPopup', selector, function(e) {
|
88
|
+
|
89
|
+
var $this = $(this),
|
90
|
+
index = 0,
|
91
|
+
$gallery,
|
92
|
+
predefinedCollection = [],
|
93
|
+
collectionItem;
|
94
|
+
|
95
|
+
if( $this.data('fancybox-gallery') ) {
|
96
|
+
$gallery = $('[data-fancybox-gallery="' + $this.data('fancybox-gallery') + '"]');
|
97
|
+
}
|
98
|
+
else if ( $this.data('fancybox-hidden-gallery') ) {
|
99
|
+
$gallery = $('[data-fancybox-hidden-gallery="' + $this.data('fancybox-hidden-gallery') + '"]');
|
100
|
+
}
|
101
|
+
|
102
|
+
|
103
|
+
if( $gallery && $gallery.length ) {
|
104
|
+
|
105
|
+
index = $gallery.index( $this );
|
106
|
+
|
107
|
+
$gallery.each(function(i, el){
|
108
|
+
var $el = $(el);
|
109
|
+
|
110
|
+
collectionItem = {
|
111
|
+
src: $el.attr(el.nodeName === "IMG" || el.nodeName === "IFRAME" ? 'src' : 'href'),
|
112
|
+
customOpts: {
|
113
|
+
fancyboxAnimateIn: $el.data('fancybox-animate-in'),
|
114
|
+
fancyboxAnimateOut: $el.data('fancybox-animate-out'),
|
115
|
+
fancyboxSpeed: $el.data('fancybox-speed'),
|
116
|
+
fancyboxSlideSpeed: $el.data('fancybox-slide-speed'),
|
117
|
+
fancyboxBlurBg: $el.data('fancybox-blur-bg'),
|
118
|
+
fancyboxBg: $el.data('fancybox-bg')
|
119
|
+
}
|
120
|
+
};
|
121
|
+
|
122
|
+
if( $el.data('fancybox-type') ) {
|
123
|
+
collectionItem.type = $el.data('fancybox-type');
|
124
|
+
console.log($el);
|
125
|
+
}
|
126
|
+
|
127
|
+
predefinedCollection.push(collectionItem);
|
128
|
+
});
|
129
|
+
console.log(predefinedCollection);
|
130
|
+
}
|
131
|
+
else {
|
132
|
+
|
133
|
+
collectionItem = {
|
134
|
+
src: $this.attr('href'),
|
135
|
+
customOpts: {
|
136
|
+
fancyboxAnimateIn: $this.data('fancybox-animate-in'),
|
137
|
+
fancyboxAnimateOut: $this.data('fancybox-animate-out'),
|
138
|
+
fancyboxSpeed: $this.data('fancybox-speed'),
|
139
|
+
fancyboxSlideSpeed: $this.data('fancybox-slide-speed'),
|
140
|
+
fancyboxBlurBg: $this.data('fancybox-blur-bg'),
|
141
|
+
fancyboxBg: $this.data('fancybox-bg')
|
142
|
+
}
|
143
|
+
};
|
144
|
+
|
145
|
+
if( $this.data('fancybox-type') ) {
|
146
|
+
collectionItem.type = $this.data('fancybox-type');
|
147
|
+
}
|
148
|
+
|
149
|
+
predefinedCollection = [collectionItem];
|
150
|
+
}
|
151
|
+
|
152
|
+
$.fancybox.open(
|
153
|
+
predefinedCollection,
|
154
|
+
predefinedCollection[index].customOpts.fancyboxSpeed ? $.extend(true, {}, config, {
|
155
|
+
speed: predefinedCollection[index].customOpts.fancyboxSpeed
|
156
|
+
}) : config,
|
157
|
+
index
|
158
|
+
);
|
159
|
+
|
160
|
+
e.preventDefault();
|
161
|
+
});
|
162
|
+
|
163
|
+
},
|
164
|
+
|
165
|
+
/**
|
166
|
+
* Integration of custom options.
|
167
|
+
*
|
168
|
+
* @param {Object} config
|
169
|
+
* @private
|
170
|
+
* @returns {Object}
|
171
|
+
*/
|
172
|
+
_predefineCallbacks: function( config ) {
|
173
|
+
|
174
|
+
var self = this,
|
175
|
+
onInitCallback = config.onInit,
|
176
|
+
beforeMoveCallback = config.beforeMove,
|
177
|
+
beforeCloseCallback = config.beforeClose;
|
178
|
+
|
179
|
+
config.onInit = function( instance ) {
|
180
|
+
self._defaultBgColor = instance.$refs.bg.css('background-color');
|
181
|
+
|
182
|
+
if(instance.group.length > 1) {
|
183
|
+
instance.$refs.container.find('.fancybox-button--left, .fancybox-button--right').show();
|
184
|
+
}
|
185
|
+
if( $.isFunction( onInitCallback ) ) onInitCallback.call(this, instance);
|
186
|
+
};
|
187
|
+
|
188
|
+
config.beforeMove = function( instance, slide ) {
|
189
|
+
|
190
|
+
if( self._currentSlide ) {
|
191
|
+
self._closeSlide( self._currentSlide, instance );
|
192
|
+
}
|
193
|
+
|
194
|
+
setTimeout( function() {
|
195
|
+
|
196
|
+
self._openSlide( slide, instance );
|
197
|
+
|
198
|
+
}, 0 );
|
199
|
+
|
200
|
+
self._currentSlide = slide;
|
201
|
+
beforeMoveCallback.call(this, instance, slide);
|
202
|
+
|
203
|
+
};
|
204
|
+
|
205
|
+
config.beforeClose = function( instance, slide ) {
|
206
|
+
|
207
|
+
setTimeout( function() {
|
208
|
+
|
209
|
+
self._closeSlide( slide, instance );
|
210
|
+
|
211
|
+
}, 0 );
|
212
|
+
|
213
|
+
beforeCloseCallback.call(this, instance, slide);
|
214
|
+
|
215
|
+
};
|
216
|
+
|
217
|
+
return config;
|
218
|
+
},
|
219
|
+
|
220
|
+
/**
|
221
|
+
* Closes the specified slide.
|
222
|
+
*
|
223
|
+
* @param {Object} slide
|
224
|
+
* @param {Object} instance
|
225
|
+
* @private
|
226
|
+
*/
|
227
|
+
_closeSlide: function( slide, instance ) {
|
228
|
+
|
229
|
+
var $image = $(slide.$image),
|
230
|
+
itemData = slide.customOpts ? slide.customOpts : slide.opts.$orig.data(),
|
231
|
+
groupLength = instance.group.length;
|
232
|
+
|
233
|
+
this._blurBg(false);
|
234
|
+
|
235
|
+
if( itemData.fancyboxAnimateOut ) {
|
236
|
+
if( $image.hasClass(itemData.fancyboxAnimateIn) ) $image.removeClass( itemData.fancyboxAnimateIn );
|
237
|
+
$image.addClass(itemData.fancyboxAnimateOut );
|
238
|
+
}
|
239
|
+
|
240
|
+
},
|
241
|
+
|
242
|
+
/**
|
243
|
+
* Opens the specified slide.
|
244
|
+
*
|
245
|
+
* @param {Object} slide
|
246
|
+
* @param {Object} instance
|
247
|
+
* @private
|
248
|
+
*/
|
249
|
+
_openSlide: function( slide, instance ) {
|
250
|
+
|
251
|
+
var $image = $(slide.$image),
|
252
|
+
itemData = slide.customOpts ? slide.customOpts : slide.opts.$orig.data();
|
253
|
+
|
254
|
+
instance.$refs.bg.css(
|
255
|
+
'background-color',
|
256
|
+
(itemData.fancyboxBg ? itemData.fancyboxBg : this._defaultBgColor)
|
257
|
+
);
|
258
|
+
|
259
|
+
this._blurBg(itemData.fancyboxBlurBg ? true : false);
|
260
|
+
|
261
|
+
$image.css('animation-duration', (itemData.fancyboxSlideSpeed && itemData.fancyboxSlideSpeed >= slide.opts.speed ? itemData.fancyboxSlideSpeed : slide.opts.speed * Math.abs( slide.opts.slideSpeedCoefficient )) + 'ms');
|
262
|
+
|
263
|
+
if( itemData.fancyboxAnimateIn ) {
|
264
|
+
if( $image.hasClass( itemData.fancyboxAnimateOut ) ) $image.removeClass( itemData.fancyboxAnimateOut );
|
265
|
+
$image.addClass( 'animated ' + itemData.fancyboxAnimateIn );
|
266
|
+
}
|
267
|
+
},
|
268
|
+
|
269
|
+
/**
|
270
|
+
* Makes blur background while slide is opening.
|
271
|
+
*
|
272
|
+
* @param {Boolean} isBlur
|
273
|
+
* @private
|
274
|
+
*/
|
275
|
+
_blurBg: function(isBlur) {
|
276
|
+
|
277
|
+
var self = this;
|
278
|
+
|
279
|
+
if( isBlur ) {
|
280
|
+
|
281
|
+
if( this._blurBgTimeOut ) clearTimeout( this._blurBgTimeOut );
|
282
|
+
|
283
|
+
if( !this.blurBgContainer ) {
|
284
|
+
this.blurBgContainer = $('<div></div>', {
|
285
|
+
class: 'u-fancybox-blur-bg-container'
|
286
|
+
});
|
287
|
+
this.$body.append(this.blurBgContainer);
|
288
|
+
}
|
289
|
+
|
290
|
+
if( this.blurBgContainer.children().length ) return;
|
291
|
+
|
292
|
+
this.blurBgContainer.append( this.$body.children().not('.fancybox-container') );
|
293
|
+
|
294
|
+
}
|
295
|
+
else {
|
296
|
+
|
297
|
+
if(!this.blurBgContainer || !this.blurBgContainer.children().length) return;
|
298
|
+
|
299
|
+
this._blurBgTimeOut = setTimeout(function(){
|
300
|
+
|
301
|
+
self.$body.append( self.blurBgContainer.children() );
|
302
|
+
}, 10)
|
303
|
+
|
304
|
+
}
|
305
|
+
|
306
|
+
}
|
307
|
+
|
308
|
+
};
|
309
|
+
|
310
|
+
})(jQuery);
|