Web-based Winamp controller for CarPC � Go backend, mobile-first UI
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

307 行
6.3KB

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