layout fixes

This commit is contained in:
Denys Konovalov 2023-02-09 12:29:38 +01:00
parent 5a84bf3dcf
commit 2214be344f
4 changed files with 28 additions and 31 deletions

@ -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: '<button type=\'button\' class=\'prevArrow\'><i class=\'mdi mdi-chevron-left\'></i></button>',
nextArrow: '<button type=\'button\' class=\'nextArrow\'><i class=\'mdi mdi-chevron-right\'></i></button>',
prevArrow: '<button type=\'button\' class=\'prevArrow\'><i class=\'mdi mdi-chevron-left arrowIcon\'></i></button>',
nextArrow: '<button type=\'button\' class=\'nextArrow\'><i class=\'mdi mdi-chevron-right arrowIcon\'></i></button>',
dots: true
});
$('.hero-slider').slickAnimation();

@ -31,7 +31,7 @@ h1, .h1{
}
h2, .h2{
font-size: 40px;
font-size: 35px;
@include mobile {
font-size: 30px;
}

@ -37,6 +37,10 @@
right: 0;
}
.arrowIcon {
font-size: 40px;
}
.slick-dots {
position: absolute;
left: 0;

@ -51,6 +51,9 @@
<div class="dropdown-menu">
{{ range .Children }}
<a class="dropdown-item text-uppercase" href="{{ .URL | absLangURL }}" target="{{ if .Params.External }}_blank{{ else }}_self{{end}}">{{ .Name }}</a>
{{ if .Params.separator }}
<hr>
{{ end }}
{{ end }}
</div>
</li>