Skip to content

Commit

Permalink
Add artist link to the album
Browse files Browse the repository at this point in the history
  • Loading branch information
aidewoode committed Jan 8, 2024
1 parent c8f125a commit 79fbd5d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions app/assets/stylesheets/components/_card.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
}

.c-card__body__text {
display: block;
margin-bottom: spacing("tiny");
}

Expand Down
4 changes: 2 additions & 2 deletions app/views/albums/_album.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<%= image_tag image_url_for(album), class: "u-image-fluid" %>
<% end %>
<div class='c-card__body'>
<p class='c-card__body__text u-text-weight-bold u-text-line-clamp-2'><%= link_to album.name, album_path(album) %></p>
<p class='c-card__body__text u-text-line-clamp-2'><%= album.artist.name %></p>
<%= link_to album.name, album_path(album), class: "c-card__body__text u-text-weight-bold u-text-line-clamp-2" %>
<%= link_to album.artist.name, artist_path(album.artist), class: "c-card__body__text u-text-line-clamp-2" %>
</div>
</div>
2 changes: 1 addition & 1 deletion app/views/albums/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<%= image_tag image_url_for(@album), class: "c-card__image u-image-large", data: {test_id: "album_image"} %>
<div class='c-card__body'>
<h1 class='c-card__body__title'><%= @album.name %></h1>
<p class='c-card__body__text'><%= @album.artist.name %></p>
<%= link_to @album.artist.name, artist_path(@album.artist), class: "c-card__body__text" %>
<div class='c-card__body__text'>
<span><%= @album.songs.count %> <%= t("label.tracks") %></span>
<span>,</span>
Expand Down

0 comments on commit 79fbd5d

Please sign in to comment.