-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathloading-container.html
74 lines (60 loc) · 1.49 KB
/
loading-container.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<link rel="import" href="../polymer/polymer.html">
<dom-module id="loading-container">
<template>
<style>
:host {
--loading-time: 1.5s;
}
:host {
position: absolute;
display: flex;
justify-content: center;
align-items: center;
z-index: 10;
transition-delay: .5s;
transition: background var(--loading-time);
left: 0;
right: 0;
top: 0;
bottom: 0;
margin: 0 !important;
padding: 0 !important;
background: transparent;
pointer-events: none;
}
#spinner {
margin: auto;
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
}
.loading-text {
position: absolute;
left: 0;
right: 0;
text-align: center;
display: block;
top: calc(50% + 1em);
color: #3EA1E6;
opacity: 0;
transition: opacity var(--loading-time);
}
:host[loading] {
background: rgba(200, 206, 213, .5);
pointer-events: all;
opacity: 1;
}
</style>
<div id="loadingContainer">
<paper-spinner id="spinner"
active$="[[loading]]"></paper-spinner>
<span class="loading-text"
hidden$="[[!loading]]">
Отправка запроса на сервер
</span>
</div>
</template>
<script inline src="./loading-container.js"></script>
</dom-module>