From 754d30cb36d3dc777b3d6c41db6d4bfe5b138872 Mon Sep 17 00:00:00 2001 From: AlexeyPogorelov Date: Mon, 28 Mar 2016 03:44:16 +0300 Subject: [PATCH] some fixes --- src/css/media.css | 45 ++++++++++++++++++++++++++++++++++++++++++++- src/js/main.js | 12 ++++++++---- 2 files changed, 52 insertions(+), 5 deletions(-) diff --git a/src/css/media.css b/src/css/media.css index 0bc6412..3fc27e5 100644 --- a/src/css/media.css +++ b/src/css/media.css @@ -53,6 +53,9 @@ font-size: 14px; } + #main-navigation { + height: 60px; + } #main-navigation .logo { left: 0; margin: 0 20px; @@ -76,7 +79,10 @@ margin: 10px 20px 0; } #main-navigation.disabled { - opacity: .1; + /*opacity: .1;*/ + } + .modal-holder { + top: 60px; } .modal-holder .modal-content { top: 20px; @@ -104,6 +110,43 @@ bottom: 20px; top: 40px; } + .modal-holder .modal-content, + .modal-holder .modal-content .container, + .modal-container { + background: transparent; + } + .modal-holder .modal-content .container { + -webkit-column-count: initial; + -moz-column-count: initial; + column-count: initial; + -webkit-column: initial; + -moz-column: initial; + column: initial; + } + .modal-container .container img { + margin-bottom: 40px; + } + #contact .container { + -webkit-column-count: initial; + -moz-column-count: initial; + column-count: initial; + -webkit-column: initial; + -moz-column: initial; + column: initial; + overflow: scroll; + height: 100vh; + max-height: 100vh; + display: block; + padding-top: 60px; + } + #contact .container > .data-block { + height: auto; + text-align: center; + margin-bottom: 40px; + } + #contact .container > .data-block h3 { + margin-bottom: 20px; + } } /* SMALL diff --git a/src/js/main.js b/src/js/main.js index 9c6006d..eef7609 100644 --- a/src/js/main.js +++ b/src/js/main.js @@ -395,7 +395,8 @@ $(document).on('ready', function () { function randomBackground ( callback ) { var randomBgIndex = randomInteger(0, backgrounds.length - 1), - bgLoaded = 0; + bgLoaded = 0, + localTimeout; if ( pagesState.randomBgIndex === randomBgIndex ) { @@ -414,18 +415,20 @@ $(document).on('ready', function () { if ( ++bgLoaded >= 2 || force === true ) { + clearTimeout( localTimeout ); + preloader.loaded(); bgLoaded = 0; if ( typeof callback === 'function' ) { - setTimeout(function () { + // setTimeout(function () { // TODO test without it // $window.trigger('resize'); - }, 10000); + // }, 10000); callback(); @@ -440,7 +443,7 @@ $(document).on('ready', function () { $background.find('img').attr('src', 'img/bg/' + backgrounds[randomBgIndex][1] + '.jpg').on('load', bgReady); // if ( $background.find('img') ) - setTimeout( function () { + localTimeout = setTimeout( function () { bgReady(true); @@ -608,6 +611,7 @@ $(document).on('ready', function () { middlindImage ($foreground.find('img'), $window, -60); middlindImage ($background.find('img'), $window, -60); bodyOverflow.unfixBody(); + modals.closeModal(); });