scrolltojs-rails 0.0.5 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/lib/scrolltojs/rails/version.rb +1 -1
  3. data/vendor/assets/javascripts/{con_theme.js → landing.js} +0 -0
  4. data/vendor/assets/javascripts/third_landing_page/common.js +468 -0
  5. data/vendor/assets/javascripts/third_landing_page/jwplayer.flash.swf +0 -0
  6. data/vendor/assets/javascripts/third_landing_page/jwplayer.html5.js +258 -0
  7. data/vendor/assets/javascripts/third_landing_page/jwplayer.js +138 -0
  8. data/vendor/assets/javascripts/third_landing_page/main.js +669 -0
  9. data/vendor/assets/javascripts/third_landing_page/owl.carousel.min.js +47 -0
  10. data/vendor/assets/javascripts/third_landing_page/vendor/bootstrap.min.js +7 -0
  11. data/vendor/assets/javascripts/third_landing_page/vendor/detectmobilebrowser.js +7 -0
  12. data/vendor/assets/javascripts/third_landing_page/vendor/gmaps.js +2149 -0
  13. data/vendor/assets/javascripts/third_landing_page/vendor/html5shiv.js +301 -0
  14. data/vendor/assets/javascripts/third_landing_page/vendor/isotope.pkgd.min.js +8 -0
  15. data/vendor/assets/javascripts/third_landing_page/vendor/jquery-1.10.2.min.js +6 -0
  16. data/vendor/assets/javascripts/third_landing_page/vendor/jquery.ajaxchimp.min.js +1 -0
  17. data/vendor/assets/javascripts/third_landing_page/vendor/jquery.counterup.min.js +8 -0
  18. data/vendor/assets/javascripts/third_landing_page/vendor/jquery.easing.1.3.js +205 -0
  19. data/vendor/assets/javascripts/third_landing_page/vendor/jquery.fitvids.js +83 -0
  20. data/vendor/assets/javascripts/third_landing_page/vendor/jquery.nicescroll.min.js +114 -0
  21. data/vendor/assets/javascripts/third_landing_page/vendor/jquery.stellar.js +660 -0
  22. data/vendor/assets/javascripts/third_landing_page/vendor/jquery.timeago.js +214 -0
  23. data/vendor/assets/javascripts/third_landing_page/vendor/jquery.tubular.1.0.js +148 -0
  24. data/vendor/assets/javascripts/third_landing_page/vendor/matchMedia.js +46 -0
  25. data/vendor/assets/javascripts/third_landing_page/vendor/materialize.min.js +10 -0
  26. data/vendor/assets/javascripts/third_landing_page/vendor/owl.carousel.min.js +47 -0
  27. data/vendor/assets/javascripts/third_landing_page/vendor/tweetie.js +142 -0
  28. data/vendor/assets/javascripts/third_landing_page/vendor/waypoints.js +8 -0
  29. data/vendor/assets/javascripts/third_landing_page/vendor/wow.min.js +2 -0
  30. data/vendor/assets/stylesheets/third_landing_page/animate.min.css +6 -0
  31. data/vendor/assets/stylesheets/third_landing_page/blog-single.css +657 -0
  32. data/vendor/assets/stylesheets/third_landing_page/blog.css +168 -0
  33. data/vendor/assets/stylesheets/third_landing_page/bootstrap.min.css +10 -0
  34. data/vendor/assets/stylesheets/third_landing_page/colors/color1.css +164 -0
  35. data/vendor/assets/stylesheets/third_landing_page/colors/color2.css +164 -0
  36. data/vendor/assets/stylesheets/third_landing_page/colors/color3.css +164 -0
  37. data/vendor/assets/stylesheets/third_landing_page/colors/color4.css +164 -0
  38. data/vendor/assets/stylesheets/third_landing_page/colors/color5.css +164 -0
  39. data/vendor/assets/stylesheets/third_landing_page/colors/color6.css +164 -0
  40. data/vendor/assets/stylesheets/third_landing_page/colors/color7.css +164 -0
  41. data/vendor/assets/stylesheets/third_landing_page/colors/color8.css +164 -0
  42. data/vendor/assets/stylesheets/third_landing_page/ionicons.min.css +11 -0
  43. data/vendor/assets/stylesheets/third_landing_page/main.css +2500 -0
  44. data/vendor/assets/stylesheets/third_landing_page/owl.carousel.css +71 -0
  45. data/vendor/assets/stylesheets/third_landing_page/owl.theme.css +79 -0
  46. data/vendor/assets/stylesheets/third_landing_page/owl.transitions.css +163 -0
  47. data/vendor/assets/stylesheets/third_landing_page/responsive.css +856 -0
  48. metadata +47 -8
  49. data/vendor/assets/javascripts/con_theme/_con.min.js +0 -11
  50. data/vendor/assets/javascripts/con_theme/materialize.min.js +0 -10
  51. data/vendor/assets/javascripts/con_theme/nanoscroller.min.js +0 -16
  52. data/vendor/assets/javascripts/con_theme/requestAnimationFrame.min.js +0 -4
  53. data/vendor/assets/javascripts/con_theme/sortable.min.js +0 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e6ed9eede38ea455e689f44f354f1457558fd509
4
- data.tar.gz: 87b330fb552fad66194b96e514b68ed8f74dc11d
3
+ metadata.gz: c1d8fb8bf217f6cce09007058f3b6fc439fc99e9
4
+ data.tar.gz: ac9d166475f5738764f338b9d843c18c396dacd8
5
5
  SHA512:
6
- metadata.gz: a6d9b84824275354bbf7034abfdd821b1e8ae6939f84ff90727f7ed3ec6a8428da0ea5b3c17f680f055f80d67cfcae8e0aa6b482405f0931463da9451c646f43
7
- data.tar.gz: 471b9be96e7c829102235ee9a2f3e67e52f44d00bdfe1fafb42cd7bf735e9391e223551ee2af5ed57e49768a1cea62b162a5d72553bd159cb5f8d020c1bcfb39
6
+ metadata.gz: 66e6b9de284eb62dac0359921b8d000513ee9998bd477ae770d0d599266417da7e4fcf7be56e372e0d57a3f60f543d764b449766f5a47d94aac6a8168bb99baf
7
+ data.tar.gz: 47d4600ed9e6389aa9b4044c1a8a4d3b4bc41b5be6688ce06ca0cb5d2da92e3ed304c620caae7c0931617a5e9fbe5deb9aa2fd9ffba47fda74468da71e8b7404
@@ -1,5 +1,5 @@
1
1
  module Scrolltojs
2
2
  module Rails
3
- VERSION = "0.0.5"
3
+ VERSION = "0.1.0"
4
4
  end
5
5
  end
@@ -0,0 +1,468 @@
1
+ var $ = jQuery;
2
+
3
+
4
+ // for get max height
5
+ (function(){
6
+ $.fn.getMaxHeight = function() {
7
+ var _array = [];
8
+ $(this).each(function(){
9
+ _array.push( $(this).height() );
10
+ });
11
+ return Math.max.apply(Math,_array);
12
+ };
13
+ }());
14
+
15
+
16
+ // for aspect ratio
17
+ (function(){
18
+ var ratio = "16:9";
19
+ $.fn.setAspectRatio = function(ratioNew) {
20
+ if ( ratioNew ) {
21
+ ratio = ratioNew;
22
+ }
23
+
24
+ var rationLn = ratio.split(":");
25
+
26
+ $(this).each(function(){
27
+ var item = $(this);
28
+ if ( item.length > 0 ) {
29
+ var itemWidth = item.width();
30
+ var aspectHeight = ( itemWidth * rationLn[1]/rationLn[0] );
31
+ item.height(aspectHeight);
32
+ }
33
+ });
34
+ };
35
+ }());
36
+
37
+ // for scrolling to targeted sections
38
+ (function(){
39
+ $.fn.scrollingTo = function( opts ) {
40
+ var defaults = {
41
+ animationTime : 1000,
42
+ easing : '',
43
+ callbackBeforeTransition : function(){},
44
+ callbackAfterTransition : function(){}
45
+ };
46
+
47
+ var config = $.extend( {}, defaults, opts );
48
+
49
+ $(this).click(function(e){
50
+ var eventVal = e;
51
+ e.preventDefault();
52
+
53
+ var $section = $(document).find( $(this).data('section') );
54
+ if ( $section.length < 1 ) {
55
+ return false;
56
+ }
57
+
58
+ if ( $('html, body').is(':animated') ) {
59
+ $('html, body').stop( true, true );
60
+ }
61
+
62
+ var scrollPos = $section.offset().top;
63
+
64
+ if ( $(window).scrollTop() == scrollPos ) {
65
+ return false;
66
+ }
67
+
68
+ config.callbackBeforeTransition(eventVal, $section);
69
+
70
+ $('html, body').animate({
71
+ 'scrollTop' : (scrollPos+'px' )
72
+ }, config.animationTime, config.easing, function(){
73
+ config.callbackAfterTransition(eventVal, $section);
74
+ });
75
+
76
+ return $(this);
77
+ });
78
+ };
79
+ }());
80
+
81
+ // callback after ready the document
82
+ $(document).ready(function(){
83
+
84
+ // setting the post thumb height depend on aspect ratio 16:9
85
+ $('.blog-post-thumb-container.videoPost').setAspectRatio();
86
+
87
+
88
+ // jwplayer video post
89
+ (function(){
90
+ $('.player').each(function(){
91
+ var $this = $(this),
92
+ defaults = {
93
+ fileSrc : '',
94
+ imageSrc : '',
95
+ id : '',
96
+ width : '100%',
97
+ height : '100%',
98
+ aspectratio : ''
99
+ },
100
+ config = {
101
+ fileSrc : $(this).data('file-sec') || defaults.fileSrc,
102
+ imageSrc : $(this).data('image-src') || defaults.imageSrc,
103
+ id : $(this).attr('id'),
104
+ width : $(this).data('width') || defaults.width,
105
+ height : $(this).data('height') || defaults.height,
106
+ aspectratio : $(this).data('aspectratio') || defaults.aspectratio
107
+ };
108
+
109
+ jwplayer(config.id).setup({
110
+ file: config.fileSrc,
111
+ image: config.imageSrc,
112
+ width: config.width,
113
+ height: config.height,
114
+ aspectratio : config.aspectratio
115
+ });
116
+ });
117
+ }());
118
+
119
+
120
+ // nice scroll
121
+ if ( jQuery.browser.mobile !== true ) {
122
+ $("html").niceScroll({
123
+ cursorwidth: '10px',
124
+ zindex: '999999999'
125
+ });
126
+ }
127
+
128
+
129
+ // blog Mesonary
130
+ if ( $('#blog-posts').length > 0 ) {
131
+ window.blogMsnry = $('#blog-posts').isotope({
132
+ itemSelector: '.single-post',
133
+ isInitLayout: false,
134
+ layoutMode: 'masonry'
135
+ });
136
+ }
137
+
138
+
139
+ // Contact Form
140
+ $(this).click(function(){
141
+ $('#contactForm .form-message').slideUp();
142
+ });
143
+
144
+
145
+ $('#contactForm').on('submit', function(e){
146
+ e.preventDefault();
147
+ $.fn.button.Constructor.DEFAULTS.loadingText = "Sending...";
148
+
149
+ var $submitBtn = $(this).find('input[type="submit"]'),
150
+ $messageArea = $(this).find('.form-message');
151
+ $submitBtn.button('loading');
152
+
153
+ var data = $(this).serialize();
154
+ $.ajax({
155
+ type: "POST",
156
+ url: "assets/inc/sendEmail.php",
157
+ data: data
158
+ }).done(function(msg){
159
+
160
+ var hand = setTimeout(function(){
161
+ $submitBtn.button('reset');
162
+ // Message was sent
163
+ if (msg == 'OK') {
164
+ var successMsg = "Thanks for contact us";
165
+ $messageArea.html("<p>"+successMsg+"</p>").removeClass('error').addClass('success').slideDown();
166
+ }
167
+ // There was an error
168
+ else {
169
+ $messageArea.html("<p>"+msg+"</p>").removeClass('success').addClass('error').slideDown();
170
+ }
171
+
172
+ clearTimeout(hand);
173
+
174
+ }, 1000);
175
+ }).fail(function(){
176
+ var errorMeg = 'Sorry, something wrong, Please try again after some time.';
177
+ var hand = setTimeout(function(){
178
+ $submitBtn.button('reset');
179
+ $messageArea.html("<p>"+errorMeg+"</p>").removeClass('success').addClass('error').slideDown();
180
+ clearTimeout(hand);
181
+ }, 1000);
182
+ });
183
+ });
184
+ });
185
+
186
+ // callback after loading the window
187
+ $(window).load(function(){
188
+
189
+ // hide the loader
190
+ (function(){
191
+ var loader = $('#loader');
192
+ if ( loader.length > 0 ) {
193
+ $('#loader').fadeOut(function(){
194
+ $('#home .overlay-content .animated').removeClass('fadeOut').addClass('fadeInUpSmall');
195
+ });
196
+ }
197
+ }());
198
+
199
+
200
+ // favorite maker
201
+ (function(){
202
+ var lovedText = "You already love this", loveText = "Love this", loveClass = "active";
203
+ $('.js-favorite').on('click', function(e){
204
+ e.preventDefault();
205
+ var favoriteNumb = parseInt( $(this).find('.numb').text(), 10 );
206
+ if ( $(this).hasClass(loveClass) ) {
207
+ $(this).removeClass(loveClass).attr('title', loveText);
208
+ --favoriteNumb;
209
+ $(this).find('.numb').text( favoriteNumb );
210
+ } else {
211
+ $(this).addClass(loveClass).attr('title', lovedText);
212
+ ++favoriteNumb;
213
+ $(this).find('.numb').text( favoriteNumb );
214
+ }
215
+ });
216
+ }());
217
+
218
+
219
+ // blog post slider
220
+ (function(){
221
+ var $blog_post_slider = $('.thumb-slides-container');
222
+ if ( $blog_post_slider.length > 0 ) {
223
+
224
+ $blog_post_slider.each(function(){
225
+ $(this).owlCarousel({
226
+ singleItem : true,
227
+ autoPlay : true,
228
+ stopOnHover : true,
229
+ slideSpeed : 800,
230
+ pagination : false
231
+ });
232
+ });
233
+
234
+
235
+
236
+ $('.thumb-slides-controller a').click(function(e){
237
+ e.preventDefault();
238
+
239
+ var blog_post_slider_data = $(this).closest('.blog-post-thumb-container').children('.thumb-slides-container').data('owlCarousel');
240
+
241
+ if ( $(this).hasClass('left-arrow') ) {
242
+ blog_post_slider_data.prev();
243
+ } else {
244
+ blog_post_slider_data.next();
245
+ }
246
+ });
247
+ }
248
+ }());
249
+
250
+
251
+ // Wow init
252
+ new WOW({
253
+ offset: 150,
254
+ mobile: false
255
+ }).init();
256
+
257
+
258
+ // Contact toggle
259
+ $('.contact-location-toggle-btn').scrollingTo({
260
+ easing : 'easeOutQuart',
261
+ callbackBeforeTransition : function(e){
262
+ $('.contact-content-wrapper').slideToggle(600,'easeOutQuart');
263
+ }
264
+ });
265
+
266
+
267
+ // Blog masonry re layout
268
+ if ( typeof blogMsnry !== "undefined" ) {
269
+ blogMsnry.isotope('layout');
270
+ }
271
+
272
+
273
+ });
274
+
275
+
276
+ // callback after resize the window
277
+ $(window).resize(function(){
278
+
279
+ // setting the post thumb height depend on aspect ratio 16:9
280
+ $('.blog-post-thumb-container.videoPost').setAspectRatio();
281
+
282
+
283
+ // Blog masonry re layout
284
+ if ( typeof blogMsnry !== "undefined" ) {
285
+ blogMsnry.isotope('layout');
286
+ }
287
+
288
+ });
289
+
290
+
291
+
292
+ // Intelligent Menu plugin
293
+ (function(){
294
+ function Menu($element, options){
295
+
296
+ var handler,
297
+ defaults = {
298
+ domObj : $element,
299
+ className : 'menu-hide',
300
+ position : '80px'
301
+ },
302
+ config = $.extend({}, defaults, options),
303
+ coreFuns = {
304
+ showMenu : function(){
305
+ if ( config.domObj.hasClass(config.className) ) {
306
+ config.domObj.stop().animate({
307
+ 'top' : '0px'
308
+ }, 200, function(){
309
+ $(this).removeClass(config.className);
310
+ });
311
+ }
312
+ },
313
+ hideMenu : function(){
314
+ if ( !config.domObj.hasClass(config.className) ) {
315
+ config.domObj.stop().animate({
316
+ 'top' : '-'+config.position
317
+ }, 200, function(){
318
+ $(this).addClass(config.className);
319
+ });
320
+ }
321
+ }
322
+ },
323
+ publicFuns = {
324
+ intelligent_menu : function(){
325
+ var lastScrollTop = 0, direction;
326
+
327
+ if ( handler != undefined ) {
328
+ $(window).unbind('scroll', handler);
329
+ }
330
+
331
+ handler = function(e){
332
+ var scrollTop = $(this).scrollTop();
333
+
334
+ direction = ( scrollTop > lastScrollTop ) ? 'down' : 'up';
335
+
336
+ lastScrollTop = scrollTop;
337
+
338
+ // check is user scrolling to up or down?
339
+ if ( direction == 'up' ) {
340
+ // you are scrolling to up, so we have to show the menu
341
+ coreFuns.showMenu();
342
+ } else {
343
+ // you are scrolling to down, so we have to hide the menu
344
+ coreFuns.hideMenu();
345
+ }
346
+ };
347
+
348
+ $(window).bind('scroll', handler);
349
+ },
350
+ fixed_menu : function(){
351
+
352
+ if ( handler !== undefined ) {
353
+ $(window).unbind('scroll', handler);
354
+ }
355
+
356
+ handler = function(e){
357
+ coreFuns.showMenu();
358
+ };
359
+
360
+ $(window).bind('scroll', handler);
361
+ },
362
+ mobile_intelligent_menu : function(){
363
+ if ( jQuery.browser.mobile === true ) {
364
+ this.intelligent_menu();
365
+ } else {
366
+ this.fixed_menu();
367
+ }
368
+ }
369
+ }
370
+ ;
371
+
372
+ return publicFuns;
373
+ }
374
+
375
+ $.fn.menu = function( options ){
376
+ var $element = this.first();
377
+ var menuFuns = new Menu( $element, options );
378
+ return menuFuns;
379
+ };
380
+
381
+ })();
382
+
383
+
384
+ // call to Intelligent Menu plugin
385
+ var menuFun = $('header').menu();
386
+
387
+
388
+
389
+ /* Choose your navigation style */
390
+
391
+ menuFun.intelligent_menu(); // Hide intelligently
392
+
393
+ // menuFun.fixed_menu(); // Always fixed
394
+
395
+ // menuFun.mobile_intelligent_menu(); // Hide intelligently on Mobile Devices
396
+
397
+
398
+
399
+ $('#switch input').on('change', function(e){
400
+
401
+ var menuId = this.id;
402
+
403
+ if ( menuId === 'menu1' ) {
404
+
405
+ menuFun.fixed_menu();
406
+
407
+ } else if( menuId === 'menu2' ) {
408
+
409
+ menuFun.intelligent_menu();
410
+
411
+ } else {
412
+
413
+ menuFun.mobile_intelligent_menu();
414
+
415
+ }
416
+ });
417
+
418
+
419
+ // mobile menu plugin
420
+ var mobileMenu = {
421
+ bar : $('.header-mobile-screen .bar-area'),
422
+ menu : $('.header-mobile-screen .menu'),
423
+ hideMenu : function(){
424
+ if ( !mobileMenu.bar.is(':visible') ) { return false; }
425
+ mobileMenu.bar.find('a.close-menu').hide().siblings('a').show();
426
+ $('header').removeClass('mobileBG');
427
+ mobileMenu.menu.removeClass('fadeInUpSmall').addClass('fadeOutUpSmall').fadeOut(function(){
428
+ $('header').css('height', 'auto');
429
+ $('#home .overlay-content').removeClass('fadeOutUpSmall').addClass('fadeInUpSmall');
430
+ });
431
+ return this;
432
+ },
433
+ showMenu : function(){
434
+ if ( !mobileMenu.bar.is(':visible') ) { return false; }
435
+ mobileMenu.bar.find('a.open-menu').hide().siblings('a').show();
436
+ $('#home .overlay-content').removeClass('fadeInUpSmall').addClass('fadeOutUpSmall');
437
+ $('header').css('height', '100%').addClass('mobileBG');
438
+ var hand = setTimeout(function(){
439
+ mobileMenu.menu.removeClass('fadeOutUpSmall').addClass('fadeInUpSmall').fadeIn();
440
+ clearTimeout(hand);
441
+ }, 200);
442
+ return this;
443
+ },
444
+ init : function(){
445
+ mobileMenu.bar.find('a').click(function(e){
446
+ e.preventDefault();
447
+ if ( $(this).hasClass('open-menu') ) {
448
+ mobileMenu.showMenu();
449
+ } else {
450
+ mobileMenu.hideMenu();
451
+ }
452
+ });
453
+
454
+ mobileMenu.menu.find('li').click(function(e){
455
+ if ( $(this).hasClass('has-sub') ) {
456
+ $(this).toggleClass('current').children('ul.sub-menu').slideToggle(500);
457
+ } else {
458
+ mobileMenu.hideMenu();
459
+ }
460
+ });
461
+
462
+ $(window).bind('resize', function(){
463
+ mobileMenu.hideMenu();
464
+ });
465
+ }
466
+ };
467
+
468
+ mobileMenu.init();