|
84 | 84 | } |
85 | 85 |
|
86 | 86 | #pauseResumeButton { |
87 | | - width: 60vmin; |
88 | | - height: 60vmin; |
89 | | - font-size: 30vmin; |
90 | | - padding-bottom: 4vmin; |
| 87 | + width: min(60vmin, 300px); /* Cap the max size on desktop */ |
| 88 | + height: min(60vmin, 300px); |
91 | 89 | border: none; |
92 | 90 | border-radius: 50%; |
93 | | - background: linear-gradient(145deg, #1DB954, #169c45); |
94 | | - color: white; |
| 91 | + background: linear-gradient(145deg, #2FE075, #1DB954); |
95 | 92 | cursor: pointer; |
96 | | - transition: all 0.3s ease; |
97 | | - box-shadow: 0 10px 20px rgba(29, 185, 84, 0.3); |
| 93 | + position: relative; |
98 | 94 | display: flex; |
99 | 95 | justify-content: center; |
100 | 96 | align-items: center; |
101 | | - font-weight: 900; |
102 | | - text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3), 0 8px 16px rgba(0, 0, 0, 0.2); |
| 97 | + transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1); |
| 98 | + box-shadow: |
| 99 | + 0 2rem 4rem rgba(29, 185, 84, 0.2), |
| 100 | + 0 1rem 2rem rgba(0, 0, 0, 0.1), |
| 101 | + inset 0 -2px 0 rgba(0, 0, 0, 0.1), |
| 102 | + inset 0 2px 0 rgba(255, 255, 255, 0.2); |
| 103 | + overflow: hidden; |
| 104 | + } |
| 105 | + |
| 106 | + #pauseResumeButton::before { |
| 107 | + content: ''; |
| 108 | + position: absolute; |
| 109 | + top: 0; |
| 110 | + left: 0; |
| 111 | + right: 0; |
| 112 | + bottom: 0; |
| 113 | + border-radius: 50%; |
| 114 | + background: linear-gradient(145deg, rgba(255, 255, 255, 0.2), transparent); |
| 115 | + opacity: 0; |
| 116 | + transition: opacity 0.3s ease; |
103 | 117 | } |
104 | 118 |
|
105 | 119 | #pauseResumeButton:hover { |
106 | | - transform: scale(1.02); |
107 | | - box-shadow: 0 15px 30px rgba(29, 185, 84, 0.4); |
| 120 | + transform: translateY(-4px); |
| 121 | + background: linear-gradient(145deg, #34F07E, #1FCC5E); |
| 122 | + box-shadow: |
| 123 | + 0 3rem 5rem rgba(29, 185, 84, 0.25), |
| 124 | + 0 1.5rem 3rem rgba(0, 0, 0, 0.15), |
| 125 | + inset 0 -2px 0 rgba(0, 0, 0, 0.1), |
| 126 | + inset 0 2px 0 rgba(255, 255, 255, 0.2); |
| 127 | + } |
| 128 | + |
| 129 | + #pauseResumeButton:hover::before { |
| 130 | + opacity: 1; |
108 | 131 | } |
109 | 132 |
|
110 | 133 | #pauseResumeButton:active { |
111 | | - transform: scale(0.98); |
112 | | - box-shadow: 0 5px 15px rgba(29, 185, 84, 0.2); |
| 134 | + transform: translateY(2px); |
| 135 | + background: linear-gradient(145deg, #1DB954, #1AA54C); |
| 136 | + box-shadow: |
| 137 | + 0 1rem 2rem rgba(29, 185, 84, 0.15), |
| 138 | + 0 0.5rem 1rem rgba(0, 0, 0, 0.1), |
| 139 | + inset 0 -1px 0 rgba(0, 0, 0, 0.1), |
| 140 | + inset 0 1px 0 rgba(255, 255, 255, 0.1); |
113 | 141 | } |
114 | 142 |
|
115 | | - #pauseResumeButton .play { |
116 | | - padding-left: 4vmin; |
| 143 | + #pauseResumeButton svg { |
| 144 | + filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2)); |
117 | 145 | } |
118 | 146 |
|
119 | 147 | #player { |
|
199 | 227 |
|
200 | 228 | <div id="player" class="hidden"> |
201 | 229 | <div class="button-container"> |
202 | | - <button id="pauseResumeButton"><span class="pause">||</span></button> |
| 230 | + <button id="pauseResumeButton"><span class="play">▷</span></button> |
203 | 231 | <a href="https://www.gptgames.dev/tools/spotify_qr_scanner" class="scan-button"> |
204 | 232 | Scan for next song |
205 | 233 | </a> |
@@ -256,7 +284,23 @@ <h2 class="text-xl font-bold mb-4">Create QR Codes from Playlist</h2> |
256 | 284 | playerInstance.resume(); |
257 | 285 | } |
258 | 286 | isPlaying = !isPlaying; |
259 | | - pauseResumeButton.innerHTML = isPlaying ? '<span class="pause">||</span>' : '<span class="play">▷</span>'; |
| 287 | + updateButtonIcon(); |
| 288 | + } |
| 289 | + |
| 290 | + function updateButtonIcon() { |
| 291 | + const size = Math.min(window.innerWidth, window.innerHeight) * 0.4; // 40% of viewport |
| 292 | + const button = document.getElementById('pauseResumeButton'); |
| 293 | + |
| 294 | + if (isPlaying) { |
| 295 | + button.innerHTML = `<svg width="${size}" height="${size}" viewBox="0 0 24 24"> |
| 296 | + <rect x="6" y="4" width="4" height="16" fill="white"/> |
| 297 | + <rect x="14" y="4" width="4" height="16" fill="white"/> |
| 298 | + </svg>`; |
| 299 | + } else { |
| 300 | + button.innerHTML = `<svg width="${size}" height="${size}" viewBox="0 0 24 24"> |
| 301 | + <path d="M8 5v14l11-7z" fill="white"/> |
| 302 | + </svg>`; |
| 303 | + } |
260 | 304 | } |
261 | 305 |
|
262 | 306 | function getUrlParameter(name) { |
@@ -343,6 +387,7 @@ <h2 class="text-xl font-bold mb-4">Create QR Codes from Playlist</h2> |
343 | 387 | document.getElementById('songCount').textContent = e.target.value; |
344 | 388 | }); |
345 | 389 | document.getElementById('createQRButton').onclick = showPlaylistModal; |
| 390 | + updateButtonIcon(); |
346 | 391 | }); |
347 | 392 |
|
348 | 393 | async function processPlaylist() { |
|
0 commit comments