preload improve

pull/3365/head
Daniel 2021-01-28 01:05:47 +05:30
parent d7269cf1a9
commit 36f82d7335
3 changed files with 36 additions and 26 deletions

View File

@ -39,6 +39,7 @@ const Default = {
scrollbarAutoHide: 'l',
panelAutoHeight: true,
panelAutoHeightMode: 'min-height',
preloadDuration: 200,
loginRegisterAutoHeight: true
}
@ -174,13 +175,16 @@ class Layout {
setTimeout(() => {
$('body.hold-transition').removeClass('hold-transition')
}, 50)
const $preloader = $(SELECTOR_PRELOADER)
if ($preloader) {
$preloader.css('height', 0)
setTimeout(() => {
$preloader.children().hide()
}, 200)
}
setTimeout(() => {
const $preloader = $(SELECTOR_PRELOADER)
if ($preloader) {
$preloader.css('height', 0)
setTimeout(() => {
$preloader.children().hide()
}, 200)
}
}, this._config.preloadDuration)
}
_max(numbers) {

View File

@ -12,20 +12,6 @@ body,
min-height: 100%;
}
.preloader {
display: flex;
align-items: center;
justify-content: center;
background-color: $main-bg;
height: 100vh;
width: 100%;
transition: height 200ms linear;
position: fixed;
left: 0;
top: 0;
z-index: $zindex-preloader;
}
.wrapper {
position: relative;
@ -662,7 +648,7 @@ body:not(.layout-fixed) {
}
.dark-mode {
background-color: lighten($dark, 7.5%) !important;
background-color: $dark-main-bg;
color: $white;
.breadcrumb-item {
@ -683,8 +669,4 @@ body:not(.layout-fixed) {
color: $white;
}
}
.preloader {
background-color: $dark;
color: $white;
}
}

View File

@ -0,0 +1,24 @@
//
// Core: Preloader
//
.preloader {
display: flex;
background-color: $main-bg;
height: 100vh;
width: 100%;
transition: height 200ms linear;
position: fixed;
left: 0;
top: 0;
z-index: $zindex-preloader;
}
.dark-mode {
.preloader {
background-color: $dark-main-bg;
color: $white;
}
}
//