fix mobile banner

This commit is contained in:
czmj 2017-09-22 13:44:13 +01:00
parent 3d6de6fd33
commit 396e7b4574
3 changed files with 185 additions and 176 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 487 KiB

After

Width:  |  Height:  |  Size: 146 KiB

View File

@ -81,21 +81,29 @@
if (skel.vars.IEVersion < 9) if (skel.vars.IEVersion < 9)
$header.removeClass('alt'); $header.removeClass('alt');
if ($banner.length > 0 if ($banner.length > 0 &&
&& $header.hasClass('alt')) { $header.hasClass('alt')) {
$window.on('resize', function() { $window.trigger('scroll'); }); $window.on('resize', function() {
$window.trigger('scroll');
});
$banner.scrollex({ $banner.scrollex({
bottom: $header.outerHeight() + 1, bottom: $header.outerHeight() + 1,
terminate: function() { $header.removeClass('alt'); }, terminate: function() {
enter: function() { $header.addClass('alt'); }, $header.removeClass('alt');
leave: function() { $header.removeClass('alt'); } },
enter: function() {
$header.addClass('alt');
},
leave: function() {
$header.removeClass('alt');
}
}); });
} }
/* particlesJS.load(@dom-id, @path-json, @callback (optional)); */ if ($( window ).width() > 980) {
particlesJS('banner', { particlesJS('banner', {
"particles": { "particles": {
"number": { "number": {
@ -197,7 +205,7 @@
"duration": 0.4 "duration": 0.4
}, },
"push": { "push": {
"particles_nb": 4 "particles_nb": 5
}, },
"remove": { "remove": {
"particles_nb": 2 "particles_nb": 2
@ -206,7 +214,6 @@
}, },
"retina_detect": false "retina_detect": false
}); });
}
}); });
})(jQuery); })(jQuery);

View File

@ -1761,7 +1761,7 @@ body.is-mobile {
#banner, #banner,
.wrapper.style4 { .wrapper.style4 {
@include vendor('background-image', ('linear-gradient(top, rgba(0,0,0,0.5), rgba(0,0,0,0.5))', 'url("../../assets/images/banner.jpg")')); @include vendor('background-image', 'url("../../assets/images/banner.jpg")');
background-position: center center; background-position: center center;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: cover; background-size: cover;
@ -1829,6 +1829,7 @@ body {
} }
.particle { .particle {
position: relative; position: relative;
user-select: none;
#particles-js { #particles-js {
vertical-align: bottom; vertical-align: bottom;
@ -1851,5 +1852,6 @@ body {
-webkit-transform: translate(-50%, -50%); -webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
z-index: 1; z-index: 1;
user-select: auto;
} }
} }