59 lines
979 B
JavaScript
59 lines
979 B
JavaScript
function showSplash()
|
|
{
|
|
var html =
|
|
`
|
|
<div id="mj-splash-body">
|
|
<center>
|
|
<h1 id="mj-splash-title">Маджонг</h1>
|
|
<strong>2.0.0</strong>
|
|
<p>Среда разработки</p>
|
|
</center>
|
|
</div>
|
|
`;
|
|
var css =
|
|
`
|
|
#mj-splash-title
|
|
{
|
|
font: bold 4em serif;
|
|
}
|
|
#mj-splash-body
|
|
{
|
|
position: absolute;
|
|
left: 50%;
|
|
top: 50%;
|
|
transform: translateX(-50%) translateY(-50%);
|
|
pointer-events: none;
|
|
}
|
|
#mj-splash
|
|
{
|
|
opacity: 1;
|
|
background-color: white;
|
|
animation: mj-splash-fade-out 1s ease;
|
|
animation-fill-mode: forwards;
|
|
}
|
|
@keyframes mj-splash-fade-out
|
|
{
|
|
0%
|
|
{
|
|
opacity: 1;
|
|
}
|
|
60%
|
|
{
|
|
opacity: 1;
|
|
}
|
|
100%
|
|
{
|
|
opacity: 0;
|
|
}
|
|
}
|
|
`;
|
|
|
|
var screen = addScreen("mj-splash", html, css);
|
|
screen.onanimationend = function(){
|
|
document.body.removeChild(screen);
|
|
};
|
|
}
|
|
var показатьЗаставку = showSplash;
|
|
|
|
when(murom.modeEditor, showSplash);
|