blueimp-gallery 0.0.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.
@@ -0,0 +1,187 @@
1
+ /*
2
+ * blueimp helper JS 1.1.0
3
+ * https://github.com/blueimp/Gallery
4
+ *
5
+ * Copyright 2013, Sebastian Tschan
6
+ * https://blueimp.net
7
+ *
8
+ * Licensed under the MIT license:
9
+ * http://www.opensource.org/licenses/MIT
10
+ */
11
+
12
+ /*global define, window, document */
13
+
14
+ (function () {
15
+ 'use strict';
16
+
17
+ function extend(obj1, obj2) {
18
+ var prop;
19
+ for (prop in obj2) {
20
+ if (obj2.hasOwnProperty(prop)) {
21
+ obj1[prop] = obj2[prop];
22
+ }
23
+ }
24
+ return obj1;
25
+ }
26
+
27
+ function Helper(query) {
28
+ if (!this || this.find !== Helper.prototype.find) {
29
+ // Called as function instead of as constructor,
30
+ // so we simply return a new instance:
31
+ return new Helper(query);
32
+ }
33
+ this.length = 0;
34
+ if (query) {
35
+ if (typeof query === 'string') {
36
+ query = this.find(query);
37
+ }
38
+ if (query.nodeType || query === query.window) {
39
+ // Single HTML element
40
+ this.length = 1;
41
+ this[0] = query;
42
+ } else {
43
+ // HTML element collection
44
+ var i = query.length;
45
+ this.length = i;
46
+ while (i) {
47
+ i -= 1;
48
+ this[i] = query[i];
49
+ }
50
+ }
51
+ }
52
+ }
53
+
54
+ Helper.extend = extend;
55
+
56
+ Helper.contains = function (container, element) {
57
+ do {
58
+ element = element.parentNode;
59
+ if (element === container) {
60
+ return true;
61
+ }
62
+ } while (element);
63
+ return false;
64
+ };
65
+
66
+ Helper.parseJSON = function (string) {
67
+ return window.JSON && JSON.parse(string);
68
+ };
69
+
70
+ extend(Helper.prototype, {
71
+
72
+ find: function (query) {
73
+ var container = this[0] || document;
74
+ if (typeof query === 'string') {
75
+ if (container.querySelectorAll) {
76
+ query = container.querySelectorAll(query);
77
+ } else if (query.charAt(0) === '#') {
78
+ query = container.getElementById(query.slice(1));
79
+ } else {
80
+ query = container.getElementsByTagName(query);
81
+ }
82
+ }
83
+ return new Helper(query);
84
+ },
85
+
86
+ hasClass: function (className) {
87
+ if (!this[0]) {
88
+ return false;
89
+ }
90
+ return new RegExp('(^|\\s+)' + className +
91
+ '(\\s+|$)').test(this[0].className);
92
+ },
93
+
94
+ addClass: function (className) {
95
+ var i = this.length,
96
+ element;
97
+ while (i) {
98
+ i -= 1;
99
+ element = this[i];
100
+ if (!element.className) {
101
+ element.className = className;
102
+ return this;
103
+ }
104
+ if (this.hasClass(className)) {
105
+ return this;
106
+ }
107
+ element.className += ' ' + className;
108
+ }
109
+ return this;
110
+ },
111
+
112
+ removeClass: function (className) {
113
+ var regexp = new RegExp('(^|\\s+)' + className + '(\\s+|$)'),
114
+ i = this.length,
115
+ element;
116
+ while (i) {
117
+ i -= 1;
118
+ element = this[i];
119
+ element.className = element.className.replace(regexp, ' ');
120
+ }
121
+ return this;
122
+ },
123
+
124
+ on: function (eventName, handler) {
125
+ var eventNames = eventName.split(/\s+/),
126
+ i,
127
+ element;
128
+ while (eventNames.length) {
129
+ eventName = eventNames.shift();
130
+ i = this.length;
131
+ while (i) {
132
+ i -= 1;
133
+ element = this[i];
134
+ if (element.addEventListener) {
135
+ element.addEventListener(eventName, handler, false);
136
+ } else if (element.attachEvent) {
137
+ element.attachEvent('on' + eventName, handler);
138
+ }
139
+ }
140
+ }
141
+ return this;
142
+ },
143
+
144
+ off: function (eventName, handler) {
145
+ var eventNames = eventName.split(/\s+/),
146
+ i,
147
+ element;
148
+ while (eventNames.length) {
149
+ eventName = eventNames.shift();
150
+ i = this.length;
151
+ while (i) {
152
+ i -= 1;
153
+ element = this[i];
154
+ if (element.removeEventListener) {
155
+ element.removeEventListener(eventName, handler, false);
156
+ } else if (element.detachEvent) {
157
+ element.detachEvent('on' + eventName, handler);
158
+ }
159
+ }
160
+ }
161
+ return this;
162
+ },
163
+
164
+ empty: function () {
165
+ var i = this.length,
166
+ element;
167
+ while (i) {
168
+ i -= 1;
169
+ element = this[i];
170
+ while (element.hasChildNodes()) {
171
+ element.removeChild(element.lastChild);
172
+ }
173
+ }
174
+ return this;
175
+ }
176
+
177
+ });
178
+
179
+ if (typeof define === 'function' && define.amd) {
180
+ define(function () {
181
+ return Helper;
182
+ });
183
+ } else {
184
+ window.blueimp = window.blueimp || {};
185
+ window.blueimp.helper = Helper;
186
+ }
187
+ }());
@@ -0,0 +1,75 @@
1
+ /*
2
+ * blueimp Gallery jQuery plugin 1.1.0
3
+ * https://github.com/blueimp/Gallery
4
+ *
5
+ * Copyright 2013, Sebastian Tschan
6
+ * https://blueimp.net
7
+ *
8
+ * Licensed under the MIT license:
9
+ * http://www.opensource.org/licenses/MIT
10
+ */
11
+
12
+ /*global define, window, document */
13
+
14
+ (function (factory) {
15
+ 'use strict';
16
+ if (typeof define === 'function' && define.amd) {
17
+ define([
18
+ 'jquery',
19
+ './blueimp-gallery.js'
20
+ ], factory);
21
+ } else {
22
+ factory(
23
+ window.jQuery,
24
+ window.blueimp.Gallery
25
+ );
26
+ }
27
+ }(function ($, Gallery) {
28
+ 'use strict';
29
+
30
+ // Global click handler to open links with data-gallery attribute
31
+ // in the Gallery lightbox:
32
+ $(document.body).on('click', '[data-gallery]', function (event) {
33
+ // Get the container id from the data-gallery attribute:
34
+ var id = $(this).data('gallery'),
35
+ widget = $(id),
36
+ container = (widget.length && widget) ||
37
+ $(Gallery.prototype.options.container),
38
+ options = $.extend(
39
+ // Retrieve custom options from data-attributes
40
+ // on the Gallery widget:
41
+ container.data(),
42
+ {
43
+ container: container[0],
44
+ index: this,
45
+ event: event,
46
+ onopen: function () {
47
+ container
48
+ .data('gallery', this)
49
+ .trigger('open', arguments);
50
+ },
51
+ onslide: function () {
52
+ container.trigger('slide', arguments);
53
+ },
54
+ onslideend: function () {
55
+ container.trigger('slideend', arguments);
56
+ },
57
+ onslidecomplete: function () {
58
+ container.trigger('slidecomplete', arguments);
59
+ },
60
+ onclose: function () {
61
+ container
62
+ .trigger('close')
63
+ .removeData('gallery');
64
+ }
65
+ }
66
+ ),
67
+ // Select all links with the same data-gallery attribute:
68
+ links = $('[data-gallery="' + id + '"]');
69
+ if (options.filter) {
70
+ links = links.filter(options.filter);
71
+ }
72
+ return new Gallery(links, options);
73
+ });
74
+
75
+ }));
@@ -0,0 +1,5 @@
1
+ /*
2
+ *= require blueimp-gallery.css
3
+ *= require blueimp-gallery-indicator
4
+ *= require blueimp-gallery-video
5
+ */
@@ -0,0 +1,70 @@
1
+ @charset 'UTF-8';
2
+ /*
3
+ * blueimp Gallery Indicator CSS 1.0.1
4
+ * https://github.com/blueimp/Gallery
5
+ *
6
+ * Copyright 2013, Sebastian Tschan
7
+ * https://blueimp.net
8
+ *
9
+ * Licensed under the MIT license:
10
+ * http://www.opensource.org/licenses/MIT
11
+ */
12
+
13
+ .blueimp-gallery > .indicator {
14
+ position: absolute;
15
+ top: auto;
16
+ right: 15px;
17
+ bottom: 15px;
18
+ left: 15px;
19
+ margin: 0 40px;
20
+ padding: 0;
21
+ list-style: none;
22
+ text-align: center;
23
+ line-height: 10px;
24
+ display: none;
25
+ }
26
+ .blueimp-gallery > .indicator > li {
27
+ display: inline-block;
28
+ width: 9px;
29
+ height: 9px;
30
+ margin: 6px 3px 0 3px;
31
+ -webkit-box-sizing: content-box;
32
+ -moz-box-sizing: content-box;
33
+ box-sizing: content-box;
34
+ border: 1px solid transparent;
35
+ background: #ccc;
36
+ background: rgba(255, 255, 255, 0.25) center no-repeat;
37
+ border-radius: 5px;
38
+ box-shadow: 0 0 2px #000;
39
+ opacity: 0.5;
40
+ cursor: pointer;
41
+ }
42
+ .blueimp-gallery > .indicator > .active {
43
+ background-color: #fff;
44
+ border-color: #fff;
45
+ opacity: 0.8;
46
+ }
47
+ .blueimp-gallery-controls > .indicator {
48
+ display: block;
49
+ /* Fix z-index issues (controls behind slide element) on Android: */
50
+ -webkit-transform: translateZ(0);
51
+ -moz-transform: translateZ(0);
52
+ -ms-transform: translateZ(0);
53
+ -o-transform: translateZ(0);
54
+ transform: translateZ(0);
55
+ }
56
+ .blueimp-gallery-single > .indicator {
57
+ display: none;
58
+ }
59
+ .blueimp-gallery > .indicator {
60
+ -webkit-user-select: none;
61
+ -khtml-user-select: none;
62
+ -moz-user-select: none;
63
+ -ms-user-select: none;
64
+ user-select: none;
65
+ }
66
+
67
+ /* IE7 fixes */
68
+ *+html .blueimp-gallery > .indicator > li {
69
+ display: inline;
70
+ }
@@ -0,0 +1,69 @@
1
+ @charset 'UTF-8';
2
+ /*
3
+ * blueimp Gallery Video Factory CSS 1.0.0
4
+ * https://github.com/blueimp/Gallery
5
+ *
6
+ * Copyright 2013, Sebastian Tschan
7
+ * https://blueimp.net
8
+ *
9
+ * Licensed under the MIT license:
10
+ * http://www.opensource.org/licenses/MIT
11
+ */
12
+
13
+ .blueimp-gallery > .slides > .slide > .video-content > video,
14
+ .blueimp-gallery > .slides > .slide > .video-content > img {
15
+ position: absolute;
16
+ top: 0;
17
+ right: 0;
18
+ bottom: 0;
19
+ left: 0;
20
+ /* Prevent artifacts in Mozilla Firefox: */
21
+ -moz-backface-visibility: hidden;
22
+ }
23
+ .blueimp-gallery > .slides > .slide > .video-content > video,
24
+ .blueimp-gallery > .slides > .slide > .video-content > img {
25
+ margin: auto;
26
+ max-width: 100%;
27
+ max-height: 100%;
28
+ opacity: 1;
29
+ }
30
+ .blueimp-gallery > .slides > .slide > .video-content > a {
31
+ position: absolute;
32
+ top: 50%;
33
+ right: 0;
34
+ left: 0;
35
+ margin: -64px auto 0;
36
+ width: 128px;
37
+ height: 128px;
38
+ background: url("video-play.png") center no-repeat;
39
+ opacity: 0.8;
40
+ cursor: pointer;
41
+ }
42
+ .blueimp-gallery > .slides > .slide > .video-playing > a,
43
+ .blueimp-gallery > .slides > .slide > .video-playing > img {
44
+ display: none;
45
+ }
46
+ .blueimp-gallery > .slides > .slide > .video-content > video {
47
+ display: none;
48
+ }
49
+ .blueimp-gallery > .slides > .slide > .video-playing > video {
50
+ display: block;
51
+ }
52
+ .blueimp-gallery > .slides > .slide > .video-loading > a {
53
+ background: url("loading.gif") center no-repeat;
54
+ background-size: 64px 64px;
55
+ }
56
+
57
+ /* Replace PNGs with SVGs for capable browsers (excluding IE<9) */
58
+ body:last-child .blueimp-gallery > .slides > .slide > .video-content > a {
59
+ background-image: url("video-play.svg");
60
+ }
61
+
62
+ /* IE7 fixes */
63
+ *+html .blueimp-gallery > .slides > .slide > .video-content {
64
+ height: 100%;
65
+ }
66
+ *+html .blueimp-gallery > .slides > .slide > .video-content > a {
67
+ left: 50%;
68
+ margin-left: -64px;
69
+ }
@@ -0,0 +1,219 @@
1
+ @charset 'UTF-8';
2
+ /*
3
+ * blueimp Gallery CSS 2.5.2
4
+ * https://github.com/blueimp/Gallery
5
+ *
6
+ * Copyright 2013, Sebastian Tschan
7
+ * https://blueimp.net
8
+ *
9
+ * Licensed under the MIT license:
10
+ * http://www.opensource.org/licenses/MIT
11
+ */
12
+
13
+ .blueimp-gallery,
14
+ .blueimp-gallery > .slides > .slide > .slide-content {
15
+ position: absolute;
16
+ top: 0;
17
+ right: 0;
18
+ bottom: 0;
19
+ left: 0;
20
+ /* Prevent artifacts in Mozilla Firefox: */
21
+ -moz-backface-visibility: hidden;
22
+ }
23
+ .blueimp-gallery > .slides > .slide > .slide-content {
24
+ margin: auto;
25
+ max-width: 100%;
26
+ max-height: 100%;
27
+ opacity: 1;
28
+ }
29
+ .blueimp-gallery {
30
+ position: fixed;
31
+ z-index: 9999;
32
+ overflow: hidden;
33
+ background: #000;
34
+ background: rgba(0, 0, 0, 0.9);
35
+ opacity: 0;
36
+ visibility: hidden;
37
+ display: none;
38
+ direction: ltr;
39
+ -ms-touch-action: none;
40
+ }
41
+ .blueimp-gallery-carousel {
42
+ position: relative;
43
+ z-index: auto;
44
+ height: 432px;
45
+ max-width: 768px;
46
+ margin: 1em auto;
47
+ box-shadow: 0 0 10px #000;
48
+ }
49
+ .blueimp-gallery-display {
50
+ display: block;
51
+ visibility: visible;
52
+ opacity: 1;
53
+ }
54
+ .blueimp-gallery > .slides {
55
+ position: relative;
56
+ height: 100%;
57
+ overflow: hidden;
58
+ }
59
+ .blueimp-gallery > .slides > .slide {
60
+ position: relative;
61
+ float: left;
62
+ height: 100%;
63
+ text-align: center;
64
+ -webkit-transition-timing-function: cubic-bezier(0.645, 0.045, 0.355, 1.000);
65
+ -moz-transition-timing-function: cubic-bezier(0.645, 0.045, 0.355, 1.000);
66
+ -ms-transition-timing-function: cubic-bezier(0.645, 0.045, 0.355, 1.000);
67
+ -o-transition-timing-function: cubic-bezier(0.645, 0.045, 0.355, 1.000);
68
+ transition-timing-function: cubic-bezier(0.645, 0.045, 0.355, 1.000);
69
+ }
70
+ .blueimp-gallery,
71
+ .blueimp-gallery > .slides > .slide > .slide-content {
72
+ -webkit-transition: opacity 0.5s linear;
73
+ -moz-transition: opacity 0.5s linear;
74
+ -ms-transition: opacity 0.5s linear;
75
+ -o-transition: opacity 0.5s linear;
76
+ transition: opacity 0.5s linear;
77
+ }
78
+ .blueimp-gallery > .slides > .slide-loading {
79
+ background: url("loading.gif") center no-repeat;
80
+ background-size: 64px 64px;
81
+ }
82
+ .blueimp-gallery > .slides > .slide-loading > .slide-content {
83
+ opacity: 0;
84
+ }
85
+ .blueimp-gallery > .slides > .slide-error {
86
+ background: url("error.png") center no-repeat;
87
+ }
88
+ .blueimp-gallery > .slides > .slide-error > .slide-content {
89
+ display: none;
90
+ }
91
+ .blueimp-gallery > .prev,
92
+ .blueimp-gallery > .next {
93
+ position: absolute;
94
+ top: 50%;
95
+ left: 15px;
96
+ width: 40px;
97
+ height: 40px;
98
+ margin-top: -23px;
99
+ font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
100
+ font-size: 60px;
101
+ font-weight: 100;
102
+ line-height: 30px;
103
+ color: #fff;
104
+ text-decoration: none;
105
+ text-shadow: 0 0 2px #000;
106
+ text-align: center;
107
+ background: #222;
108
+ background: rgba(0, 0, 0, 0.5);
109
+ -webkit-box-sizing: content-box;
110
+ -moz-box-sizing: content-box;
111
+ box-sizing: content-box;
112
+ border: 3px solid #fff;
113
+ -webkit-border-radius: 23px;
114
+ -moz-border-radius: 23px;
115
+ border-radius: 23px;
116
+ opacity: 0.5;
117
+ cursor: pointer;
118
+ display: none;
119
+ }
120
+ .blueimp-gallery > .next {
121
+ left: auto;
122
+ right: 15px;
123
+ }
124
+ .blueimp-gallery > .close,
125
+ .blueimp-gallery > .title {
126
+ position: absolute;
127
+ top: 15px;
128
+ left: 15px;
129
+ margin: 0 40px 0 0;
130
+ font-size: 20px;
131
+ line-height: 30px;
132
+ color: #fff;
133
+ text-shadow: 0 0 2px #000;
134
+ opacity: 0.8;
135
+ display: none;
136
+ }
137
+ .blueimp-gallery > .close {
138
+ padding: 15px;
139
+ right: 15px;
140
+ left: auto;
141
+ margin: -15px;
142
+ font-size: 30px;
143
+ text-decoration: none;
144
+ cursor: pointer;
145
+ }
146
+ .blueimp-gallery > .play-pause {
147
+ position: absolute;
148
+ right: 15px;
149
+ bottom: 15px;
150
+ width: 15px;
151
+ height: 15px;
152
+ background: url(../img/"play-pause.png") 0 0 no-repeat;
153
+ cursor: pointer;
154
+ opacity: 0.5;
155
+ display: none;
156
+ }
157
+ .blueimp-gallery-playing > .play-pause {
158
+ background-position: -15px 0;
159
+ }
160
+ .blueimp-gallery-controls > .prev,
161
+ .blueimp-gallery-controls > .next,
162
+ .blueimp-gallery-controls > .close,
163
+ .blueimp-gallery-controls > .title,
164
+ .blueimp-gallery-controls > .play-pause {
165
+ display: block;
166
+ /* Fix z-index issues (controls behind slide element) on Android: */
167
+ -webkit-transform: translateZ(0);
168
+ -moz-transform: translateZ(0);
169
+ -ms-transform: translateZ(0);
170
+ -o-transform: translateZ(0);
171
+ transform: translateZ(0);
172
+ }
173
+ .blueimp-gallery-single > .prev,
174
+ .blueimp-gallery-left > .prev,
175
+ .blueimp-gallery-single > .next,
176
+ .blueimp-gallery-right > .next,
177
+ .blueimp-gallery-single > .play-pause {
178
+ display: none;
179
+ }
180
+ .blueimp-gallery > .slides > .slide > .slide-content,
181
+ .blueimp-gallery > .prev,
182
+ .blueimp-gallery > .next,
183
+ .blueimp-gallery > .close,
184
+ .blueimp-gallery > .play-pause {
185
+ -webkit-user-select: none;
186
+ -khtml-user-select: none;
187
+ -moz-user-select: none;
188
+ -ms-user-select: none;
189
+ user-select: none;
190
+ }
191
+
192
+ /* Replace PNGs with SVGs for capable browsers (excluding IE<9) */
193
+ body:last-child .blueimp-gallery > .slides > .slide-error {
194
+ background-image: url("error.svg");
195
+ }
196
+ body:last-child .blueimp-gallery > .play-pause {
197
+ width: 20px;
198
+ height: 20px;
199
+ background-size: 40px 20px;
200
+ background-image: url(../img/"play-pause.svg");
201
+ }
202
+ body:last-child .blueimp-gallery-playing > .play-pause {
203
+ background-position: -20px 0;
204
+ }
205
+
206
+ @media (max-width: 767px) {
207
+ .blueimp-gallery-carousel {
208
+ height: 270px;
209
+ max-width: 480px;
210
+ }
211
+ }
212
+
213
+ /* IE7 fixes */
214
+ *+html .blueimp-gallery > .slides > .slide {
215
+ min-height: 300px;
216
+ }
217
+ *+html .blueimp-gallery > .slides > .slide > .slide-content {
218
+ position: relative;
219
+ }