-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Dae Sanghwi
committed
Nov 23, 2024
1 parent
30678e1
commit 8a292b5
Showing
5 changed files
with
97 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
/* Loading Animation */ | ||
.loading-container { | ||
position: fixed; | ||
top: 0; | ||
left: 0; | ||
width: 100%; | ||
height: 100%; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
background-color: var(--surface-0); // Dark background | ||
z-index: var(--z-modal); | ||
opacity: 1; | ||
transition: opacity 0.3s ease-out; | ||
|
||
&.loaded { | ||
opacity: 0; | ||
pointer-events: none; | ||
} | ||
} | ||
|
||
.loading-spinner { | ||
width: 48px; | ||
height: 48px; | ||
position: relative; | ||
animation: loading-fade 1.2s ease-in-out infinite; | ||
|
||
&::before, | ||
&::after { | ||
content: ''; | ||
position: absolute; | ||
width: 100%; | ||
height: 100%; | ||
border-radius: 50%; | ||
animation: pulse 1.2s cubic-bezier(0.4, 0, 0.2, 1) infinite; | ||
} | ||
|
||
&::before { | ||
background: var(--accent-fuchsia); // Fuchsia color | ||
animation-delay: -0.3s; | ||
} | ||
|
||
&::after { | ||
background: var(--accent-purple); // Royal purple color | ||
animation-delay: -0.15s; | ||
} | ||
} | ||
|
||
@keyframes pulse { | ||
0%, 100% { | ||
transform: scale(0); | ||
opacity: 1; | ||
} | ||
50% { | ||
transform: scale(1); | ||
opacity: 0.3; | ||
} | ||
} | ||
|
||
@keyframes loading-fade { | ||
0%, 100% { | ||
opacity: 0.3; | ||
} | ||
50% { | ||
opacity: 1; | ||
} | ||
} | ||
|
||
// Hide loading container after 3 seconds max | ||
.loading-timeout { | ||
animation: hide-loading 0.3s ease-out 3s forwards; | ||
} | ||
|
||
@keyframes hide-loading { | ||
to { | ||
opacity: 0; | ||
visibility: hidden; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ | |
@import "theme"; | ||
@import "base"; | ||
@import "navigation"; | ||
@import "loading"; | ||
|
||
// Reset | ||
*, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// Loading Screen Handler | ||
document.addEventListener('DOMContentLoaded', () => { | ||
const loadingScreen = document.getElementById('loading-screen'); | ||
|
||
// Add loaded class to trigger fade out | ||
if (loadingScreen) { | ||
loadingScreen.classList.add('loaded'); | ||
|
||
// Remove from DOM after animation | ||
loadingScreen.addEventListener('transitionend', () => { | ||
loadingScreen.remove(); | ||
}); | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters