base_logic_landing 0.1.2 → 0.1.3
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/README.md +1 -1
- data/lib/app_mate_landing/engine.rb +12 -0
- data/lib/app_mate_landing/version.rb +3 -0
- data/lib/app_mate_landing.rb +77 -0
- metadata +18 -54
- data/lib/appmate_landing/version.rb +0 -3
- data/lib/appmate_landing.rb +0 -8
- data/vendor/assets/javascripts/app_mate.js +0 -0
- data/vendor/assets/javascripts/landing/common.js +0 -468
- data/vendor/assets/javascripts/landing/jwplayer/jwplayer.flash.swf +0 -0
- data/vendor/assets/javascripts/landing/jwplayer/jwplayer.html5.js +0 -258
- data/vendor/assets/javascripts/landing/jwplayer/jwplayer.js +0 -138
- data/vendor/assets/javascripts/landing/main.js +0 -669
- data/vendor/assets/javascripts/landing/owl-carousel/owl.carousel.js +0 -1512
- data/vendor/assets/javascripts/landing/owl-carousel/owl.carousel.min.js +0 -47
- data/vendor/assets/javascripts/landing/requirer.js +0 -0
- data/vendor/assets/javascripts/landing/third/detectmobilebrowser.js +0 -7
- data/vendor/assets/javascripts/landing/third/gmaps.js +0 -2149
- data/vendor/assets/javascripts/landing/third/html5shiv.js +0 -301
- data/vendor/assets/javascripts/landing/third/isotope.pkgd.min.js +0 -8
- data/vendor/assets/javascripts/landing/third/jquery.ajaxchimp.min.js +0 -1
- data/vendor/assets/javascripts/landing/third/jquery.counterup.min.js +0 -8
- data/vendor/assets/javascripts/landing/third/jquery.easing.1.3.js +0 -205
- data/vendor/assets/javascripts/landing/third/jquery.fitvids.js +0 -83
- data/vendor/assets/javascripts/landing/third/jquery.nicescroll.min.js +0 -114
- data/vendor/assets/javascripts/landing/third/jquery.stellar.js +0 -660
- data/vendor/assets/javascripts/landing/third/jquery.timeago.js +0 -214
- data/vendor/assets/javascripts/landing/third/jquery.tubular.1.0.js +0 -148
- data/vendor/assets/javascripts/landing/third/matchMedia.js +0 -46
- data/vendor/assets/javascripts/landing/third/owl.carousel.min.js +0 -47
- data/vendor/assets/javascripts/landing/third/tweetie.js +0 -142
- data/vendor/assets/javascripts/landing/third/waypoints.js +0 -8
- data/vendor/assets/javascripts/landing/third/wow.min.js +0 -2
- data/vendor/assets/stylesheets/app_mate.scss +0 -0
- data/vendor/assets/stylesheets/landing/app_mate/animate.min.css +0 -6
- data/vendor/assets/stylesheets/landing/app_mate/blog-single.css +0 -657
- data/vendor/assets/stylesheets/landing/app_mate/blog.css +0 -168
- data/vendor/assets/stylesheets/landing/app_mate/bootstrap.css +0 -6358
- data/vendor/assets/stylesheets/landing/app_mate/bootstrap.min.css +0 -10
- data/vendor/assets/stylesheets/landing/app_mate/colors/color1.css +0 -164
- data/vendor/assets/stylesheets/landing/app_mate/colors/color2.css +0 -164
- data/vendor/assets/stylesheets/landing/app_mate/colors/color3.css +0 -164
- data/vendor/assets/stylesheets/landing/app_mate/colors/color4.css +0 -164
- data/vendor/assets/stylesheets/landing/app_mate/colors/color5.css +0 -164
- data/vendor/assets/stylesheets/landing/app_mate/colors/color6.css +0 -164
- data/vendor/assets/stylesheets/landing/app_mate/colors/color7.css +0 -164
- data/vendor/assets/stylesheets/landing/app_mate/colors/color8.css +0 -164
- data/vendor/assets/stylesheets/landing/app_mate/font-awesome.min.css +0 -4
- data/vendor/assets/stylesheets/landing/app_mate/fonts.css +0 -75
- data/vendor/assets/stylesheets/landing/app_mate/ionicons.min.css +0 -11
- data/vendor/assets/stylesheets/landing/app_mate/main.css +0 -2500
- data/vendor/assets/stylesheets/landing/app_mate/materialize.min.css +0 -16
- data/vendor/assets/stylesheets/landing/app_mate/responsive.css +0 -856
- data/vendor/assets/stylesheets/landing/owl-carousel/AjaxLoader.gif +0 -0
- data/vendor/assets/stylesheets/landing/owl-carousel/grabbing.png +0 -0
- data/vendor/assets/stylesheets/landing/owl-carousel/owl.carousel.css +0 -71
- data/vendor/assets/stylesheets/landing/owl-carousel/owl.theme.css +0 -79
- data/vendor/assets/stylesheets/landing/owl-carousel/owl.transitions.css +0 -163
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 453bc307bea68c0e4d6622641609487130e02683
|
4
|
+
data.tar.gz: d870fbd424423038c8efe51fb5c78d2b6300de30
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c6059566d8f05f66274e912b94a14477c01b934d3800c9303b0da70c275a9db1da5f502cb8ee2d62e91d1e0747ff090eaf06d8b62a17213b88470eddf78743b0
|
7
|
+
data.tar.gz: 3e9a50d7e203c86ea2e799b2c78ac1fefe28c312f1b2800d60bc83ed712630723ecc8f1a58f47d8194c1b508c6f2710edfb5c4c7f3849fecca1920d228f8d8e7
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
#
|
1
|
+
# AppMateLanding
|
2
2
|
|
3
3
|
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/appmate_landing`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
4
|
|
@@ -0,0 +1,12 @@
|
|
1
|
+
module AppMateLanding
|
2
|
+
module Sass
|
3
|
+
class Engine < ::Rails::Engine
|
4
|
+
initializer 'materialize-sass.assets.precompile' do |app|
|
5
|
+
%w(stylesheets javascripts fonts images).each do |sub|
|
6
|
+
app.config.assets.paths << root.join('app/assets', sub).to_s
|
7
|
+
end
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
ge
|
@@ -0,0 +1,77 @@
|
|
1
|
+
require "appmate_landing/version"
|
2
|
+
|
3
|
+
module AppMateLanding
|
4
|
+
module Sass
|
5
|
+
# give credit to bootstrap-sass
|
6
|
+
class << self
|
7
|
+
|
8
|
+
def load!
|
9
|
+
#register_compass_extension if compass?
|
10
|
+
if rails?
|
11
|
+
elsif sprockets?
|
12
|
+
register_sprockets
|
13
|
+
end
|
14
|
+
configure_sass
|
15
|
+
end
|
16
|
+
|
17
|
+
# Paths
|
18
|
+
def gem_path
|
19
|
+
@gem_path ||= File.expand_path '..', File.dirname(__FILE__)
|
20
|
+
end
|
21
|
+
|
22
|
+
def stylesheets_path
|
23
|
+
File.join assets_path, 'stylesheets'
|
24
|
+
end
|
25
|
+
|
26
|
+
def fonts_path
|
27
|
+
File.join assets_path, 'fonts'
|
28
|
+
end
|
29
|
+
|
30
|
+
def javascripts_path
|
31
|
+
File.join assets_path, 'javascripts'
|
32
|
+
end
|
33
|
+
|
34
|
+
def assets_path
|
35
|
+
@assets_path ||= File.join gem_path, 'app/assets'
|
36
|
+
end
|
37
|
+
|
38
|
+
# Environment detection helpers
|
39
|
+
def sprockets?
|
40
|
+
defined?(::Sprockets)
|
41
|
+
end
|
42
|
+
|
43
|
+
#def compass?
|
44
|
+
# defined?(::Compass)
|
45
|
+
#end
|
46
|
+
|
47
|
+
def rails?
|
48
|
+
defined?(::Rails)
|
49
|
+
end
|
50
|
+
|
51
|
+
private
|
52
|
+
|
53
|
+
def configure_sass
|
54
|
+
require 'sass'
|
55
|
+
::Sass.load_paths << stylesheets_path
|
56
|
+
#::Sass::Script::Number.precision = [8, ::Sass::Script::Number.precision].max
|
57
|
+
end
|
58
|
+
|
59
|
+
#def register_compass_extension
|
60
|
+
# ::Compass::Frameworks.register(
|
61
|
+
# 'materialize',
|
62
|
+
# :version => Materialize::Sass::VERSION,
|
63
|
+
# :path => gem_path,
|
64
|
+
# :stylesheets_directory => stylesheets_path,
|
65
|
+
# :templates_directory => File.join(gem_path, 'templates')
|
66
|
+
# )
|
67
|
+
#end
|
68
|
+
|
69
|
+
def register_sprockets
|
70
|
+
Sprockets.append_path(stylesheets_path)
|
71
|
+
Sprockets.append_path(fonts_path)
|
72
|
+
Sprockets.append_path(javascripts_path)
|
73
|
+
end
|
74
|
+
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: base_logic_landing
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ilton Garcia dos Santos Silveira
|
@@ -58,6 +58,20 @@ dependencies:
|
|
58
58
|
- - "<"
|
59
59
|
- !ruby/object:Gem::Version
|
60
60
|
version: '5.0'
|
61
|
+
- !ruby/object:Gem::Dependency
|
62
|
+
name: sass
|
63
|
+
requirement: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - "~>"
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '3.3'
|
68
|
+
type: :runtime
|
69
|
+
prerelease: false
|
70
|
+
version_requirements: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - "~>"
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '3.3'
|
61
75
|
description: Write a longer description or delete this line
|
62
76
|
email:
|
63
77
|
- ilton@baseltda.com.br
|
@@ -66,59 +80,9 @@ extensions: []
|
|
66
80
|
extra_rdoc_files: []
|
67
81
|
files:
|
68
82
|
- README.md
|
69
|
-
- lib/
|
70
|
-
- lib/
|
71
|
-
-
|
72
|
-
- vendor/assets/javascripts/landing/common.js
|
73
|
-
- vendor/assets/javascripts/landing/jwplayer/jwplayer.flash.swf
|
74
|
-
- vendor/assets/javascripts/landing/jwplayer/jwplayer.html5.js
|
75
|
-
- vendor/assets/javascripts/landing/jwplayer/jwplayer.js
|
76
|
-
- vendor/assets/javascripts/landing/main.js
|
77
|
-
- vendor/assets/javascripts/landing/owl-carousel/owl.carousel.js
|
78
|
-
- vendor/assets/javascripts/landing/owl-carousel/owl.carousel.min.js
|
79
|
-
- vendor/assets/javascripts/landing/requirer.js
|
80
|
-
- vendor/assets/javascripts/landing/third/detectmobilebrowser.js
|
81
|
-
- vendor/assets/javascripts/landing/third/gmaps.js
|
82
|
-
- vendor/assets/javascripts/landing/third/html5shiv.js
|
83
|
-
- vendor/assets/javascripts/landing/third/isotope.pkgd.min.js
|
84
|
-
- vendor/assets/javascripts/landing/third/jquery.ajaxchimp.min.js
|
85
|
-
- vendor/assets/javascripts/landing/third/jquery.counterup.min.js
|
86
|
-
- vendor/assets/javascripts/landing/third/jquery.easing.1.3.js
|
87
|
-
- vendor/assets/javascripts/landing/third/jquery.fitvids.js
|
88
|
-
- vendor/assets/javascripts/landing/third/jquery.nicescroll.min.js
|
89
|
-
- vendor/assets/javascripts/landing/third/jquery.stellar.js
|
90
|
-
- vendor/assets/javascripts/landing/third/jquery.timeago.js
|
91
|
-
- vendor/assets/javascripts/landing/third/jquery.tubular.1.0.js
|
92
|
-
- vendor/assets/javascripts/landing/third/matchMedia.js
|
93
|
-
- vendor/assets/javascripts/landing/third/owl.carousel.min.js
|
94
|
-
- vendor/assets/javascripts/landing/third/tweetie.js
|
95
|
-
- vendor/assets/javascripts/landing/third/waypoints.js
|
96
|
-
- vendor/assets/javascripts/landing/third/wow.min.js
|
97
|
-
- vendor/assets/stylesheets/app_mate.scss
|
98
|
-
- vendor/assets/stylesheets/landing/app_mate/animate.min.css
|
99
|
-
- vendor/assets/stylesheets/landing/app_mate/blog-single.css
|
100
|
-
- vendor/assets/stylesheets/landing/app_mate/blog.css
|
101
|
-
- vendor/assets/stylesheets/landing/app_mate/bootstrap.css
|
102
|
-
- vendor/assets/stylesheets/landing/app_mate/bootstrap.min.css
|
103
|
-
- vendor/assets/stylesheets/landing/app_mate/colors/color1.css
|
104
|
-
- vendor/assets/stylesheets/landing/app_mate/colors/color2.css
|
105
|
-
- vendor/assets/stylesheets/landing/app_mate/colors/color3.css
|
106
|
-
- vendor/assets/stylesheets/landing/app_mate/colors/color4.css
|
107
|
-
- vendor/assets/stylesheets/landing/app_mate/colors/color5.css
|
108
|
-
- vendor/assets/stylesheets/landing/app_mate/colors/color6.css
|
109
|
-
- vendor/assets/stylesheets/landing/app_mate/colors/color7.css
|
110
|
-
- vendor/assets/stylesheets/landing/app_mate/colors/color8.css
|
111
|
-
- vendor/assets/stylesheets/landing/app_mate/font-awesome.min.css
|
112
|
-
- vendor/assets/stylesheets/landing/app_mate/fonts.css
|
113
|
-
- vendor/assets/stylesheets/landing/app_mate/ionicons.min.css
|
114
|
-
- vendor/assets/stylesheets/landing/app_mate/main.css
|
115
|
-
- vendor/assets/stylesheets/landing/app_mate/materialize.min.css
|
116
|
-
- vendor/assets/stylesheets/landing/app_mate/responsive.css
|
117
|
-
- vendor/assets/stylesheets/landing/owl-carousel/AjaxLoader.gif
|
118
|
-
- vendor/assets/stylesheets/landing/owl-carousel/grabbing.png
|
119
|
-
- vendor/assets/stylesheets/landing/owl-carousel/owl.carousel.css
|
120
|
-
- vendor/assets/stylesheets/landing/owl-carousel/owl.theme.css
|
121
|
-
- vendor/assets/stylesheets/landing/owl-carousel/owl.transitions.css
|
83
|
+
- lib/app_mate_landing.rb
|
84
|
+
- lib/app_mate_landing/engine.rb
|
85
|
+
- lib/app_mate_landing/version.rb
|
122
86
|
homepage: http://baseltda.com.br
|
123
87
|
licenses:
|
124
88
|
- GNU
|
data/lib/appmate_landing.rb
DELETED
File without changes
|
@@ -1,468 +0,0 @@
|
|
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();
|
Binary file
|