draggablesilder-rails 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,349 @@
1
+ /**
2
+ * dragslideshow.js v1.0.0
3
+ * http://www.codrops.com
4
+ *
5
+ * Licensed under the MIT license.
6
+ * http://www.opensource.org/licenses/mit-license.php
7
+ *
8
+ * Copyright 2014, Codrops
9
+ * http://www.codrops.com
10
+ */
11
+ ;( function( window ) {
12
+
13
+ 'use strict';
14
+
15
+ var docElem = window.document.documentElement,
16
+ transEndEventNames = {
17
+ 'WebkitTransition': 'webkitTransitionEnd',
18
+ 'MozTransition': 'transitionend',
19
+ 'OTransition': 'oTransitionEnd',
20
+ 'msTransition': 'MSTransitionEnd',
21
+ 'transition': 'transitionend'
22
+ },
23
+ transEndEventName = transEndEventNames[ Modernizr.prefixed( 'transition' ) ],
24
+ support = { transitions : Modernizr.csstransitions };
25
+
26
+ /**
27
+ * gets the viewport width and height
28
+ * based on http://responsejs.com/labs/dimensions/
29
+ */
30
+ function getViewport( axis ) {
31
+ var client, inner;
32
+ if( axis === 'x' ) {
33
+ client = docElem['clientWidth'];
34
+ inner = window['innerWidth'];
35
+ }
36
+ else if( axis === 'y' ) {
37
+ client = docElem['clientHeight'];
38
+ inner = window['innerHeight'];
39
+ }
40
+
41
+ return client < inner ? inner : client;
42
+ }
43
+
44
+ /**
45
+ * extend obj function
46
+ */
47
+ function extend( a, b ) {
48
+ for( var key in b ) {
49
+ if( b.hasOwnProperty( key ) ) {
50
+ a[key] = b[key];
51
+ }
52
+ }
53
+ return a;
54
+ }
55
+
56
+ /**
57
+ * DragSlideshow function
58
+ */
59
+ function DragSlideshow( el, options ) {
60
+ this.el = el;
61
+ this.options = extend( {}, this.options );
62
+ extend( this.options, options );
63
+ this._init();
64
+ }
65
+
66
+ /**
67
+ * DragSlideshow options
68
+ */
69
+ DragSlideshow.prototype.options = {
70
+ perspective : '1200',
71
+ slideshowRatio : 0.3, // between: 0,1
72
+ onToggle : function() { return false; },
73
+ onToggleContent : function() { return false; },
74
+ onToggleContentComplete : function() { return false; }
75
+ }
76
+
77
+ /**
78
+ * init function
79
+ * initialize and cache some vars
80
+ */
81
+ DragSlideshow.prototype._init = function() {
82
+ var self = this;
83
+
84
+ // current
85
+ this.current = 0;
86
+
87
+ // status
88
+ this.isFullscreen = true;
89
+
90
+ // the images wrapper element
91
+ this.imgDragger = this.el.querySelector( 'section.dragdealer' );
92
+
93
+ // the moving element inside the images wrapper
94
+ this.handle = this.imgDragger.querySelector( 'div.handle' );
95
+
96
+ // the slides
97
+ this.slides = [].slice.call( this.handle.children );
98
+
99
+ // total number of slides
100
+ this.slidesCount = this.slides.length;
101
+
102
+ if( this.slidesCount < 1 ) return;
103
+
104
+ // cache options slideshowRatio (needed for window resize)
105
+ this.slideshowRatio = this.options.slideshowRatio;
106
+
107
+ // add class "current" to first slide
108
+ classie.add( this.slides[ this.current ], 'current' );
109
+
110
+ // the pages/content
111
+ this.pages = this.el.querySelector( 'section.pages' );
112
+
113
+ // set the width of the handle : total slides * 100%
114
+ this.handle.style.width = this.slidesCount * 100 + '%';
115
+
116
+ // set the width of each slide to 100%/total slides
117
+ this.slides.forEach( function( slide ) {
118
+ slide.style.width = 100 / self.slidesCount + '%';
119
+ } );
120
+
121
+ // initialize the DragDealer plugin
122
+ this._initDragDealer();
123
+
124
+ // init events
125
+ this._initEvents();
126
+ }
127
+
128
+ /**
129
+ * initialize the events
130
+ */
131
+ DragSlideshow.prototype._initEvents = function() {
132
+ var self = this;
133
+
134
+ this.slides.forEach( function( slide ) {
135
+ // clicking the slides when not in isFullscreen mode
136
+ slide.addEventListener( 'click', function() {
137
+ if( self.isFullscreen || self.dd.activity || self.isAnimating ) return false;
138
+
139
+ if( self.slides.indexOf( slide ) === self.current ) {
140
+ self.toggle();
141
+ }
142
+ else {
143
+ self.dd.setStep( self.slides.indexOf( slide ) + 1 );
144
+ }
145
+ } );
146
+
147
+ // reveal content
148
+ slide.querySelector( 'button.content-switch' ).addEventListener( 'click', function() { self._toggleContent( slide ); } );
149
+ } );
150
+
151
+ // keyboard navigation events
152
+ document.addEventListener( 'keydown', function( ev ) {
153
+ var keyCode = ev.keyCode || ev.which,
154
+ currentSlide = self.slides[ self.current ];
155
+
156
+ if( self.isContent ) {
157
+ switch (keyCode) {
158
+ // up key
159
+ case 38:
160
+ // only if current scroll is 0:
161
+ if( self._getContentPage( currentSlide ).scrollTop === 0 ) {
162
+ self._toggleContent( currentSlide );
163
+ }
164
+ break;
165
+ }
166
+ }
167
+ else {
168
+ switch (keyCode) {
169
+ // down key
170
+ case 40:
171
+ // if not fullscreen don't reveal the content. If you want to navigate directly to the content then remove this check.
172
+ if( !self.isFullscreen ) return;
173
+ self._toggleContent( currentSlide );
174
+ break;
175
+ // right and left keys
176
+ case 37:
177
+ self.dd.setStep( self.current );
178
+ break;
179
+ case 39:
180
+ self.dd.setStep( self.current + 2 );
181
+ break;
182
+ }
183
+ }
184
+ } );
185
+ }
186
+
187
+ /**
188
+ * gets the content page of the current slide
189
+ */
190
+ DragSlideshow.prototype._getContentPage = function( slide ) {
191
+ return this.pages.querySelector( 'div.content[data-content = "' + slide.getAttribute( 'data-content' ) + '"]' );
192
+ }
193
+
194
+ /**
195
+ * show/hide content
196
+ */
197
+ DragSlideshow.prototype._toggleContent = function( slide ) {
198
+ if( this.isAnimating ) {
199
+ return false;
200
+ }
201
+ this.isAnimating = true;
202
+
203
+ // callback
204
+ this.options.onToggleContent();
205
+
206
+ // get page
207
+ var page = this._getContentPage( slide );
208
+
209
+ if( this.isContent ) {
210
+ // enable the dragdealer
211
+ this.dd.enable();
212
+ classie.remove( this.el, 'show-content' );
213
+ }
214
+ else {
215
+ // before: scroll all the content up
216
+ page.scrollTop = 0;
217
+ // disable the dragdealer
218
+ this.dd.disable();
219
+ classie.add( this.el, 'show-content' );
220
+ classie.add( page, 'show' );
221
+ }
222
+
223
+ var self = this,
224
+ onEndTransitionFn = function( ev ) {
225
+ if( support.transitions ) {
226
+ if( ev.propertyName.indexOf( 'transform' ) === -1 || ev.target !== this ) return;
227
+ this.removeEventListener( transEndEventName, onEndTransitionFn );
228
+ }
229
+ if( self.isContent ) {
230
+ classie.remove( page, 'show' );
231
+ }
232
+ self.isContent = !self.isContent;
233
+ self.isAnimating = false;
234
+ // callback
235
+ self.options.onToggleContentComplete();
236
+ };
237
+
238
+ if( support.transitions ) {
239
+ this.el.addEventListener( transEndEventName, onEndTransitionFn );
240
+ }
241
+ else {
242
+ onEndTransitionFn();
243
+ }
244
+ }
245
+
246
+ /**
247
+ * initialize the Dragdealer plugin
248
+ */
249
+ DragSlideshow.prototype._initDragDealer = function() {
250
+ var self = this;
251
+ this.dd = new Dragdealer( this.imgDragger, {
252
+ steps: this.slidesCount,
253
+ speed: 0.4,
254
+ loose: true,
255
+ requestAnimationFrame : true,
256
+ callback: function( x, y ) {
257
+ self._navigate( x, y );
258
+ }
259
+ });
260
+ }
261
+
262
+ /**
263
+ * DragDealer plugin callback: update current value
264
+ */
265
+ DragSlideshow.prototype._navigate = function( x, y ) {
266
+ // add class "current" to the current slide / remove that same class from the old current slide
267
+ classie.remove( this.slides[ this.current || 0 ], 'current' );
268
+ this.current = this.dd.getStep()[0] - 1;
269
+ classie.add( this.slides[ this.current ], 'current' );
270
+ }
271
+
272
+ /**
273
+ * toggle between fullscreen and minimized slideshow
274
+ */
275
+ DragSlideshow.prototype.toggle = function() {
276
+ if( this.isAnimating ) {
277
+ return false;
278
+ }
279
+ this.isAnimating = true;
280
+
281
+ // add preserve-3d to the slides (seems to fix a rendering problem in firefox)
282
+ this._preserve3dSlides( true );
283
+
284
+ // callback
285
+ this.options.onToggle();
286
+
287
+ classie.remove( this.el, this.isFullscreen ? 'switch-max' : 'switch-min' );
288
+ classie.add( this.el, this.isFullscreen ? 'switch-min' : 'switch-max' );
289
+
290
+ var self = this,
291
+ p = this.options.perspective,
292
+ r = this.options.slideshowRatio,
293
+ zAxisVal = this.isFullscreen ? p - ( p / r ) : p - p * r;
294
+
295
+ this.imgDragger.style.WebkitTransform = 'perspective(' + this.options.perspective + 'px) translate3d( -50%, -50%, ' + zAxisVal + 'px )';
296
+ this.imgDragger.style.transform = 'perspective(' + this.options.perspective + 'px) translate3d( -50%, -50%, ' + zAxisVal + 'px )';
297
+
298
+ var onEndTransitionFn = function( ev ) {
299
+ if( support.transitions ) {
300
+ if( ev.propertyName.indexOf( 'transform' ) === -1 ) return;
301
+ this.removeEventListener( transEndEventName, onEndTransitionFn );
302
+ }
303
+
304
+ if( !self.isFullscreen ) {
305
+ // remove preserve-3d to the slides (seems to fix a rendering problem in firefox)
306
+ self._preserve3dSlides();
307
+ }
308
+
309
+ // replace class "img-dragger-large" with "img-dragger-small"
310
+ classie.remove( this, self.isFullscreen ? 'img-dragger-large' : 'img-dragger-small' );
311
+ classie.add( this, self.isFullscreen ? 'img-dragger-small' : 'img-dragger-large' );
312
+
313
+ // reset transforms and set width & height
314
+ self.imgDragger.style.WebkitTransform = 'translate3d( -50%, -50%, 0px )';
315
+ self.imgDragger.style.transform = 'translate3d( -50%, -50%, 0px )';
316
+ this.style.width = self.isFullscreen ? self.options.slideshowRatio * 100 + '%' : '100%';
317
+ this.style.height = self.isFullscreen ? self.options.slideshowRatio * 100 + '%' : '100%';
318
+ // reinstatiate the dragger with the "reflow" method
319
+ self.dd.reflow();
320
+
321
+ // change status
322
+ self.isFullscreen = !self.isFullscreen;
323
+
324
+ self.isAnimating = false;
325
+ };
326
+
327
+ if( support.transitions ) {
328
+ this.imgDragger.addEventListener( transEndEventName, onEndTransitionFn );
329
+ }
330
+ else {
331
+ onEndTransitionFn();
332
+ }
333
+ }
334
+
335
+ /**
336
+ * add/remove preserve-3d to the slides (seems to fix a rendering problem in firefox)
337
+ */
338
+ DragSlideshow.prototype._preserve3dSlides = function( add ) {
339
+ this.slides.forEach( function( slide ) {
340
+ slide.style.transformStyle = add ? 'preserve-3d' : '';
341
+ });
342
+ }
343
+
344
+ /**
345
+ * add to global namespace
346
+ */
347
+ window.DragSlideshow = DragSlideshow;
348
+
349
+ } )( window );
@@ -0,0 +1,4 @@
1
+ /* Modernizr 2.8.2 (Custom Build) | MIT & BSD
2
+ * Build: http://modernizr.com/download/#-csstransitions-shiv-cssclasses-prefixed-testprop-testallprops-domprefixes-load
3
+ */
4
+ ;window.Modernizr=function(a,b,c){function x(a){j.cssText=a}function y(a,b){return x(prefixes.join(a+";")+(b||""))}function z(a,b){return typeof a===b}function A(a,b){return!!~(""+a).indexOf(b)}function B(a,b){for(var d in a){var e=a[d];if(!A(e,"-")&&j[e]!==c)return b=="pfx"?e:!0}return!1}function C(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:z(f,"function")?f.bind(d||b):f}return!1}function D(a,b,c){var d=a.charAt(0).toUpperCase()+a.slice(1),e=(a+" "+n.join(d+" ")+d).split(" ");return z(b,"string")||z(b,"undefined")?B(e,b):(e=(a+" "+o.join(d+" ")+d).split(" "),C(e,b,c))}var d="2.8.2",e={},f=!0,g=b.documentElement,h="modernizr",i=b.createElement(h),j=i.style,k,l={}.toString,m="Webkit Moz O ms",n=m.split(" "),o=m.toLowerCase().split(" "),p={},q={},r={},s=[],t=s.slice,u,v={}.hasOwnProperty,w;!z(v,"undefined")&&!z(v.call,"undefined")?w=function(a,b){return v.call(a,b)}:w=function(a,b){return b in a&&z(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=t.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(t.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(t.call(arguments)))};return e}),p.csstransitions=function(){return D("transition")};for(var E in p)w(p,E)&&(u=E.toLowerCase(),e[u]=p[E](),s.push((e[u]?"":"no-")+u));return e.addTest=function(a,b){if(typeof a=="object")for(var d in a)w(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,typeof f!="undefined"&&f&&(g.className+=" "+(b?"":"no-")+a),e[a]=b}return e},x(""),i=k=null,function(a,b){function l(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x<style>"+b+"</style>",d.insertBefore(c.lastChild,d.firstChild)}function m(){var a=s.elements;return typeof a=="string"?a.split(" "):a}function n(a){var b=j[a[h]];return b||(b={},i++,a[h]=i,j[i]=b),b}function o(a,c,d){c||(c=b);if(k)return c.createElement(a);d||(d=n(c));var g;return d.cache[a]?g=d.cache[a].cloneNode():f.test(a)?g=(d.cache[a]=d.createElem(a)).cloneNode():g=d.createElem(a),g.canHaveChildren&&!e.test(a)&&!g.tagUrn?d.frag.appendChild(g):g}function p(a,c){a||(a=b);if(k)return a.createDocumentFragment();c=c||n(a);var d=c.frag.cloneNode(),e=0,f=m(),g=f.length;for(;e<g;e++)d.createElement(f[e]);return d}function q(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return s.shivMethods?o(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/[\w\-]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(s,b.frag)}function r(a){a||(a=b);var c=n(a);return s.shivCSS&&!g&&!c.hasCSS&&(c.hasCSS=!!l(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),k||q(a,c),a}var c="3.7.0",d=a.html5||{},e=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,f=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,g,h="_html5shiv",i=0,j={},k;(function(){try{var a=b.createElement("a");a.innerHTML="<xyz></xyz>",g="hidden"in a,k=a.childNodes.length==1||function(){b.createElement("a");var a=b.createDocumentFragment();return typeof a.cloneNode=="undefined"||typeof a.createDocumentFragment=="undefined"||typeof a.createElement=="undefined"}()}catch(c){g=!0,k=!0}})();var s={elements:d.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:c,shivCSS:d.shivCSS!==!1,supportsUnknownElements:k,shivMethods:d.shivMethods!==!1,type:"default",shivDocument:r,createElement:o,createDocumentFragment:p};a.html5=s,r(b)}(this,b),e._version=d,e._domPrefixes=o,e._cssomPrefixes=n,e.testProp=function(a){return B([a])},e.testAllProps=D,e.prefixed=function(a,b,c){return b?D(a,b,c):D(a,"pfx")},g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+s.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f<d;f++)g=a[f].split("="),(e=z[g.shift()])&&(c=e(c,g));for(f=0;f<b;f++)c=x[f](c);return c}function g(a,e,f,g,h){var i=b(a),j=i.autoCallback;i.url.split(".").pop().split("?").shift(),i.bypass||(e&&(e=d(e)?e:e[a]||e[g]||e[a.split("/").pop().split("?")[0]]),i.instead?i.instead(a,e,f,g,h):(y[i.url]?i.noexec=!0:y[i.url]=1,f.load(i.url,i.forceCSS||!i.forceJS&&"css"==i.url.split(".").pop().split("?").shift()?"c":c,i.noexec,i.attrs,i.timeout),(d(e)||d(j))&&f.load(function(){k(),e&&e(i.origUrl,h,g),j&&j(i.origUrl,h,g),y[i.url]=2})))}function h(a,b){function c(a,c){if(a){if(e(a))c||(j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}),g(a,j,b,0,h);else if(Object(a)===a)for(n in m=function(){var b=0,c;for(c in a)a.hasOwnProperty(c)&&b++;return b}(),a)a.hasOwnProperty(n)&&(!c&&!--m&&(d(j)?j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}:j[n]=function(a){return function(){var b=[].slice.call(arguments);a&&a.apply(this,b),l()}}(k[n])),g(a[n],j,b,n,h))}else!c&&l()}var h=!!a.test,i=a.load||a.both,j=a.callback||f,k=j,l=a.complete||f,m,n;c(h?a.yep:a.nope,!!i),i&&c(i)}var i,j,l=this.yepnope.loader;if(e(a))g(a,0,l,0);else if(w(a))for(i=0;i<a.length;i++)j=a[i],e(j)?g(j,0,l,0):w(j)?B(j):Object(j)===j&&h(j,l);else Object(a)===a&&h(a,l)},B.addPrefix=function(a,b){z[a]=b},B.addFilter=function(a){x.push(a)},B.errorTimeout=1e4,null==b.readyState&&b.addEventListener&&(b.readyState="loading",b.addEventListener("DOMContentLoaded",A=function(){b.removeEventListener("DOMContentLoaded",A,0),b.readyState="complete"},0)),a.yepnope=k(),a.yepnope.executeStack=h,a.yepnope.injectJs=function(a,c,d,e,i,j){var k=b.createElement("script"),l,o,e=e||B.errorTimeout;k.src=a;for(o in d)k.setAttribute(o,d[o]);c=j?h:c||f,k.onreadystatechange=k.onload=function(){!l&&g(k.readyState)&&(l=1,c(),k.onload=k.onreadystatechange=null)},m(function(){l||(l=1,c(1))},e),i?k.onload():n.parentNode.insertBefore(k,n)},a.yepnope.injectCss=function(a,c,d,e,g,i){var e=b.createElement("link"),j,c=i?h:c||f;e.href=a,e.rel="stylesheet",e.type="text/css";for(j in d)e.setAttribute(j,d[j]);g||(n.parentNode.insertBefore(e,n),m(c,0))}}(this,document),Modernizr.load=function(){yepnope.apply(window,[].slice.call(arguments,0))};
@@ -0,0 +1,458 @@
1
+ @font-face {
2
+ font-family: 'feathericons';
3
+ src:url('../fonts/feathericons/feathericons.eot?2h4ajg');
4
+ src:url('../fonts/feathericons/feathericons.eot?#iefix2h4ajg') format('embedded-opentype'),
5
+ url('../fonts/feathericons/feathericons.woff?2h4ajg') format('woff'),
6
+ url('../fonts/feathericons/feathericons.ttf?2h4ajg') format('truetype'),
7
+ url('../fonts/feathericons/feathericons.svg?2h4ajg#feathericons') format('svg');
8
+ font-weight: normal;
9
+ font-style: normal;
10
+ }
11
+
12
+ html,
13
+ body,
14
+ .js .container,
15
+ .js .dragslider,
16
+ .js .img-dragger .handle {
17
+ height: 100%;
18
+ }
19
+
20
+ html.js,
21
+ .js body {
22
+ overflow: hidden;
23
+ position: relative;
24
+ }
25
+
26
+ .js .dragslider {
27
+ position: absolute;
28
+ top: 0;
29
+ left: 0;
30
+ width: 100%;
31
+ height: 100%;
32
+ -webkit-transition: -webkit-transform 0.6s cubic-bezier(.7,0,.3,1);
33
+ transition: transform 0.6s cubic-bezier(.7,0,.3,1);
34
+ }
35
+
36
+ .dragslider.show-content {
37
+ -webkit-transform: translate3d(0,-100%,0);
38
+ transform: translate3d(0,-100%,0);
39
+ }
40
+
41
+ .dragslider h2 {
42
+ font-family: 'Playfair Display', serif;
43
+ font-size: 8em;
44
+ font-weight: 700;
45
+ margin: 0 auto;
46
+ line-height: 1;
47
+ position: relative;
48
+ }
49
+
50
+ .no-js .dragslider h2 {
51
+ padding: 15px;
52
+ }
53
+
54
+ .dragslider h2 span {
55
+ display: block;
56
+ font-size: 27%;
57
+ font-family: 'Lato', sans-serif;
58
+ font-weight: 300;
59
+ padding-top: 0.2em;
60
+ }
61
+
62
+ /* Switch button */
63
+ button.slider-switch {
64
+ font-size: 0;
65
+ width: 80px;
66
+ height: 80px;
67
+ padding: 0;
68
+ color: transparent;
69
+ position: relative;
70
+ border: none;
71
+ background: url(../img/switchmin.svg) no-repeat center center;
72
+ background-size: 90%;
73
+ float: right;
74
+ outline: none;
75
+ overflow: hidden;
76
+ opacity: 0.7;
77
+ -webkit-transition: opacity 0.3s;
78
+ transition: opacity 0.3s;
79
+ pointer-events: auto;
80
+ }
81
+
82
+ .no-js button.slider-switch {
83
+ display: none;
84
+ }
85
+
86
+ button.slider-switch.view-maxi {
87
+ background-image: url(../img/switchmax.svg)
88
+ }
89
+
90
+ button.slider-switch:hover {
91
+ opacity: 1;
92
+ }
93
+
94
+ /* Dragger */
95
+ .img-dragger {
96
+ position: relative;
97
+ z-index: 100;
98
+ }
99
+
100
+ .js .img-dragger {
101
+ position: absolute;
102
+ width: 100%;
103
+ height: 100%;
104
+ top: 50%;
105
+ left: 50%;
106
+ -webkit-transform: translate3d(-50%,-50%,0);
107
+ transform: translate3d(-50%,-50%,0);
108
+ -webkit-transform-origin: 0 0;
109
+ transform-origin: 0 0;
110
+ }
111
+
112
+ .js .img-dragger-large {
113
+ width: 100%;
114
+ height: 100%;
115
+ }
116
+
117
+ .js .img-dragger .handle {
118
+ -webkit-transform-style: preserve-3d;
119
+ transform-style: preserve-3d;
120
+ white-space: nowrap;
121
+ font-size: 0;
122
+ }
123
+
124
+ .no-js .img-dragger,
125
+ .no-js .img-dragger .handle {
126
+ height: auto;
127
+ position: relative;
128
+ text-align: center;
129
+ font-size: 0;
130
+ clear: both;
131
+ white-space: nowrap;
132
+ overflow: auto;
133
+ }
134
+
135
+ .no-js .img-dragger .handle {
136
+ padding: 40px 0 0;
137
+ }
138
+
139
+ .img-dragger .slide {
140
+ display: inline-block;
141
+ position: relative;
142
+ height: 100%;
143
+ background: #567076;
144
+ font-size: 16px;
145
+ white-space: normal;
146
+ cursor: -webkit-grab;
147
+ cursor: -moz-grab;
148
+ -webkit-touch-callout: none;
149
+ -webkit-user-select: none;
150
+ -khtml-user-select: none;
151
+ -moz-user-select: none;
152
+ -ms-user-select: none;
153
+ user-select: none;
154
+ vertical-align: top;
155
+ }
156
+
157
+ .no-js .img-dragger .slide {
158
+ width: 300px;
159
+ font-size: 7px;
160
+ min-height: 200px;
161
+ }
162
+
163
+ .img-dragger .slide:active {
164
+ cursor: -webkit-grabbing;
165
+ cursor: -moz-grabbing;
166
+ }
167
+
168
+ .img-wrap {
169
+ position: absolute;
170
+ width: 100%;
171
+ height: 100%;
172
+ overflow: hidden;
173
+ }
174
+
175
+ .img-wrap img {
176
+ position: absolute;
177
+ display: block;
178
+ height: calc(100% + 0.2px);
179
+ opacity: 0.5;
180
+ }
181
+
182
+ @media screen and (min-aspect-ratio: 1280/850) {
183
+ .img-dragger .img-wrap img {
184
+ width: calc(100% + 0.2px);
185
+ height: auto;
186
+ }
187
+ }
188
+
189
+ .js .slide h2 {
190
+ color: #fff;
191
+ position: absolute;
192
+ -webkit-transition: opacity 0.3s;
193
+ transition: opacity 0.3s;
194
+ }
195
+
196
+ .js .img-dragger-large .slide h2 {
197
+ width: 70%;
198
+ left: 15%;
199
+ top: 50%;
200
+ -webkit-transform: translate3d(0,-50%,0);
201
+ transform: translate3d(0,-50%,0);
202
+ }
203
+
204
+ .img-dragger-small .slide h2 {
205
+ font-size: 2.5em;
206
+ padding-top: 1em;
207
+ top: 100%;
208
+ width: 100%;
209
+ text-align: center;
210
+ color: #34495e;
211
+ -webkit-animation: slideUpFade 0.4s 0.1s;
212
+ }
213
+
214
+ @-webkit-keyframes slideUpFade {
215
+ from {
216
+ opacity: 0;
217
+ -webkit-transform: translate3d(0,20px,0);
218
+ }
219
+ to {
220
+ opacity: 1;
221
+ -webkit-transform: translate3d(0,0,0);
222
+ }
223
+ }
224
+
225
+ .img-dragger-small .slide h2 span {
226
+ font-size: 0.35em;
227
+ }
228
+
229
+ .img-dragger-small .slide.current h2 {
230
+ color: #fff;
231
+ -webkit-animation-delay: 0s;
232
+ animation-delay: 0s;
233
+ -webkit-transition: color 0.3s, opacity 0.3s;
234
+ transition: color 0.3s, opacity 0.3s;
235
+ }
236
+
237
+ .slide h2 i {
238
+ font-style: normal;
239
+ font-weight: 400;
240
+ }
241
+
242
+ button.content-switch {
243
+ border: 2px solid #fff;
244
+ width: 160px;
245
+ text-indent: 200%;
246
+ overflow: hidden;
247
+ white-space: nowrap;
248
+ background: transparent;
249
+ color: #fff;
250
+ font-family: 'Lato', sans-serif;
251
+ position: absolute;
252
+ cursor: pointer;
253
+ top: 100%;
254
+ left: 50%;
255
+ -webkit-transform: translate3d(-50%,-200%,0);
256
+ transform: translate3d(-50%,-200%,0);
257
+ padding: 1em 2em;
258
+ font-size: 0.85em;
259
+ line-height: 1;
260
+ text-transform: uppercase;
261
+ letter-spacing: 1px;
262
+ font-weight: 400;
263
+ outline: none;
264
+ z-index: 1000;
265
+ opacity: 0.7;
266
+ -webkit-transition: -webkit-transform 0.6s cubic-bezier(.7,0,.3,1), opacity 0.3s, color 0.3s, border-color 0.3s;
267
+ transition: transform 0.6s cubic-bezier(.7,0,.3,1), opacity 0.3s, color 0.3s, border-color 0.3s;
268
+ }
269
+
270
+ .no-js button.content-switch {
271
+ display: none;
272
+ }
273
+
274
+ button.content-switch:hover {
275
+ opacity: 1;
276
+ }
277
+
278
+ button.content-switch::before {
279
+ content: '\e097';
280
+ font-family: 'feathericons';
281
+ speak: none;
282
+ position: absolute;
283
+ width: 100%;
284
+ height: 100%;
285
+ left: 0;
286
+ text-indent: 0;
287
+ font-size: 1.5em;
288
+ line-height: 0.75;
289
+ -webkit-font-smoothing: antialiased;
290
+ -moz-osx-font-smoothing: grayscale;
291
+ }
292
+
293
+ .show-content .current button.content-switch {
294
+ border-color: #c5d3d6;
295
+ color: #c5d3d6;
296
+ -webkit-transform: translate3d(-50%,100%,0);
297
+ transform: translate3d(-50%,100%,0);
298
+ }
299
+
300
+ .show-content .current button.content-switch::before {
301
+ content: '\e096';
302
+ }
303
+
304
+ /* Content */
305
+ .js .pages {
306
+ position: absolute;
307
+ top: 100%;
308
+ height: 0;
309
+ width: 100%;
310
+ overflow-y: scroll;
311
+ -webkit-overflow-scrolling: touch;
312
+ -webkit-transition: height 0s 0.6s;
313
+ transition: height 0s 0.6s;
314
+ }
315
+
316
+ .js .show-content .pages {
317
+ -webkit-transition: none;
318
+ transition: none;
319
+ height: 100%;
320
+ }
321
+
322
+ .pages .content {
323
+ background: #dfe3e3;
324
+ text-align: center;
325
+ color: #545b61;
326
+ font-size: 1.5em;
327
+ }
328
+
329
+ .js .pages .content {
330
+ position: absolute;
331
+ top: 0;
332
+ left: 0;
333
+ height: 0;
334
+ width: 100%;
335
+ overflow: hidden;
336
+ -webkit-transition: height 0s 0.6s;
337
+ transition: height 0s 0.6s;
338
+ }
339
+
340
+ .pages .content.show {
341
+ height: auto;
342
+ -webkit-transition: none;
343
+ transition: none;
344
+ }
345
+
346
+ .pages .content h2 {
347
+ font-size: 5em;
348
+ max-width: 70%;
349
+ color: #34495e;
350
+ padding: 2.25em 10px 1em;
351
+ }
352
+
353
+ .no-js .pages .content h2 {
354
+ padding-top: 1em;
355
+ }
356
+
357
+ .pages .content h2 span {
358
+ color: #95a5a6;
359
+ }
360
+
361
+ .pages .content p {
362
+ max-width: 1100px;
363
+ margin: 0 auto;
364
+ padding: 0.5em 2em;
365
+ line-height: 1.5;
366
+ text-align: left;
367
+ font-family: 'Book Antiqua', Palatino, 'Palatino Linotype', 'Palatino LT STD', Georgia, serif;
368
+ }
369
+
370
+ .pages .content p:last-child {
371
+ padding: 5em 1em 8em;
372
+ text-align: center;
373
+ font-weight: bold;
374
+ }
375
+
376
+ .js .pages .content h2,
377
+ .js .pages .content p {
378
+ -webkit-transform: translate3d(0,200px,0);
379
+ transform: translate3d(0,200px,0);
380
+ -webkit-transition-property: opacity;
381
+ transition-property: opacity;
382
+ -webkit-transition-duration: 0.3s;
383
+ transition-duration: 0.3s;
384
+ -webkit-transition-timing-function: cubic-bezier(.7,0,.3,1);
385
+ transition-timing-function: cubic-bezier(.7,0,.3,1);
386
+ }
387
+
388
+ .pages .content.show h2,
389
+ .pages .content.show p {
390
+ -webkit-transition-duration: 1s;
391
+ transition-duration: 1s;
392
+ -webkit-transition-property: -webkit-transform, opacity;
393
+ transition-property: transform, opacity;
394
+ -webkit-transform: translate3d(0,0,0);
395
+ transform: translate3d(0,0,0);
396
+ }
397
+
398
+ .pages .content.show p {
399
+ -webkit-transition-delay: 0.1s;
400
+ transition-delay: 0.1s;
401
+ }
402
+
403
+ .pages .content a {
404
+ color: #3c89d5;
405
+ display: block;
406
+ }
407
+
408
+ .pages .content a:hover {
409
+ color: #545b61;
410
+ }
411
+
412
+ /* Switch */
413
+ .switch-min .img-dragger-large .slide > *:not(.img-wrap),
414
+ .switch-max .img-dragger-small .slide > *:not(.img-wrap) { /* fade out everything except image */
415
+ opacity: 0;
416
+ -webkit-transition: none;
417
+ transition: none;
418
+ }
419
+
420
+ .switch-min .img-dragger-large,
421
+ .switch-max .img-dragger-small {
422
+ -webkit-transition: -webkit-transform 0.6s cubic-bezier(.7,0,.3,1);
423
+ transition: transform 0.6s cubic-bezier(.7,0,.3,1);
424
+ }
425
+
426
+ .img-dragger-small button.content-switch {
427
+ opacity: 0;
428
+ pointer-events: none;
429
+ }
430
+
431
+ /* Helper classes */
432
+ .no-transition {
433
+ -webkit-transition: none !important;
434
+ transition: none !important;
435
+ }
436
+
437
+ .hide {
438
+ opacity: 0 !important;
439
+ pointer-events: none !important;
440
+ }
441
+
442
+ @media screen and (max-width: 63.125em) {
443
+ .dragslider h2 {
444
+ font-size: 2.8em;
445
+ }
446
+ .pages .content {
447
+ font-size: 100%;
448
+ }
449
+ .pages .content h2 {
450
+ font-size: 3em;
451
+ }
452
+ }
453
+
454
+ @media screen and (max-width: 650px) {
455
+ button.slider-switch {
456
+ display: none;
457
+ }
458
+ }