This commit is contained in:
j 2019-12-01 16:00:24 +01:00
parent 3dc57163f3
commit 54f816c7eb
2 changed files with 33 additions and 6 deletions

View file

@ -0,0 +1,12 @@
@-moz-keyframes spin {
from { -moz-transform: rotate(0deg); }
to { -moz-transform: rotate(360deg); }
}
@-webkit-keyframes spin {
from { -webkit-transform: rotate(0deg); }
to { -webkit-transform: rotate(360deg); }
}
@keyframes spin {
from {transform:rotate(0deg);}
to {transform:rotate(360deg);}
}

View file

@ -27,7 +27,8 @@ pandora.ui.home = function() {
bottom: '256px', bottom: '256px',
width: window.innerWidth + 'px', width: window.innerWidth + 'px',
margin: 'auto', margin: 'auto',
cursor: 'pointer' cursor: 'pointer',
animation: 'spin 7500ms linear infinite'
}) })
.on({ .on({
click: function() { click: function() {
@ -215,7 +216,8 @@ pandora.ui.home = function() {
opacity: 0, opacity: 0,
textAlign: 'center' textAlign: 'center'
}) })
.appendTo(that); .appendTo(that),
loadedCSS = false;
if (pandora.user.level == 'guest') { if (pandora.user.level == 'guest') {
$signupButton.appendTo(that); $signupButton.appendTo(that);
@ -224,13 +226,26 @@ pandora.ui.home = function() {
$preferencesButton.appendTo(that); $preferencesButton.appendTo(that);
} }
function loadCSS(callback) {
if (loadedCSS) {
callback()
} else {
Ox.getFile('/static/css/home.leftovers.css', function() {
loadedCSS = true
callback()
})
}
}
that.fadeInScreen = function() { that.fadeInScreen = function() {
that.appendTo(Ox.$body).animate({opacity: 1}, 500, function() { loadCSS(function() {
that.find(':not(#logo)').animate({opacity: 1}, 250, function() { that.appendTo(Ox.$body).animate({opacity: 1}, 500, function() {
$findInput.focusInput(true); that.find(':not(#logo)').animate({opacity: 1}, 250, function() {
$findInput.focusInput(true);
});
}); });
$logo.animate({width: '320px'}, 500);
}); });
$logo.animate({width: '320px'}, 500);
return that; return that;
}; };