Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
126 lines (110 sloc) 6.05 KB
<form id="listenForm" onSubmit="return false;">
<input type="text" name="q" autocomplete="off" id="q" value="<%= params[:artist_band].gsub('+',' ') if params[:artist_band].present? %>" tabindex="1" placeholder="search for artists or bands"/>
<input type="button" name="just" value="only" class="listen just tooltip" tabindex="2" original-title="This search method is to search for a single artist or band."/>
<input type="button" name="similar" value="similar" class="listen similar tooltip" tabindex="3" original-title="This search method will find artists and bands similar to your search."/>
<span id="searching-info" class="icon-info-sign tooltip" original-title="See what we provide as search options!"></span>
</form>
<% if !request.path.index("similar") && !request.path.index("just") && !request.path.index("video") && !request.path.index("genre") && !request.path.index("multi") && !@playlist_name %>
<section id="welcome">
<div id="welcome-main-message">
A new way to experience music.
</div>
<div id="welcome-overview">
<div>
<span class="icon-music"></span>
Enjoy just the music content YouTube has to offer, leave the rest behind.
</div>
<div>
<span class="icon-list"></span>
Create custom playlists, making sure your favorite videos are at your every need.
</div>
<div>
<span class="icon-share-alt"></span>
Share your custom playlists or searches, everyone deserves the experience!
</div>
</div>
<div id="welcome-sign-in">
<% if !user_signed_in? %>
<div id="welcome-instructions">
Get started by searching above. If you're interested in creating account, please
register below, or login if you already have one!
</div>
<%= link_to('Register', '/users/sign_up', :class => 'sign-up-link button') %>
<%= link_to('Login', '/users/sign_in', :class => 'sign-in-link button') %>
<% else %>
<div id="welcome-instructions">
Get started by searching above or accessing your playlists.
</div>
<%= link_to('Your Playlists', "/#{current_user.username}/playlists", :class => 'my-playlists-link button') %>
<% end %>
</div>
</section>
<% end %>
<section id="loading-playlist">Loading...</section>
<section id="empty-playlist">
o_O This playlist has 0 videos... this is kinda weird.
</section>
<section id="player">
<div id="share">
<span id="facebook" class="icon-facebook-sign" ></span>
<span id="twitter" class="icon-twitter-sign"></span>
</div>
<div id="ytplayerid"></div>
<div id="player-controls">
<div id="player-controls-right">
<input type="button" id="previous" value="&#8249; Prev"/>
<input type="button" id="next" value="Next &#8250;"/>
</div>
<div id="player-controls-left">
<input type="button" id="remove-video" value="Remove" class="tooltip" original-title="Remove the current video from your playlist. If you're logged in it will never play again!"/>
<input type="button" id="info-button" value="Info"/>
<% if user_signed_in? %>
<%= select_tag "add-to-playlist-dropdown", options_for_select([[nil, nil],['(+) Create New Playlist', 'new']] + current_user.playlists.map{ | p | [p.playlist_name, p.id, { "data-test" => "derp" }]}), { "data-placeholder" => "Add to Playlist" } %>
<span id="create-new-playlist">
<input type="text" id="create-new-playlist-name" placeholder="Enter New Playlist Name..."/>
<input type="button" id="create-new-playlist-submit" value="Create"/>
<input type="button" id="create-new-playlist-cancel" value="Cancel"/>
</span>
<% end %>
</div>
</div>
<section id="playlist"></section>
</section>
<div id="info"></div>
<div id="share-video">
<div class='facebook'>share on facebook</div>
<div class='twitter'>tweet on twitter</div>
<input type='text' class='url' readonly></div>
</div>
<div id="searching-info-dialog">
<ol>
<li>
<h3>Only</h3>
<i>How To:</i> Enter a single artist or band and click the "only" button or press enter.<br/>
<i>What it Does:</i> Retrieves the artist/band's top tracks and searches YouTube for the most relevant video for each.
</li>
<li>
<h3>Similar</h3>
<i>How To:</i> Enter a single artist or band and click the "similar" button.<br/>
<i>What it Does:</i> Retrieves similar artists/bands and searches YouTube for their number one video on YouTube.
</li>
<li>
<h3>Multi</h3>
<i>How To:</i> Enter multiple artists or bands separated by semi-colons (;) and click the "only" button or press enter.<br/>
<i>What it Does:</i> Retrieves the top 10 tracks for each artist/band, then searches YouTube for the most relevant video for each track.
</li>
<li>
<h3>Rain</h3>
<i>How To:</i> Enter the word "rain" and click the "just" button or press enter.<br/>
<i>What it Does:</i> Plays a relaxing thunderstorm for some serious relaxation.
</li>
</ol>
</div>
<script>
<%= "setUserInfo(#{current_user.id}, '#{escape_javascript(current_user.username)}')" if user_signed_in? %>
<%= "multi('#{escape_javascript(params[:artist_band])}');" if request.path.index("multi") %>
<%= "just('#{escape_javascript(params[:artist_band])}');" if request.path.index("just") || request.path.index("genre") %>
<%= "video('#{escape_javascript(params[:video_id])}');" if request.path.index("video") %>
<%= "similarTo('#{escape_javascript(params[:artist_band])}');" if request.path.index("similar") %>
<%= "userPlaylist('#{escape_javascript(@username)}','#{url_encode(escape_javascript(@playlist_name))}');" if @playlist_name %>
</script>
Jump to Line
Something went wrong with that request. Please try again.