2019-09-11 16:47:13 +00:00
|
|
|
import './jquery-global.js';
|
|
|
|
import 'single-page-nav/jquery.singlePageNav.js';
|
|
|
|
//bind plugin definition to jQuery
|
|
|
|
|
2019-09-12 15:40:21 +00:00
|
|
|
$(document).ready(function () {
|
2019-09-11 16:47:13 +00:00
|
|
|
|
2019-09-12 15:40:21 +00:00
|
|
|
// =Hero
|
|
|
|
// Alway make hero-container height equal to window height
|
|
|
|
|
|
|
|
var $heroContainer = $('.hero');
|
|
|
|
|
|
|
|
$heroContainer.height(window.innerHeight);
|
|
|
|
|
|
|
|
// When user resize browser window, hero container needs to have the same
|
|
|
|
// height as browser window height.
|
|
|
|
$(window).resize(function () {
|
2019-09-11 16:47:13 +00:00
|
|
|
$heroContainer.height(window.innerHeight);
|
2019-09-12 15:40:21 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
// =Work
|
|
|
|
// Isotope filters
|
|
|
|
// var $workFilterLinks = $('.work-filters li');
|
|
|
|
// var $container = $('.work-items');
|
|
|
|
|
|
|
|
// $workFilterLinks.find('a').click(function(){
|
|
|
|
// $workFilterLinks.removeClass('active');
|
|
|
|
// $container.isotope({
|
|
|
|
// // options
|
|
|
|
// filter: $(this).attr('data-filter'),
|
|
|
|
// itemSelector: '.isotope-item',
|
|
|
|
// animationEngine : "best-available",
|
|
|
|
// masonry: {
|
|
|
|
// columnWidth: '.isotope-item'
|
|
|
|
// }
|
|
|
|
// });
|
|
|
|
// $(this).parent().addClass('active');
|
|
|
|
// return false;
|
|
|
|
// });
|
|
|
|
|
|
|
|
// Menu initialization
|
|
|
|
|
|
|
|
var $menuIcon = $('.menu-icon'),
|
|
|
|
$navigation = $('.navigation'),
|
|
|
|
$menu = $('.menu'),
|
|
|
|
$navigationLink = $('.menu a');
|
|
|
|
|
|
|
|
if (location.pathname == "/") {
|
2020-04-20 21:29:10 +00:00
|
|
|
$navigation.addClass('transparent');
|
2019-09-12 15:40:21 +00:00
|
|
|
$(window).scroll(function () {
|
2020-04-20 21:29:10 +00:00
|
|
|
if (window.scrollY >= (window.innerHeight + $navigation.height())) {
|
2019-09-11 16:47:13 +00:00
|
|
|
$menuIcon.addClass('active');
|
2020-04-20 21:29:10 +00:00
|
|
|
$navigation.removeClass('transparent');
|
2019-09-11 16:47:13 +00:00
|
|
|
} else {
|
|
|
|
$menuIcon.removeClass('active');
|
2020-04-20 21:29:10 +00:00
|
|
|
$navigation.addClass('transparent');
|
2019-09-11 16:47:13 +00:00
|
|
|
}
|
|
|
|
});
|
2020-04-20 21:29:10 +00:00
|
|
|
}
|
2019-09-12 15:40:21 +00:00
|
|
|
|
|
|
|
$menuIcon.click(function (e) {
|
|
|
|
e.preventDefault();
|
|
|
|
$navigation.toggleClass('active');
|
2019-09-11 16:47:13 +00:00
|
|
|
});
|
2019-09-12 15:40:21 +00:00
|
|
|
|
|
|
|
// $menu.singlePageNav({
|
|
|
|
// filter: ':not(.external)',
|
|
|
|
// speed: 1000,
|
|
|
|
// currentClass: 'current',
|
|
|
|
// easing: 'swing',
|
|
|
|
// updateHash: false,
|
|
|
|
// beforeStart: function() {
|
|
|
|
// },
|
|
|
|
// onComplete: function() {
|
|
|
|
// $navigation.removeClass('active');
|
|
|
|
// }
|
|
|
|
// });
|
|
|
|
|
|
|
|
//// Scrollreveal initialize
|
|
|
|
// var config = {
|
|
|
|
// easing: 'hustle',
|
|
|
|
// reset: false,
|
|
|
|
// delay: 'onload',
|
|
|
|
// opacity: .2,
|
|
|
|
// vFactor: 0.2,
|
|
|
|
// mobile: false
|
|
|
|
// }
|
|
|
|
// window.sr = new scrollReveal(config);
|
|
|
|
|
|
|
|
});
|