Use CSS to remove the loading screen

pull/1/head
yflory 7 years ago
parent a26031c119
commit fa6106a6bb

@ -7,6 +7,9 @@ The CSS inside of loading.js is precompiled in order to save 200ish milliseconds
@import (once) "./include/browser.less";
#cp-loading {
transition: opacity 0.75s, visibility 0s 0.75s;
visibility: visible;
opacity: 1;
position: fixed;
z-index: 10000000; // #loading
top: 0px;
@ -37,6 +40,10 @@ The CSS inside of loading.js is precompiled in order to save 200ish milliseconds
height: 100px;
}
}
&.cp-loading-hidden {
opacity: 0;
visibility: hidden;
}
}
#cp-loading-tip {
position: fixed;

@ -434,7 +434,8 @@ define([
var hideLogo = config.hideLogo;
var $loading, $container;
if ($('#' + LOADING).length) {
$loading = $('#' + LOADING).show();
$loading = $('#' + LOADING); //.show();
$loading.removeClass('cp-loading-hidden');
if (loadingText) {
$('#' + LOADING).find('p').text(loadingText);
}
@ -465,7 +466,8 @@ define([
// This test is created in sframe-boot2.js
if (Test.__ASYNC_BLOCKER__) { Test.__ASYNC_BLOCKER__.pass(); }
$('#' + LOADING).fadeOut(750, cb);
$('#' + LOADING).addClass("cp-loading-hidden");
//$('#' + LOADING).fadeOut(750, cb);
var $tip = $('#cp-loading-tip').css('top', '')
// loading.less sets transition-delay: $wait-time
// and transition: opacity $fadeout-time

@ -1,6 +1,8 @@
define([], function () {
var loadingStyle = (function(){/*
#cp-loading {
transition: opacity 0.75s, visibility 0s 0.75s;
visibility: visible;
position: fixed;
z-index: 10000000;
top: 0px;
@ -11,6 +13,11 @@ define([], function () {
color: #fafafa;
text-align: center;
font-size: 1.5em;
opacity: 1;
}
#cp-loading.cp-loading-hidden {
opacity: 0;
visibility: hidden;
}
#cp-loading .cp-loading-container {
margin-top: 50vh;

Loading…
Cancel
Save