index.html 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  1. <!DOCTYPE html>
  2. <html lang="zh-CN">
  3. <head>
  4. <meta charset="UTF-8" />
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  6. <title>MusicWeb Player</title>
  7. <link rel="stylesheet" href="/static/css/style.css" />
  8. </head>
  9. <body>
  10. <div class="app-shell">
  11. <header class="app-header">
  12. <div class="header-copy">
  13. <p class="eyebrow">MusicWeb Player</p>
  14. <h1>在线音乐播放器</h1>
  15. <p class="subtext">移动端专辑浏览与播放</p>
  16. </div>
  17. <div class="header-pill">当前目录:<span id="folderIndicator">根目录</span></div>
  18. </header>
  19. <main class="page-content">
  20. <section id="homeView" class="view-stack">
  21. <section class="content-section slim-hero">
  22. <div>
  23. <h2 id="nowTitle">选择一个专辑目录开始播放</h2>
  24. <p id="nowMeta" class="subtext">点击专辑进入详情页,或直接在卡片上快速播放。</p>
  25. </div>
  26. <div class="hero-metrics">
  27. <div class="metric-card">
  28. <strong id="albumCount">0</strong>
  29. <span>专辑目录</span>
  30. </div>
  31. <div class="metric-card">
  32. <strong id="trackCount">0</strong>
  33. <span>歌曲总数</span>
  34. </div>
  35. </div>
  36. </section>
  37. <section class="content-section">
  38. <div class="section-head">
  39. <h2>精选专辑</h2>
  40. <span>通栏展示</span>
  41. </div>
  42. <div id="featuredAlbums" class="featured-list"></div>
  43. </section>
  44. <section class="content-section">
  45. <div class="section-head">
  46. <h2>全部专辑目录</h2>
  47. <span>两栏浏览</span>
  48. </div>
  49. <div id="albumGrid" class="album-grid"></div>
  50. </section>
  51. <section class="stack-section">
  52. <section class="content-section">
  53. <div class="section-head">
  54. <h2>最新更新</h2>
  55. <span>紧凑列表</span>
  56. </div>
  57. <div id="latestList" class="song-list compact-list"></div>
  58. </section>
  59. <section class="content-section">
  60. <div class="section-head">
  61. <h2>每日排名</h2>
  62. <span>目录热度</span>
  63. </div>
  64. <div id="rankingList" class="ranking-list"></div>
  65. </section>
  66. </section>
  67. </section>
  68. <section id="detailView" class="view-stack is-hidden">
  69. <section class="content-section detail-header">
  70. <button id="backHomeBtn" class="back-btn">返回首页</button>
  71. <div class="detail-cover-wrap">
  72. <img id="detailCoverImage" class="detail-cover-image is-hidden" alt="cover" />
  73. <div id="detailCoverFallback" class="detail-cover-fallback">专辑</div>
  74. </div>
  75. <div class="detail-copy">
  76. <p class="eyebrow">Album Detail</p>
  77. <h2 id="detailTitle">专辑详情</h2>
  78. <p id="detailMeta" class="subtext"></p>
  79. <div class="card-actions">
  80. <button id="detailPlayBtn" class="primary-btn">播放当前目录</button>
  81. <button id="detailPlayAllBtn" class="secondary-btn">加入并播放</button>
  82. </div>
  83. </div>
  84. </section>
  85. <section class="content-section">
  86. <div class="section-head">
  87. <h2>歌曲列表</h2>
  88. <span id="detailTrackCount">0 首</span>
  89. </div>
  90. <div id="detailTrackList" class="song-list"></div>
  91. </section>
  92. </section>
  93. <section class="content-section">
  94. <div class="section-head">
  95. <h2>当前播放队列</h2>
  96. <button id="saveQueueBtn" class="text-btn">刷新</button>
  97. </div>
  98. <div id="queueList" class="queue-list"></div>
  99. </section>
  100. <section class="stack-section">
  101. <section class="content-section">
  102. <div class="section-head">
  103. <h2>目录与上传</h2>
  104. </div>
  105. <label class="field">
  106. <span>目标目录</span>
  107. <input id="targetDir" type="text" placeholder="如:流行/周杰伦" />
  108. </label>
  109. <label class="field">
  110. <span>上传音乐</span>
  111. <input id="uploadInput" type="file" multiple />
  112. </label>
  113. <button id="uploadBtn" class="primary-btn">上传文件</button>
  114. <label class="field">
  115. <span>新建文件夹</span>
  116. <input id="newFolderInput" type="text" placeholder="如:轻音乐/夜晚" />
  117. </label>
  118. <button id="createFolderBtn" class="secondary-btn">创建文件夹</button>
  119. </section>
  120. <section class="content-section">
  121. <div class="section-head">
  122. <h2>播放列表</h2>
  123. </div>
  124. <label class="field">
  125. <span>新列表名称</span>
  126. <input id="playlistNameInput" type="text" placeholder="我的收藏" />
  127. </label>
  128. <button id="createPlaylistBtn" class="secondary-btn">用当前队列创建</button>
  129. <div id="playlistList" class="playlist-list"></div>
  130. </section>
  131. </section>
  132. </main>
  133. <div class="player-dock">
  134. <div class="player-top">
  135. <div class="dock-cover-wrap">
  136. <img id="dockCoverImage" class="dock-cover-image is-hidden" alt="cover" />
  137. <div class="dock-cover-fallback" id="dockCoverFallback">乐</div>
  138. </div>
  139. <div class="dock-copy">
  140. <strong id="dockTitle">未开始播放</strong>
  141. <p id="dockPath">点击专辑或歌曲开始播放</p>
  142. </div>
  143. </div>
  144. <div class="player-progress">
  145. <span id="currentTimeLabel">00:00</span>
  146. <input id="progressBar" type="range" min="0" max="100" value="0" />
  147. <span id="durationLabel">00:00</span>
  148. </div>
  149. <div class="player-actions icon-actions">
  150. <button id="shuffleBtn" class="icon-btn" aria-label="随机" data-tip="随机播放">
  151. <svg viewBox="0 0 24 24" aria-hidden="true"><path d="M16 4h4v4M20 4l-5 5M4 7h5l6 6M4 17h5l2-2M15 15l5 5M20 20v-4"/></svg>
  152. </button>
  153. <button id="prevBtn" class="icon-btn" aria-label="上一曲" data-tip="上一曲">
  154. <svg viewBox="0 0 24 24" aria-hidden="true"><path d="M6 5v14M18 6l-8 6 8 6V6z"/></svg>
  155. </button>
  156. <button id="playToggleBtn" class="icon-btn play-toggle" aria-label="播放或暂停" data-tip="播放">
  157. <svg class="icon-play" viewBox="0 0 24 24" aria-hidden="true"><path d="M8 5v14l11-7-11-7z"/></svg>
  158. <svg class="icon-pause is-hidden" viewBox="0 0 24 24" aria-hidden="true"><path d="M8 5h3v14H8zM13 5h3v14h-3z"/></svg>
  159. </button>
  160. <button id="nextBtn" class="icon-btn" aria-label="下一曲" data-tip="下一曲">
  161. <svg viewBox="0 0 24 24" aria-hidden="true"><path d="M18 5v14M6 6l8 6-8 6V6z"/></svg>
  162. </button>
  163. <button id="loopBtn" class="icon-btn" aria-label="循环" data-tip="列表循环">
  164. <svg viewBox="0 0 24 24" aria-hidden="true"><path d="M17 2l4 4-4 4M3 11V9a3 3 0 0 1 3-3h15M7 22l-4-4 4-4M21 13v2a3 3 0 0 1-3 3H3"/></svg>
  165. </button>
  166. </div>
  167. <audio id="audioPlayer" preload="metadata"></audio>
  168. </div>
  169. <div id="iconToast" class="icon-toast is-hidden"></div>
  170. </div>
  171. <template id="trackItemTemplate">
  172. <div class="song-row">
  173. <div class="song-copy">
  174. <strong class="track-name"></strong>
  175. <p class="track-path"></p>
  176. </div>
  177. <div class="track-actions compact-actions">
  178. <button class="play-btn icon-btn small-icon-btn" aria-label="播放" data-tip="播放">
  179. <svg viewBox="0 0 24 24" aria-hidden="true"><path d="M8 5v14l11-7-11-7z"/></svg>
  180. </button>
  181. <button class="queue-btn icon-btn small-icon-btn" aria-label="加入队列" data-tip="加入队列">
  182. <svg viewBox="0 0 24 24" aria-hidden="true"><path d="M4 7h10M4 12h10M4 17h7M18 9v8M14 13h8"/></svg>
  183. </button>
  184. <button class="move-btn icon-btn small-icon-btn" aria-label="移动" data-tip="移动歌曲">
  185. <svg viewBox="0 0 24 24" aria-hidden="true"><path d="M4 12h10M11 5l7 7-7 7"/></svg>
  186. </button>
  187. </div>
  188. </div>
  189. </template>
  190. <script src="/static/js/app.js"></script>
  191. </body>
  192. </html>