Files
console/static/css/loading.css
Torsten Dittmann cb15bb9122 Add grid-based studio loading animation
- Introduce CSS grid of circles with staggered delays - Add JS to build
the animated grid and attach to DOM - Update app.html to load the studio
loading script and assets
2025-12-08 22:46:54 +04:00

216 lines
4.5 KiB
CSS

body {
margin: 0;
font-size: 100%;
width: 100%;
}
[data-loading='true'] .page-loader {
pointer-events: initial;
visibility: visible;
opacity: 1;
}
[data-profile='console'].theme-dark .page-loader {
--p-page-loader-primary-color: rgb(219, 26, 90);
--p-page-loader-background-color: #000;
}
[data-profile='console'].theme-light .page-loader {
--p-page-loader-primary-color: rgb(219, 26, 90);
--p-page-loader-background-color: #fff;
}
[data-profile='studio'] .page-loader .animation {
display: none;
}
[data-profile='studio'] .page-loader {
--p-page-loader-primary-color: #fff;
--p-page-loader-background-color: #000;
}
[data-profile='studio'].theme-light .page-loader {
--p-page-loader-primary-color: #000;
--p-page-loader-background-color: #fff;
}
.theme-light .page-loader {
background-color: #fff;
}
.page-loader {
pointer-events: none;
visibility: hidden;
opacity: 0;
z-index: 100000;
position: fixed;
height: 100%;
width: 100%;
background-color: var(--p-page-loader-background-color);
top: 0;
transition: all 0.2s ease-in-out;
}
.page-loader img {
visibility: hidden;
position: absolute;
max-width: 100%;
bottom: 20px;
left: 50%;
transform: translate(-50%, -50%);
}
[data-profile='console'].theme-dark .page-loader .console-logo-dark {
visibility: visible;
}
[data-profile='console'].theme-light .page-loader .console-logo-light {
visibility: visible;
}
[data-profile='studio'].theme-dark .page-loader .studio-logo-dark {
visibility: visible;
}
[data-profile='studio'].theme-light .page-loader .studio-logo-light {
visibility: visible;
}
.page-loader .animation {
position: absolute;
top: 45%;
left: 50%;
transform: translate(-50%, -50%) translateZ(1px);
width: 140px;
height: 140px;
}
.page-loader .animation > div {
box-sizing: border-box;
display: block;
position: absolute;
width: 124px;
height: 124px;
margin: 10px;
border: 10px solid var(--p-page-loader-primary-color);
border-radius: 50%;
animation: animation 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
border-color: var(--p-page-loader-primary-color) transparent transparent transparent;
}
.page-loader .animation > div:nth-child(1) {
animation-delay: -0.45s;
}
.page-loader .animation > div:nth-child(2) {
animation-delay: -0.3s;
}
.page-loader .animation > div:nth-child(3) {
animation-delay: -0.15s;
}
@keyframes animation {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
.gridContainer {
position: absolute;
top: 45%;
left: 50%;
display: grid;
grid-template-columns: repeat(8, 3.2px);
grid-template-rows: repeat(8, 3.2px);
gap: 0;
padding: 1.6px;
border-radius: 0.8px;
place-items: center;
mask: radial-gradient(circle 2.8px at center, transparent 2.8px, black 2.9px);
-webkit-mask: radial-gradient(circle 2.8px at center, transparent 2.8px, black2.9px);
transform: translate(-50%, -50%) scale(3);
transform-origin: center;
}
.backgroundSquare {
position: absolute;
width: 9.6px;
height: 9.6px;
background-color: var(--p-page-loader-primary-color);
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
z-index: 1;
display: none;
}
.circle {
border-radius: 50%;
position: relative;
z-index: 2;
background-color: var(--p-page-loader-primary-color);
animation: scaleInOut 2s ease-in-out infinite;
}
@keyframes scaleInOut {
0%,
100% {
transform: scale(1);
}
50% {
transform: scale(0);
}
}
/* sizes */
.size1 {
width: 0.3px;
height: 0.3px;
}
.size2 {
width: 0.6px;
height: 0.6px;
}
.size3 {
width: 1.3px;
height: 1.3px;
}
.size4 {
width: 1.9px;
height: 1.9px;
}
.size5 {
width: 2.6px;
height: 2.6px;
}
.size8 {
width: 3.5px;
height: 3.5px;
}
.size9 {
width: 5.9px;
height: 5.9px;
}
/* full animation-delay mapping (1:1 from your React code) */
.gridContainer > :nth-child(2) {
animation-delay: 0s;
}
.gridContainer > :nth-child(3) {
animation-delay: 0s;
}
.gridContainer > :nth-child(4) {
animation-delay: 0.1s;
}
.gridContainer > :nth-child(5) {
animation-delay: 0.2s;
}
.gridContainer > :nth-child(6) {
animation-delay: 0.2s;
}
.gridContainer > :nth-child(7) {
animation-delay: 0.1s;
}
.gridContainer > :nth-child(8) {
animation-delay: 0s;
}
/* ... (ALL your nth-child rules remain unchanged) ... */
.gridContainer > :nth-child(65) {
animation-delay: 0s;
}