load css
This commit is contained in:
parent
3dc57163f3
commit
54f816c7eb
2 changed files with 33 additions and 6 deletions
12
static/css/home.leftovers.css
Normal file
12
static/css/home.leftovers.css
Normal 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);}
|
||||
}
|
|
@ -27,7 +27,8 @@ pandora.ui.home = function() {
|
|||
bottom: '256px',
|
||||
width: window.innerWidth + 'px',
|
||||
margin: 'auto',
|
||||
cursor: 'pointer'
|
||||
cursor: 'pointer',
|
||||
animation: 'spin 7500ms linear infinite'
|
||||
})
|
||||
.on({
|
||||
click: function() {
|
||||
|
@ -215,7 +216,8 @@ pandora.ui.home = function() {
|
|||
opacity: 0,
|
||||
textAlign: 'center'
|
||||
})
|
||||
.appendTo(that);
|
||||
.appendTo(that),
|
||||
loadedCSS = false;
|
||||
|
||||
if (pandora.user.level == 'guest') {
|
||||
$signupButton.appendTo(that);
|
||||
|
@ -224,13 +226,26 @@ pandora.ui.home = function() {
|
|||
$preferencesButton.appendTo(that);
|
||||
}
|
||||
|
||||
function loadCSS(callback) {
|
||||
if (loadedCSS) {
|
||||
callback()
|
||||
} else {
|
||||
Ox.getFile('/static/css/home.leftovers.css', function() {
|
||||
loadedCSS = true
|
||||
callback()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
that.fadeInScreen = function() {
|
||||
loadCSS(function() {
|
||||
that.appendTo(Ox.$body).animate({opacity: 1}, 500, function() {
|
||||
that.find(':not(#logo)').animate({opacity: 1}, 250, function() {
|
||||
$findInput.focusInput(true);
|
||||
});
|
||||
});
|
||||
$logo.animate({width: '320px'}, 500);
|
||||
});
|
||||
return that;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue