From 2214be344fa7dd0a7134fc11bcb4c11c0e35447e Mon Sep 17 00:00:00 2001 From: Denys Konovalov Date: Thu, 9 Feb 2023 12:29:38 +0100 Subject: [PATCH] layout fixes --- assets/js/script.js | 50 ++++++++++++------------------ assets/scss/_typography.scss | 2 +- assets/scss/templates/_slider.scss | 4 +++ layouts/partials/header.html | 3 ++ 4 files changed, 28 insertions(+), 31 deletions(-) diff --git a/assets/js/script.js b/assets/js/script.js index 6cf71f99..718c2268 100644 --- a/assets/js/script.js +++ b/assets/js/script.js @@ -1,33 +1,7 @@ (function ($) { 'use strict'; - // Preloader js - $(window).on('load', function () { - $('.preloader').fadeOut(100); - if ($('header').offset().top > 10) { - $('.top-header').addClass('hide'); - $('.navigation').addClass('nav-bg'); - $('.navigation').css('margin-top','-'+height+'px'); - } else { - $('.top-header').removeClass('hide'); - if (!$('#top-banner').length) { - $('.navigation').removeClass('nav-bg'); - } - $('.navigation').css('margin-top','-'+0+'px'); - } - if ($('#top-banner').length) { - $('.navigation').addClass('nav-bg'); - $('.hero-section').addClass('hs-banner'); - $('.page-title-section').addClass('pts-banner'); - } else { - $('.navigation').removeClass('nav-bg'); - $('.hero-section').removeClass('hs-banner'); - $('.page-title-section').removeClass('pts-banner'); - } - }); - - // Sticky Menu - $(window).scroll(function () { + function adaptHeight () { var height = $('.top-header').innerHeight(); if ($('header').offset().top > 10) { $('.top-header').addClass('hide'); @@ -40,9 +14,25 @@ } $('.navigation').css('margin-top','-'+0+'px'); } + } + + // Preloader js + $(window).on('load', function () { + $('.preloader').fadeOut(100); + adaptHeight(); + if ($('#top-banner').length) { + $('.navigation').addClass('nav-bg'); + $('.hero-section').addClass('hs-banner'); + $('.page-title-section').addClass('pts-banner'); + } else { + $('.navigation').removeClass('nav-bg'); + $('.hero-section').removeClass('hs-banner'); + $('.page-title-section').removeClass('pts-banner'); + } }); - + // Sticky Menu + $(window).scroll(adaptHeight); // Background-media $('[data-background]').each(function () { @@ -60,8 +50,8 @@ infinite: true, arrows: true, fade: true, - prevArrow: '', - nextArrow: '', + prevArrow: '', + nextArrow: '', dots: true }); $('.hero-slider').slickAnimation(); diff --git a/assets/scss/_typography.scss b/assets/scss/_typography.scss index 242a7e7c..a8c8f106 100644 --- a/assets/scss/_typography.scss +++ b/assets/scss/_typography.scss @@ -31,7 +31,7 @@ h1, .h1{ } h2, .h2{ - font-size: 40px; + font-size: 35px; @include mobile { font-size: 30px; } diff --git a/assets/scss/templates/_slider.scss b/assets/scss/templates/_slider.scss index 3b7dbcac..666550a4 100644 --- a/assets/scss/templates/_slider.scss +++ b/assets/scss/templates/_slider.scss @@ -37,6 +37,10 @@ right: 0; } + .arrowIcon { + font-size: 40px; + } + .slick-dots { position: absolute; left: 0; diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 91fe477b..0df24cb5 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -51,6 +51,9 @@