layout fixes

This commit is contained in:
Denys Konovalov 2023-02-09 12:29:38 +01:00
parent 047f1a2a10
commit 80040db869
4 changed files with 28 additions and 31 deletions

@ -1,33 +1,7 @@
(function ($) { (function ($) {
'use strict'; 'use strict';
// Preloader js function adaptHeight () {
$(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 () {
var height = $('.top-header').innerHeight(); var height = $('.top-header').innerHeight();
if ($('header').offset().top > 10) { if ($('header').offset().top > 10) {
$('.top-header').addClass('hide'); $('.top-header').addClass('hide');
@ -40,9 +14,25 @@
} }
$('.navigation').css('margin-top','-'+0+'px'); $('.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 // Background-media
$('[data-background]').each(function () { $('[data-background]').each(function () {
@ -60,8 +50,8 @@
infinite: true, infinite: true,
arrows: true, arrows: true,
fade: true, fade: true,
prevArrow: '<button type=\'button\' class=\'prevArrow\'><i class=\'mdi mdi-chevron-left\'></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\'></i></button>', nextArrow: '<button type=\'button\' class=\'nextArrow\'><i class=\'mdi mdi-chevron-right arrowIcon\'></i></button>',
dots: true dots: true
}); });
$('.hero-slider').slickAnimation(); $('.hero-slider').slickAnimation();

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

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

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