Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion packages/brick-container/src/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,22 @@
<div id="main-mount-point"></div>
<div id="legacy-iframe-mount-point"></div>
</div>
<div id="loading-bar-mount-point"><div class="global-loading-bar initial-loading-bar"><div></div></div></div>
<div id="loading-bar-mount-point">
<div class="global-loading-bar initial-loading-bar"><div></div></div>
<div class="initial-loading-screen" role="status" aria-live="polite">
<div class="initial-loading-content">
<span class="initial-loading-spinner" aria-hidden="true">
<i class="initial-loading-spinner-item"></i>
<i class="initial-loading-spinner-item"></i>
<i class="initial-loading-spinner-item"></i>
<i class="initial-loading-spinner-item"></i>
</span>
<span class="initial-loading-text" aria-label="Loading">
<span class="initial-loading-letter" aria-hidden="true">L</span><span class="initial-loading-letter" aria-hidden="true">o</span><span class="initial-loading-letter" aria-hidden="true">a</span><span class="initial-loading-letter" aria-hidden="true">d</span><span class="initial-loading-letter" aria-hidden="true">i</span><span class="initial-loading-letter" aria-hidden="true">n</span><span class="initial-loading-letter" aria-hidden="true">g</span>
</span>
</div>
</div>
</div>
</div>
<div id="bg-mount-point"></div>
<div id="portal-mount-point"></div>
Expand Down
141 changes: 141 additions & 0 deletions packages/brick-container/src/styles/default.css
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,114 @@ html[data-mode="dashboard"] body.has-sub-menu #main-mount-point {
display: none;
}

.initial-loading-screen {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 9999;
display: flex;
align-items: center;
justify-content: center;
background: #f5f7fa;
color: #595959;
font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.initial-loading-content {
display: flex;
flex-direction: column;
align-items: center;
}

.initial-loading-spinner {
position: relative;
display: inline-block;
width: 20px;
height: 20px;
font-size: 20px;
transform: rotate(45deg);
animation: initial-loading-spin 1.2s infinite linear;
}

.initial-loading-spinner-item {
position: absolute;
display: block;
width: 9px;
height: 9px;
background-color: #1890ff;
border-radius: 100%;
opacity: 0.3;
transform: scale(0.75);
transform-origin: 50% 50%;
animation: initial-loading-dot 1s infinite linear alternate;
}

.initial-loading-spinner-item:nth-child(1) {
top: 0;
left: 0;
}

.initial-loading-spinner-item:nth-child(2) {
top: 0;
right: 0;
animation-delay: 0.4s;
}

.initial-loading-spinner-item:nth-child(3) {
right: 0;
bottom: 0;
animation-delay: 0.8s;
}

.initial-loading-spinner-item:nth-child(4) {
bottom: 0;
left: 0;
animation-delay: 1.2s;
}

.initial-loading-text {
margin-top: 16px;
color: #1890ff;
}

.initial-loading-letter {
display: inline-block;
min-width: 0.55em;
text-align: center;
animation: initial-loading-letter-jump 1.4s ease-in-out infinite;
}

.initial-loading-letter:nth-child(2) {
animation-delay: 0.1s;
}

.initial-loading-letter:nth-child(3) {
animation-delay: 0.2s;
}

.initial-loading-letter:nth-child(4) {
animation-delay: 0.3s;
}

.initial-loading-letter:nth-child(5) {
animation-delay: 0.4s;
}

.initial-loading-letter:nth-child(6) {
animation-delay: 0.5s;
}

.initial-loading-letter:nth-child(7) {
animation-delay: 0.6s;
}

.first-rendered .initial-loading-screen,
.bootstrap-error .initial-loading-screen {
display: none;
}

@keyframes global-loading {
from {
transform: translateX(-30%) scaleX(0.3);
Expand All @@ -165,3 +273,36 @@ html[data-mode="dashboard"] body.has-sub-menu #main-mount-point {
transform: translateX(120%);
}
}

@keyframes initial-loading-spin {
to {
transform: rotate(405deg);
}
}

@keyframes initial-loading-dot {
to {
opacity: 1;
transform: scale(1);
}
}

@keyframes initial-loading-letter-jump {
0%,
40%,
100% {
transform: translateY(0);
}

20% {
transform: translateY(-5px);
}
}

@media (prefers-reduced-motion: reduce) {
.initial-loading-spinner,
.initial-loading-spinner-item,
.initial-loading-letter {
animation: none;
}
}
Loading