Player library, unified renderer for artists and playlists
This commit is contained in:
@@ -24,13 +24,13 @@
|
||||
%table.zebra-striped
|
||||
%tr
|
||||
%td
|
||||
%span.label.success.dynamic-playlist{ href: "", 'data-playlist' => "lastfm-top50/#{@artist.id}" }= t('player.set_playlist')
|
||||
%a.playlist-name{ href: "", 'data-playlist' => "lastfm-top50/#{@artist.id}" }= "#{@artist.name}: Last.fm TOP"
|
||||
%span.label.success.set-playlist{ href: "", 'data-playlist' => "lastfm-top50/#{@artist.id}" }= t('player.set_playlist')
|
||||
%a.page-link.playlist-name{ href: "/playlist/lastfm-top50/#{@artist.id}" }= "#{@artist.name}: Last.fm TOP"
|
||||
- @artist.playlists.each do |playlist|
|
||||
%tr
|
||||
- @artist.playlists.each do |playlist|
|
||||
%td
|
||||
%span.label.success.set-playlist{ href: "", 'data-playlist-id' => playlist.id }= t('player.set_playlist')
|
||||
%span.label.success.set-playlist{ href: "", 'data-playlist' => playlist.id }= t('player.set_playlist')
|
||||
%a.playlist-name{ href: "", 'data-playlist-id' => playlist.id }= playlist.name
|
||||
|
||||
- @artist.albums.each do |album|
|
||||
@@ -38,7 +38,7 @@
|
||||
.span4.columns.art
|
||||
%img{ src: album.pic_url }
|
||||
.button-container
|
||||
%a.btn.add-album{ 'data-album-id' => album.id }= t('player.add')
|
||||
%a.btn.add-album{ 'data-tracks' => album.tracks.map(&:id).join(",") }= t('player.add')
|
||||
.span7.columns.tracks
|
||||
%h3{ 'data-album-id' => album.id }
|
||||
= album.name
|
||||
|
||||
@@ -17,14 +17,14 @@
|
||||
.topbar-inner
|
||||
.container
|
||||
%h3
|
||||
%a#logo{ :href => "#/" } BeatHaven
|
||||
%a#logo.page-link{ :href => "/" } BeatHaven
|
||||
%ul.nav
|
||||
%li
|
||||
%a{ :href => "http://blog.beathaven.org/", :target => "_blank" }= t('global.news')
|
||||
%li
|
||||
%a.about{ :href => "#/about/" }= t('global.about')
|
||||
%a.page-link.about{ :href => "/about/" }= t('global.about')
|
||||
%li
|
||||
%a.stat{ :href => "#/stat/" }= t('global.stat')
|
||||
%a.page-link.stat{ :href => "/stat/" }= t('global.stat')
|
||||
%form#search-form{ :action => "" }
|
||||
%input#search{ :type => "text", :placeholder => t('global.search') }
|
||||
#artist-load-spinner
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
.row.album
|
||||
.span3.columns.art
|
||||
- unless @data[:pic_url].nil?
|
||||
%img{ src: @data[:pic_url] }
|
||||
.button-container
|
||||
%a.btn.add-album{ 'data-tracks' => @data[:tracks].map{|_|_[:id]}.join(",") }= t('player.play_all')
|
||||
.span8.columns.tracks
|
||||
%h3= @data[:name]
|
||||
%table.zebra-striped.tracklist
|
||||
- @data[:tracks].each do |track|
|
||||
%tr{ class: (track[:available] == false ? "unavailable" : nil) }
|
||||
%td.album-pic
|
||||
%img{ src: track[:album_pic]}
|
||||
%td.song-title
|
||||
%a.data.artist= track[:artist]
|
||||
—
|
||||
= track[:name]
|
||||
%td.song-duration
|
||||
.s-duration= (track[:duration] != '0:00' ? track[:duration] : ' '.html_safe)
|
||||
%span.label.success.s-add{ 'data-id' => track[:id] }= t('player.add_one')
|
||||
Reference in New Issue
Block a user