Web-based Winamp controller for CarPC � Go backend, mobile-first UI
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

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