Models refactoring, artist page draft
This commit is contained in:
@@ -1 +1,22 @@
|
||||
<h1><%= @artist.name %></h1>
|
||||
<h1 class="artist"><%= @artist.name %></h1>
|
||||
<% @artist.albums.each do |album| %>
|
||||
<% if album.releases.length > 0 %>
|
||||
<div class="album">
|
||||
<div class="pic"></div>
|
||||
<h3 class="name"><%= album.name %> (<%= album.year %>)</h3>
|
||||
<%
|
||||
releases = album.releases
|
||||
first_release = releases.first
|
||||
%>
|
||||
<ul class="tracks">
|
||||
<% first_release.tracks.each do |track| %>
|
||||
<li>
|
||||
<span class="play"></span>
|
||||
<span class="track-name"><%= track.name %></span>
|
||||
<span class="duration"><%= track.length %></span>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
Reference in New Issue
Block a user