|
46 | 46 | </script> |
47 | 47 |
|
48 | 48 | {#if song} |
49 | | - <div class="song" style="--url: url({getImageUrl(song.thumbnail_path)});"> |
| 49 | + <!-- <div class="song" style="--url: url({getImageUrl(song.thumbnail_path)});"> |
50 | 50 | <div class="blur"></div> |
51 | | - <div class="row align-items-center mt-3 content"> |
| 51 | + <div class="row align-items-center content"> |
52 | 52 | <div class="col-2"> |
53 | 53 | <button on:click={() => playOrPauseSong(song.id)} style="background-color: transparent; border: none; color: #1db954;"> |
54 | 54 | {#if $currentSong && $currentSong.id === song.id && $isPlaying} |
|
69 | 69 | </button> |
70 | 70 | </div> |
71 | 71 | </div> |
| 72 | + </div> --> |
| 73 | + |
| 74 | + <div class="row song m-1 rounded rounded-1" style="--url: url({getImageUrl(song.thumbnail_path)});"> |
| 75 | + <div class="col-12 blur"> |
| 76 | + </div> |
| 77 | + <div class="col-12"> |
| 78 | + <!-- svelte-ignore a11y_click_events_have_key_events --> |
| 79 | + <!-- svelte-ignore a11y_no_static_element_interactions --> |
| 80 | + <div class="row content" aria-label="bsd" aria-roledescription="action" type="button" on:click={() => playOrPauseSong(song.id)} style="cursor: pointer; align-items: center; padding: 10px;"> |
| 81 | + <div class="col-10"> |
| 82 | + <div class="title {($currentSong && $currentSong.id === song.id && $isPlaying) ? "iamcute" : ""}">{song.name}</div> |
| 83 | + </div> |
| 84 | + <div class="col-2"> |
| 85 | + <button on:click={deleteSong} class="text-center" aria-label="settings" style="background-color: transparent; border: none; font-size: 1rem;"> |
| 86 | + <i class="fa-solid fa-trash text-danger"></i> |
| 87 | + </button> |
| 88 | + </div> |
| 89 | + </div> |
| 90 | + </div> |
72 | 91 | </div> |
73 | 92 | {:else} |
74 | 93 | <p>No song available.</p> |
|
79 | 98 | position: relative; |
80 | 99 | background: #2c2c2c; |
81 | 100 | border-radius: 10px; |
82 | | - padding: 0px 10px; |
83 | 101 | margin-bottom: 10px; |
84 | 102 | min-height: 80px; |
85 | | - box-shadow: 0 4px 12px rgba(90, 89, 89, 0.4); |
86 | 103 | background-image: var(--url); |
87 | 104 | background-size: cover; |
88 | 105 | background-position: center; |
89 | 106 | overflow: hidden; |
90 | 107 | transition: transform 0.2s ease; |
| 108 | + border-radius: 2px; |
| 109 | + margin: auto; |
91 | 110 | } |
92 | 111 |
|
93 | 112 | .song:hover { |
94 | 113 | transform: translateY(-3px); |
95 | 114 | } |
96 | 115 |
|
97 | | - .song-info { |
| 116 | + /* .song-info { |
98 | 117 | flex: 1; |
99 | 118 | margin: 0 12px; |
100 | 119 | display: flex; |
|
105 | 124 | -webkit-box-orient: vertical; |
106 | 125 | overflow: hidden; |
107 | 126 | text-overflow: ellipsis; |
108 | | - } |
| 127 | + } */ |
109 | 128 | .title { |
110 | | - color: #ffffff; |
111 | | - font-weight: bold; |
112 | | - font-size: 0.5rem; |
113 | | - margin: 5px; |
| 129 | + color: #b3b3b3; |
| 130 | + font-size: 0.7rem; |
| 131 | + margin-top: 5px; |
114 | 132 | display: -webkit-box; |
115 | | - -webkit-line-clamp: 2; |
116 | | - line-clamp: 2; |
| 133 | + -webkit-line-clamp: 3; |
| 134 | + line-clamp: 3; |
117 | 135 | -webkit-box-orient: vertical; |
118 | 136 | overflow: hidden; |
119 | 137 | text-overflow: ellipsis; |
|
122 | 140 | .blur { |
123 | 141 | position: absolute; |
124 | 142 | inset: 0; |
125 | | - background-color: rgba(0, 0, 0, 0.6); |
126 | | - backdrop-filter: blur(5px); |
| 143 | + background-color: #2c2c2c76; |
| 144 | + backdrop-filter: blur(10px); |
127 | 145 | z-index: 1; |
128 | | - border-radius: 5px; |
| 146 | + /* border-radius: 5px; */ |
129 | 147 | } |
130 | 148 |
|
131 | 149 | /* Keep content visible above blur */ |
132 | 150 | .content { |
133 | 151 | position: relative; |
134 | 152 | z-index: 2; |
135 | 153 | } |
| 154 | +
|
| 155 | +@keyframes lights { |
| 156 | + 0% { |
| 157 | + color: #1DB954; |
| 158 | + text-shadow: |
| 159 | + 0 0 0.35em hsla(140, 80%, 50%, 0.25), |
| 160 | + 0 0 0.1em hsla(140, 80%, 60%, 0.2); |
| 161 | + } |
| 162 | + |
| 163 | + 30% { |
| 164 | + color: #1db954b5; |
| 165 | + text-shadow: |
| 166 | + 0 0 0.45em hsla(140, 80%, 50%, 0.35), |
| 167 | + 0 0 0.15em hsla(140, 80%, 60%, 0.25), |
| 168 | + -0.15em -0.05em 0.15em hsla(60, 90%, 60%, 0.15), |
| 169 | + 0.15em 0.05em 0.15em hsla(200, 100%, 60%, 0.2); |
| 170 | + } |
| 171 | + |
| 172 | + 40% { |
| 173 | + color: #1db9549d; |
| 174 | + text-shadow: |
| 175 | + 0 0 0.4em hsla(140, 80%, 50%, 0.3), |
| 176 | + 0 0 0.12em hsla(140, 80%, 80%, 0.25), |
| 177 | + -0.1em -0.05em 0.1em hsla(60, 90%, 60%, 0.12), |
| 178 | + 0.1em 0.05em 0.1em hsla(200, 100%, 60%, 0.15); |
| 179 | + } |
| 180 | + |
| 181 | + 70% { |
| 182 | + color: #1db95464; |
| 183 | + text-shadow: |
| 184 | + 0 0 0.35em hsla(140, 80%, 50%, 0.25), |
| 185 | + 0 0 0.1em hsla(140, 80%, 60%, 0.2), |
| 186 | + 0.15em -0.05em 0.12em hsla(60, 90%, 60%, 0.12), |
| 187 | + -0.15em 0.05em 0.12em hsla(200, 100%, 60%, 0.18); |
| 188 | + } |
| 189 | + |
| 190 | + 100% { |
| 191 | + color: #1DB954; |
| 192 | + text-shadow: |
| 193 | + 0 0 0.35em hsla(140, 80%, 50%, 0.25), |
| 194 | + 0 0 0.1em hsla(140, 80%, 60%, 0.2); |
| 195 | + } |
| 196 | +} |
| 197 | +
|
| 198 | +/* body { |
| 199 | + margin: 0; |
| 200 | + font: 100% / 1.5 Raleway, sans-serif; |
| 201 | + color: hsl(230, 100%, 95%); |
| 202 | + background: linear-gradient(135deg, hsl(230, 40%, 12%), hsl(230, 20%, 7%)); |
| 203 | + height: 100vh; |
| 204 | + display: flex; |
| 205 | +} */ |
| 206 | +
|
| 207 | +.iamcute { |
| 208 | + /* margin: auto; |
| 209 | + font-size: 3.5rem; |
| 210 | + font-weight: 300; */ |
| 211 | + animation: lights 2s 500ms linear infinite; |
| 212 | +} |
136 | 213 | </style> |
0 commit comments