-
Notifications
You must be signed in to change notification settings - Fork 0
[feat] add a new skeleton loading screen for playlist to replace the s… #11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
63c9a2d
feat: add a new skeleton loading screen for playlist to replace the s…
CupOfMakiato 145cddb
feat: adding properties view for each media
CupOfMakiato acac316
ref: a lot of stuff, adding a custom cursor for better visual, perfor…
CupOfMakiato 48c1e4d
ref: add two files for caching image and duration
CupOfMakiato 6b13a77
ref: refactor the playlist.js for cleaner code
CupOfMakiato 77d0585
feat: add loop per for a track
CupOfMakiato 7813713
feat: adding deleting local library data
CupOfMakiato File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,341 @@ | ||
| /* Skeleton screen styles */ | ||
| :root { | ||
| --skeleton-bg: #e6eef8; | ||
| --skeleton-highlight: #f5f7fb; | ||
| --skeleton-overlay-bg: rgba(255, 255, 255, 0.85); | ||
| } | ||
|
|
||
| #loadingOverlay { | ||
| position: fixed; | ||
| top: 0; | ||
| left: 0; | ||
|
|
||
| width: 100%; | ||
| height: 100%; | ||
|
|
||
| background: var(--skeleton-overlay-bg); | ||
|
|
||
| display: flex; | ||
| justify-content: center; | ||
| align-items: flex-start; | ||
| padding: 40px 16px; | ||
| box-sizing: border-box; | ||
|
|
||
| z-index: 9999; | ||
|
|
||
| transition: opacity 0.3s ease; | ||
| display: none; | ||
| } | ||
|
|
||
| .skeleton-container { | ||
| width: 100%; | ||
| max-width: 1100px; | ||
| display: flex; | ||
| flex-direction: column; | ||
| gap: 12px; | ||
| } | ||
|
|
||
| .skeleton-item { | ||
| display: flex; | ||
| align-items: center; | ||
| gap: 12px; | ||
| padding: 12px; | ||
| border-radius: 6px; | ||
| } | ||
|
|
||
| .skeleton-row { | ||
| align-items: center; | ||
| } | ||
|
|
||
| .skeleton-thumb { | ||
| width: 56px; | ||
| height: 56px; | ||
| border-radius: 6px; | ||
| background: var(--skeleton-bg); | ||
| flex: 0 0 auto; | ||
| } | ||
|
|
||
| .skeleton-lines { | ||
| flex: 1; | ||
| display: flex; | ||
| flex-direction: column; | ||
| gap: 8px; | ||
| } | ||
|
|
||
| .skeleton-line { | ||
| height: 12px; | ||
| border-radius: 4px; | ||
| background: var(--skeleton-bg); | ||
| width: 100%; | ||
| max-width: 80%; | ||
| } | ||
|
|
||
| .skeleton-line-short { | ||
| max-width: 45%; | ||
| } | ||
| .skeleton-line-long { | ||
| max-width: 100%; | ||
| } | ||
|
|
||
| .skeleton-duration { | ||
| width: 48px; | ||
| height: 12px; | ||
| background: var(--skeleton-bg); | ||
| border-radius: 4px; | ||
| flex: 0 0 auto; | ||
| } | ||
|
|
||
| .skeleton-box { | ||
| width: 100%; | ||
| height: 140px; | ||
| border-radius: 8px; | ||
| background: var(--skeleton-bg); | ||
| } | ||
|
|
||
| .skeleton-block { | ||
| background: linear-gradient( | ||
| 90deg, | ||
| var(--skeleton-bg) 25%, | ||
| var(--skeleton-highlight) 50%, | ||
| var(--skeleton-bg) 75% | ||
| ); | ||
| background-size: 200% 100%; | ||
| animation: skeleton-shimmer 1.2s linear infinite; | ||
| } | ||
|
|
||
| @keyframes skeleton-shimmer { | ||
| 0% { | ||
| background-position: -200% 0; | ||
| } | ||
| 100% { | ||
| background-position: 200% 0; | ||
| } | ||
| } | ||
|
|
||
| .fade-out { | ||
| opacity: 0; | ||
| transition: opacity 300ms ease; | ||
| } | ||
|
|
||
| .visually-hidden { | ||
| position: absolute !important; | ||
| width: 1px !important; | ||
| height: 1px !important; | ||
| padding: 0 !important; | ||
| margin: -1px !important; | ||
| overflow: hidden !important; | ||
| clip: rect(0, 0, 0, 0) !important; | ||
| white-space: nowrap !important; | ||
| border: 0 !important; | ||
| } | ||
|
|
||
| @media (prefers-reduced-motion: reduce) { | ||
| .skeleton-block { | ||
| animation: none; | ||
| } | ||
| } | ||
|
|
||
| /* Playlist (table-like) skeleton */ | ||
| .skeleton-table { | ||
| width: 100%; | ||
| display: flex; | ||
| flex-direction: column; | ||
| gap: 0; | ||
| } | ||
|
|
||
| .skeleton-table-row { | ||
| display: grid; | ||
| grid-template-columns: 56px 1fr 160px 160px 120px 80px 48px; | ||
| align-items: center; | ||
| gap: 8px; | ||
| height: 60px; | ||
| padding: 0 5px; | ||
| border-bottom: 1px solid #edf1f5; | ||
| box-sizing: border-box; | ||
| } | ||
|
|
||
| .skeleton-cell { | ||
| display: flex; | ||
| align-items: center; | ||
| } | ||
|
|
||
| .skeleton-col-index .skeleton-line { | ||
| width: 28px; | ||
| height: 12px; | ||
| } | ||
|
|
||
| .skeleton-col-title { | ||
| display: flex; | ||
| align-items: center; | ||
| gap: 10px; | ||
| min-width: 0; | ||
| } | ||
| .skeleton-track-cover { | ||
| width: 38px; | ||
| height: 38px; | ||
| border-radius: 8px; | ||
| background: var(--skeleton-bg); | ||
| flex-shrink: 0; | ||
| } | ||
| .skeleton-track-lines { | ||
| flex: 1; | ||
| display: flex; | ||
| flex-direction: column; | ||
| gap: 6px; | ||
| } | ||
| .skeleton-track-lines .skeleton-line:nth-child(1) { | ||
| width: 60%; | ||
| height: 12px; | ||
| } | ||
| .skeleton-track-lines .skeleton-line:nth-child(2) { | ||
| width: 40%; | ||
| height: 10px; | ||
| } | ||
|
|
||
| .skeleton-col-artist .skeleton-line, | ||
| .skeleton-col-album .skeleton-line { | ||
| width: 100%; | ||
| max-width: 160px; | ||
| } | ||
| .skeleton-col-date .skeleton-line { | ||
| width: 100%; | ||
| max-width: 120px; | ||
| } | ||
| .skeleton-col-duration .skeleton-line { | ||
| width: 48px; | ||
| } | ||
| .skeleton-col-actions .skeleton-line { | ||
| width: 28px; | ||
| height: 28px; | ||
| border-radius: 6px; | ||
| } | ||
|
|
||
| /* Header / banner skeleton to mirror playlist header */ | ||
| .skeleton-header-card { | ||
| width: 100%; | ||
| border: 1px solid #d8dee8; | ||
| border-radius: 12px; | ||
| overflow: hidden; | ||
| background: #ffffff; | ||
| box-sizing: border-box; | ||
| } | ||
|
|
||
| .skeleton-banner { | ||
| width: 100%; | ||
| height: 120px; | ||
| } | ||
|
|
||
| .skeleton-header-body { | ||
| display: grid; | ||
| grid-template-columns: 140px 1fr; | ||
| gap: 14px; | ||
| padding: 14px; | ||
| box-sizing: border-box; | ||
| } | ||
|
|
||
| .skeleton-header-image { | ||
| width: 140px; | ||
| height: 140px; | ||
| border-radius: 10px; | ||
| background: var(--skeleton-bg); | ||
| } | ||
|
|
||
| .skeleton-meta { | ||
| display: flex; | ||
| flex-direction: column; | ||
| gap: 6px; | ||
| justify-content: center; | ||
| } | ||
|
|
||
| .skeleton-meta .skeleton-line:nth-child(1) { | ||
| width: 90px; | ||
| height: 12px; | ||
| } | ||
| .skeleton-meta .skeleton-line:nth-child(2) { | ||
| width: 60%; | ||
| height: 20px; | ||
| } | ||
| .skeleton-meta .skeleton-line:nth-child(3) { | ||
| width: 45%; | ||
| height: 12px; | ||
| } | ||
|
|
||
| .skeleton-controls { | ||
| margin-top: 12px; | ||
| display: flex; | ||
| gap: 8px; | ||
| align-items: center; | ||
| } | ||
|
|
||
| .skeleton-control-play { | ||
| width: 40px; | ||
| height: 40px; | ||
| border-radius: 6px; | ||
| } | ||
| .skeleton-control-small { | ||
| width: 34px; | ||
| height: 34px; | ||
| border-radius: 6px; | ||
| } | ||
|
|
||
| .skeleton-track-section { | ||
| margin-top: 14px; | ||
| border: 1px solid #d8dee8; | ||
| border-radius: 10px; | ||
| background: #fff; | ||
| overflow: visible; | ||
| padding: 0; | ||
| } | ||
|
|
||
| @media (max-width: 780px) { | ||
| .skeleton-header-body { | ||
| grid-template-columns: 1fr; | ||
| } | ||
| .skeleton-header-image { | ||
| width: 100%; | ||
| max-width: 180px; | ||
| height: 180px; | ||
| } | ||
| } | ||
|
|
||
| /* Grid and player variants */ | ||
| .skeleton-container.skeleton-grid { | ||
| display: grid; | ||
| grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); | ||
| gap: 12px; | ||
| align-items: start; | ||
| } | ||
|
|
||
| .skeleton-item.skeleton-tile { | ||
| display: flex; | ||
| flex-direction: column; | ||
| gap: 8px; | ||
| padding: 8px; | ||
| border-radius: 6px; | ||
| } | ||
|
|
||
| .skeleton-item.skeleton-tile .skeleton-box { | ||
| height: 120px; | ||
| } | ||
|
|
||
| .skeleton-container.skeleton-player { | ||
| display: flex; | ||
| flex-direction: column; | ||
| align-items: center; | ||
| justify-content: center; | ||
| gap: 16px; | ||
| } | ||
|
|
||
| .skeleton-item.skeleton-player-row { | ||
| display: flex; | ||
| gap: 20px; | ||
| align-items: center; | ||
| justify-content: center; | ||
| } | ||
|
|
||
| .skeleton-player-art { | ||
| width: 220px; | ||
| height: 220px; | ||
| border-radius: 8px; | ||
| background: var(--skeleton-bg); | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.