feature/share-libs
erb 34 lines 1.21 KB
Raw
1 <div class="row mt-5 g-5">
2 <div class="col-sm-3 text-center ">
3 <div class="mt-4 mb-4">
4 <%= image_pack_tag(
5 "image-placeholder-#{rand(0...3)}.jpg",
6 alt:"#{album.name} image",
7 class: "img-thumbnail rounded"
8 ) %>
9 </div>
10 <span class="mx-2 badge bg-warning rounded-pill fst-italic">
11 <%= album.present? ? link_to(
12 album.name,
13 album_detail_path(album.slug),
14 title: "Album: #{album.name}"
15 ) : 'Add album?' %>
16 </span>
17 </div>
18 <% @song.artists.each_with_index do |artist, index| %>
19 <div class="col-6 col-sm-3 col-md-2 text-center">
20 <div class="mt-4 mb-4">
21 <%= image_pack_tag(
22 "image-placeholder-#{rand(0...3)}.jpg",
23 alt:"#{artist.name} image",
24 class: "img-thumbnail rounded-circle"
25 ) %>
26 </div>
27 <%= link_to(
28 artist.name,
29 artist_detail_path(artist.name.downcase.parameterize + "-" + artist.id.to_s),
30 class: 'badge rounded-pill bg-warning text-dark fst-italic '
31 ) %>
32 </div>
33 <% end %>
34 </div>