Web-based Winamp controller for CarPC � Go backend, mobile-first UI
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

290 linhas
5.9KB

  1. :root {
  2. --bg: #1a1a2e;
  3. --surface: #16213e;
  4. --accent: #e94560;
  5. --accent2: #0f3460;
  6. --text: #eaeaea;
  7. --text-dim: #888;
  8. --radius: 12px;
  9. --btn-h: 64px;
  10. }
  11. * { box-sizing: border-box; margin: 0; padding: 0; }
  12. html, body {
  13. height: 100%;
  14. background: var(--bg);
  15. color: var(--text);
  16. font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  17. -webkit-tap-highlight-color: transparent;
  18. user-select: none;
  19. }
  20. #app {
  21. max-width: 600px;
  22. margin: 0 auto;
  23. padding: 16px;
  24. display: flex;
  25. flex-direction: column;
  26. gap: 16px;
  27. min-height: 100vh;
  28. }
  29. /* Status bar */
  30. #status-bar {
  31. display: flex;
  32. align-items: center;
  33. gap: 8px;
  34. font-size: 12px;
  35. color: var(--text-dim);
  36. }
  37. #winamp-status { font-size: 16px; }
  38. #winamp-status.ok { color: #4caf50; }
  39. #winamp-status.err { color: var(--accent); }
  40. /* Track info */
  41. #track-info {
  42. background: var(--surface);
  43. border-radius: var(--radius);
  44. padding: 20px;
  45. text-align: center;
  46. }
  47. #track-title {
  48. font-size: 18px;
  49. font-weight: 600;
  50. white-space: nowrap;
  51. overflow: hidden;
  52. text-overflow: ellipsis;
  53. }
  54. #playlist-pos {
  55. font-size: 12px;
  56. color: var(--text-dim);
  57. margin-top: 4px;
  58. }
  59. /* Visualisation canvas */
  60. #viz {
  61. width: 100%;
  62. height: 80px;
  63. border-radius: var(--radius);
  64. background: #000;
  65. display: block;
  66. }
  67. /* Progress */
  68. #progress-wrap {
  69. display: flex;
  70. flex-direction: column;
  71. gap: 4px;
  72. }
  73. #progress-bar {
  74. height: 8px;
  75. background: var(--accent2);
  76. border-radius: 4px;
  77. overflow: hidden;
  78. cursor: pointer;
  79. }
  80. #progress-fill {
  81. height: 100%;
  82. background: var(--accent);
  83. width: 0%;
  84. transition: width 0.5s linear;
  85. border-radius: 4px;
  86. }
  87. #time-display {
  88. display: flex;
  89. justify-content: space-between;
  90. font-size: 12px;
  91. color: var(--text-dim);
  92. }
  93. /* Buttons base */
  94. .btn {
  95. background: var(--surface);
  96. color: var(--text);
  97. border: none;
  98. border-radius: var(--radius);
  99. font-size: 22px;
  100. cursor: pointer;
  101. transition: background 0.15s, transform 0.08s;
  102. display: flex;
  103. align-items: center;
  104. justify-content: center;
  105. touch-action: manipulation;
  106. }
  107. .btn:active { transform: scale(0.93); background: var(--accent2); }
  108. /* Seek row */
  109. #seek-row {
  110. display: grid;
  111. grid-template-columns: repeat(4, 1fr);
  112. gap: 8px;
  113. }
  114. .btn-seek {
  115. height: 52px;
  116. font-size: 14px;
  117. font-weight: 600;
  118. }
  119. /* Controls row */
  120. #controls-row {
  121. display: grid;
  122. grid-template-columns: repeat(4, 1fr);
  123. gap: 8px;
  124. }
  125. .btn-ctrl { height: var(--btn-h); font-size: 28px; }
  126. .btn-play {
  127. background: var(--accent);
  128. font-size: 32px;
  129. }
  130. .btn-play:active { background: #c73652; }
  131. /* Volume row */
  132. #volume-row {
  133. display: flex;
  134. align-items: center;
  135. gap: 10px;
  136. }
  137. .btn-vol { width: 48px; height: 48px; flex-shrink: 0; font-size: 18px; }
  138. #btn-mute { font-size: 22px; }
  139. #btn-mute.muted { color: var(--accent); }
  140. #volume-bar-wrap { flex: 1; display: flex; flex-direction: column; gap: 4px; }
  141. #volume-bar {
  142. height: 8px;
  143. background: var(--accent2);
  144. border-radius: 4px;
  145. overflow: hidden;
  146. cursor: pointer;
  147. }
  148. #volume-fill {
  149. height: 100%;
  150. background: #4caf50;
  151. width: 70%;
  152. transition: width 0.2s;
  153. border-radius: 4px;
  154. }
  155. #volume-pct {
  156. font-size: 11px;
  157. color: var(--text-dim);
  158. text-align: center;
  159. }
  160. #volume-fill.muted { background: var(--accent); }
  161. /* Killist */
  162. #killist-row {
  163. display: flex;
  164. gap: 8px;
  165. }
  166. .btn-kill { flex: 1; height: 52px; font-size: 16px; background: #3a1a1a; }
  167. .btn-kill:active { background: var(--accent); }
  168. .btn-kill-list { width: 64px; height: 52px; font-size: 14px; }
  169. .btn-action { width: 52px; height: 52px; font-size: 20px; }
  170. #killist-panel {
  171. background: var(--surface);
  172. border-radius: var(--radius);
  173. padding: 16px;
  174. }
  175. #killist-panel h3 { margin-bottom: 12px; }
  176. #killist-items { list-style: none; display: flex; flex-direction: column; gap: 8px; }
  177. #killist-items li {
  178. display: flex;
  179. justify-content: space-between;
  180. align-items: center;
  181. background: var(--bg);
  182. border-radius: 8px;
  183. padding: 8px 12px;
  184. font-size: 14px;
  185. }
  186. #killist-items li button {
  187. background: var(--accent);
  188. color: white;
  189. border: none;
  190. border-radius: 6px;
  191. padding: 4px 10px;
  192. cursor: pointer;
  193. }
  194. #btn-close-killist { margin-top: 12px; width: 100%; height: 44px; font-size: 15px; }
  195. /* ── Playlist overlay ────────────────────────────────────────────────────── */
  196. #playlist-overlay {
  197. position: fixed;
  198. inset: 0;
  199. z-index: 200;
  200. background: var(--bg);
  201. display: flex;
  202. flex-direction: column;
  203. }
  204. #playlist-header {
  205. display: flex;
  206. align-items: center;
  207. justify-content: space-between;
  208. padding: 16px 20px;
  209. background: var(--surface);
  210. border-bottom: 1px solid #ffffff12;
  211. flex-shrink: 0;
  212. }
  213. #playlist-title-label {
  214. font-size: 16px;
  215. font-weight: 600;
  216. }
  217. #btn-close-playlist {
  218. background: none;
  219. border: none;
  220. color: var(--text-dim);
  221. font-size: 22px;
  222. cursor: pointer;
  223. padding: 4px 8px;
  224. border-radius: 8px;
  225. line-height: 1;
  226. touch-action: manipulation;
  227. }
  228. #btn-close-playlist:active { background: var(--accent2); color: var(--text); }
  229. #playlist-list {
  230. list-style: none;
  231. overflow-y: auto;
  232. flex: 1;
  233. padding: 8px 0;
  234. -webkit-overflow-scrolling: touch;
  235. }
  236. #playlist-list li {
  237. display: flex;
  238. align-items: center;
  239. gap: 12px;
  240. padding: 12px 20px;
  241. cursor: pointer;
  242. border-radius: 0;
  243. transition: background 0.1s;
  244. -webkit-tap-highlight-color: transparent;
  245. }
  246. #playlist-list li:active { background: var(--accent2); }
  247. #playlist-list li.current {
  248. background: #e9456018;
  249. border-left: 3px solid var(--accent);
  250. padding-left: 17px;
  251. }
  252. .pl-idx {
  253. font-size: 12px;
  254. color: var(--text-dim);
  255. min-width: 32px;
  256. text-align: right;
  257. flex-shrink: 0;
  258. }
  259. .pl-title {
  260. font-size: 15px;
  261. white-space: nowrap;
  262. overflow: hidden;
  263. text-overflow: ellipsis;
  264. }
  265. li.current .pl-title { color: var(--accent); font-weight: 600; }
  266. #playlist-loading {
  267. text-align: center;
  268. color: var(--text-dim);
  269. padding: 40px;
  270. font-size: 14px;
  271. }
  272. .hidden { display: none !important; }