Web-based Winamp controller for CarPC � Go backend, mobile-first UI
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

192 lignes
3.7KB

  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. /* Progress */
  60. #progress-wrap {
  61. display: flex;
  62. flex-direction: column;
  63. gap: 4px;
  64. }
  65. #progress-bar {
  66. height: 8px;
  67. background: var(--accent2);
  68. border-radius: 4px;
  69. overflow: hidden;
  70. cursor: pointer;
  71. }
  72. #progress-fill {
  73. height: 100%;
  74. background: var(--accent);
  75. width: 0%;
  76. transition: width 0.5s linear;
  77. border-radius: 4px;
  78. }
  79. #time-display {
  80. display: flex;
  81. justify-content: space-between;
  82. font-size: 12px;
  83. color: var(--text-dim);
  84. }
  85. /* Buttons base */
  86. .btn {
  87. background: var(--surface);
  88. color: var(--text);
  89. border: none;
  90. border-radius: var(--radius);
  91. font-size: 22px;
  92. cursor: pointer;
  93. transition: background 0.15s, transform 0.08s;
  94. display: flex;
  95. align-items: center;
  96. justify-content: center;
  97. touch-action: manipulation;
  98. }
  99. .btn:active { transform: scale(0.93); background: var(--accent2); }
  100. /* Seek row */
  101. #seek-row {
  102. display: grid;
  103. grid-template-columns: repeat(4, 1fr);
  104. gap: 8px;
  105. }
  106. .btn-seek {
  107. height: 52px;
  108. font-size: 14px;
  109. font-weight: 600;
  110. }
  111. /* Controls row */
  112. #controls-row {
  113. display: grid;
  114. grid-template-columns: repeat(4, 1fr);
  115. gap: 8px;
  116. }
  117. .btn-ctrl { height: var(--btn-h); font-size: 28px; }
  118. .btn-play {
  119. background: var(--accent);
  120. font-size: 32px;
  121. }
  122. .btn-play:active { background: #c73652; }
  123. /* Volume row */
  124. #volume-row {
  125. display: flex;
  126. align-items: center;
  127. gap: 12px;
  128. }
  129. .btn-vol { width: 52px; height: 52px; flex-shrink: 0; }
  130. #volume-bar-wrap { flex: 1; }
  131. #volume-bar {
  132. height: 8px;
  133. background: var(--accent2);
  134. border-radius: 4px;
  135. overflow: hidden;
  136. cursor: pointer;
  137. }
  138. #volume-fill {
  139. height: 100%;
  140. background: #4caf50;
  141. width: 70%;
  142. transition: width 0.2s;
  143. border-radius: 4px;
  144. }
  145. /* Killist */
  146. #killist-row {
  147. display: flex;
  148. gap: 8px;
  149. }
  150. .btn-kill { flex: 1; height: 52px; font-size: 16px; background: #3a1a1a; }
  151. .btn-kill:active { background: var(--accent); }
  152. .btn-kill-list { width: 80px; height: 52px; font-size: 14px; }
  153. #killist-panel {
  154. background: var(--surface);
  155. border-radius: var(--radius);
  156. padding: 16px;
  157. }
  158. #killist-panel h3 { margin-bottom: 12px; }
  159. #killist-items { list-style: none; display: flex; flex-direction: column; gap: 8px; }
  160. #killist-items li {
  161. display: flex;
  162. justify-content: space-between;
  163. align-items: center;
  164. background: var(--bg);
  165. border-radius: 8px;
  166. padding: 8px 12px;
  167. font-size: 14px;
  168. }
  169. #killist-items li button {
  170. background: var(--accent);
  171. color: white;
  172. border: none;
  173. border-radius: 6px;
  174. padding: 4px 10px;
  175. cursor: pointer;
  176. }
  177. #btn-close-killist { margin-top: 12px; width: 100%; height: 44px; font-size: 15px; }
  178. .hidden { display: none !important; }