A last.fm clone written in Elixir
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.
 
 
 
 
 
 

20 lines
902 B

<% size = assigns[:size] || 64 %>
<article class="media is-dense">
<figure class="media-left">
<a class="image <%= image_class(size) %>" href="<%= Routes.album_path(@conn, :show, @listen.album) %>">
<img src="<%= Dagon.Listens.Albums.Uploader.url({@listen.album.image, @listen.album}, :thumb) %>">
</a>
</figure>
<div class="media-content">
<div class="content">
<p>
<strong><%= link @listen.track.name, to: Routes.track_path(@conn, :show, @listen.track), class: "has-text-dark" %></strong> <small>
<%= link Timex.from_now(@listen.listened_at), to: Routes.listen_path(@conn, :show, @listen), class: "has-text-grey", title: @listen.listened_at %>
</small>
<br />
<span>by <%= link @listen.artist.name, to: Routes.artist_path(@conn, :show, @listen.artist), class: "has-text-dark" %></span>
</p>
</div>
</div>
</article>