mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 02:56:41 +07:00
loader: error handling
This commit is contained in:
parent
71a0aed9aa
commit
1c014ec9fb
5 changed files with 102 additions and 12 deletions
|
@ -13,13 +13,55 @@
|
|||
<style>
|
||||
#loader {
|
||||
position: fixed;
|
||||
background: #576066;
|
||||
background: #ecf0ff;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 10;
|
||||
transition: opacity 1s;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #666666;
|
||||
font-family: sans-serif;
|
||||
font-size: 16px;
|
||||
flex-direction: column;
|
||||
font-weight: 500;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
|
||||
@keyframes blink {
|
||||
0% { opacity: 1; }
|
||||
100% { opacity: 1; }
|
||||
}
|
||||
|
||||
#loader-current {
|
||||
text-transform: uppercase;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
#loader-container {
|
||||
width: 240px;
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
#loader-progress {
|
||||
margin-top: 10px;
|
||||
width: 100%;
|
||||
height: 8px;
|
||||
background: rgba(0, 0, 0, 0.05);
|
||||
box-shadow: inset rgba(0,0,0,0.1) 0 0 0 1px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
#loader-bar {
|
||||
background: linear-gradient(90deg, #845b9e, #54faff);
|
||||
width: 10%;
|
||||
height: 100%;
|
||||
border-radius: 4px;
|
||||
transition: width 500ms;
|
||||
animation: blink 0.3s infinite alternate;
|
||||
}
|
||||
|
||||
body {
|
||||
|
@ -33,11 +75,36 @@
|
|||
left: 0;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
#loader-error {
|
||||
color: white;
|
||||
background: #ff3344;
|
||||
border-radius: 3px;
|
||||
padding: 5px 10px 10px 10px;
|
||||
margin-top: 20px;
|
||||
opacity: 0;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
#loader-error h4 {
|
||||
margin: 5px 0;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<canvas id="renderer"></canvas>
|
||||
<section id="map" style="position: absolute; width: 100%; height: 100%;"></section>
|
||||
<section id="loader"></section>
|
||||
<section id="loader">
|
||||
<div id="loader-container">
|
||||
<div id="loader-current">ЗАГРУЗКА</div>
|
||||
<div id="loader-progress">
|
||||
<div id="loader-bar"></div>
|
||||
</div>
|
||||
<div id="loader-error">
|
||||
<h4>Хранилище недоступно.</h4>
|
||||
Повторите попытку позже.
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section id="index"></section>
|
||||
</body>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue