Web-based Winamp controller for CarPC � Go backend, mobile-first UI
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

209 строки
4.1KB

  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: 80px; height: 52px; font-size: 14px; }
  169. #killist-panel {
  170. background: var(--surface);
  171. border-radius: var(--radius);
  172. padding: 16px;
  173. }
  174. #killist-panel h3 { margin-bottom: 12px; }
  175. #killist-items { list-style: none; display: flex; flex-direction: column; gap: 8px; }
  176. #killist-items li {
  177. display: flex;
  178. justify-content: space-between;
  179. align-items: center;
  180. background: var(--bg);
  181. border-radius: 8px;
  182. padding: 8px 12px;
  183. font-size: 14px;
  184. }
  185. #killist-items li button {
  186. background: var(--accent);
  187. color: white;
  188. border: none;
  189. border-radius: 6px;
  190. padding: 4px 10px;
  191. cursor: pointer;
  192. }
  193. #btn-close-killist { margin-top: 12px; width: 100%; height: 44px; font-size: 15px; }
  194. .hidden { display: none !important; }