can't resist
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

32 lines
1.1 KiB

  1. <div class="grid grid-cols-5 gap-4">
  2. <%= live_component @socket, TomieWeb.ListenLive.SidebarComponent %>
  3. <div class="col-span-4">
  4. <h1>Top Albums</h1>
  5. <div class="grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 mb-10">
  6. <%= for item <- @albums[:top] do %>
  7. <%= live_patch class: "relative", to: Routes.live_path(@socket, TomieWeb.AlbumLive.Show, item.model.id) do %>
  8. <img src="<%= Listens.Albums.get_album_image(item.model, :large) %>" class="w-full">
  9. <span class="absolute top-0 left-0 m-1 p-1 bg-surface-alt text-center rounded">
  10. <%= item.listens %>
  11. </span>
  12. <% end %>
  13. <% end %>
  14. </div>
  15. <h1>Newest Albums</h1>
  16. <div class="grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6">
  17. <%= for album <- @albums[:newest] do %>
  18. <%= live_patch class: "relative", to: Routes.live_path(@socket, TomieWeb.AlbumLive.Show, album) do %>
  19. <img src="<%= Listens.Albums.get_album_image(album, :large) %>">
  20. <span class="absolute top-0 left-0 bg-surface-alt p-1 text-center">
  21. <%= album.name %>
  22. </span>
  23. <% end %>
  24. <% end %>
  25. </div>
  26. </div>
  27. </div>