popup.html 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <!doctype html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8" />
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  6. <title>My Playlists</title>
  7. <link rel="stylesheet" href="popup.css" />
  8. <script src="alpine.min.js" defer></script>
  9. <script src="popup.js"></script>
  10. </head>
  11. <body>
  12. <div id="app" x-data="playlistManager">
  13. <header>
  14. <h1>My Playlists</h1>
  15. </header>
  16. <div class="playlists-container">
  17. <template
  18. x-for="(videos, playlistName) in playlists"
  19. :key="playlistName"
  20. >
  21. <div class="playlist">
  22. <h2 x-text="playlistName"></h2>
  23. <div class="video-list">
  24. <template x-for="(video, index) in videos" :key="index">
  25. <div class="video-item" :title="video.title">
  26. <span
  27. class="video-title"
  28. x-text="video.title"
  29. x-bind="videotitle"
  30. ></span>
  31. <div class="video-actions">
  32. <a
  33. :href="video.url"
  34. class="play-btn"
  35. x-bind="videoPlayLink"
  36. >
  37. </a>
  38. <button
  39. :data-playlist-name="playlistName"
  40. :data-playlist-index="index"
  41. x-bind="removeVideoButton"
  42. class="remove-btn"
  43. >
  44. X
  45. </button>
  46. </div>
  47. </div>
  48. </template>
  49. <!--
  50. <div x-show="videos.length === 0" class="empty-playlist">
  51. No videos in this playlist
  52. </div>
  53. -->
  54. </div>
  55. </div>
  56. </template>
  57. </div>
  58. <!-- Export button -->
  59. <div class="export-container">
  60. <button class="export-btn" x-bind="exportButton">
  61. Export Playlists
  62. </button>
  63. </div>
  64. </div>
  65. </body>
  66. </html>