popup.html 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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 class="video-title" x-text="video.title" x-bind="videotitle"></span>
  27. <div class="video-actions">
  28. <a
  29. :href="video.url"
  30. class="play-btn"
  31. x-bind="videoPlayLink"
  32. >
  33. ⏵
  34. </a>
  35. <button
  36. :playlistName="playlistName"
  37. :playlistIndex="index"
  38. x-bind="removeVideoButton"
  39. class="remove-btn"
  40. >
  41. X
  42. </button>
  43. </div>
  44. </div>
  45. </template>
  46. <!--
  47. <div x-show="videos.length === 0" class="empty-playlist">
  48. No videos in this playlist
  49. </div>
  50. -->
  51. </div>
  52. </div>
  53. </template>
  54. </div>
  55. </div>
  56. </body>
  57. </html>