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. </a>
  34. <button
  35. :playlistName="playlistName"
  36. :playlistIndex="index"
  37. x-bind="removeVideoButton"
  38. class="remove-btn"
  39. >
  40. X
  41. </button>
  42. </div>
  43. </div>
  44. </template>
  45. <!--
  46. <div x-show="videos.length === 0" class="empty-playlist">
  47. No videos in this playlist
  48. </div>
  49. -->
  50. </div>
  51. </div>
  52. </template>
  53. </div>
  54. </div>
  55. </body>
  56. </html>