diff --git a/.gitmodules b/.gitmodules
deleted file mode 100644
index 4a14c9e..0000000
--- a/.gitmodules
+++ /dev/null
@@ -1,3 +0,0 @@
-[submodule "vendor/plugins/more"]
- path = vendor/plugins/more
- url = git://github.com/cloudhead/more.git
diff --git a/Gemfile b/Gemfile
index f03398e..f706288 100644
--- a/Gemfile
+++ b/Gemfile
@@ -4,12 +4,12 @@ gem 'rake' #, '0.8.7'
gem 'rails', '3.0.5'
gem 'jquery-rails', '>= 0.2.6'
-gem 'jrails'
# templating / styling
gem 'haml-rails'
gem "sass"
+gem "youtube_it"
# for using last.fm api
gem 'typhoeus'
diff --git a/Gemfile.lock b/Gemfile.lock
index fb45ec0..8291c49 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -57,7 +57,6 @@ GEM
jquery-rails (1.0.9)
railties (~> 3.0)
thor (~> 0.14)
- jrails (0.6.0)
json (1.5.1)
mail (2.2.19)
activesupport (>= 2.3.6)
@@ -147,7 +146,6 @@ DEPENDENCIES
haml-rails
hashie
jquery-rails (>= 0.2.6)
- jrails
json
mongrel (= 1.2.0.pre2)
oa-oauth
diff --git a/app/controllers/artists_controller.rb b/app/controllers/artists_controller.rb
index 49e70c2..6d29e5e 100644
--- a/app/controllers/artists_controller.rb
+++ b/app/controllers/artists_controller.rb
@@ -28,25 +28,30 @@ class ArtistsController < ApplicationController
def more_tracks
- more params
- @tracks = LastFM::Artist.getTopTracks params[:artist], @@limit[:tracks], (params[:size] / @@limit[:tracks] + 1)
+ prepare params
+ @tracks = LastFM::Artist.getTopTracks params[:q], @@limit[:tracks], (params[:size] / @@limit[:tracks] + 1)
LastFM::LastFMRequest.run_queue!
render :partial=>"more_tracks", :locals=>{:tracks=>@tracks}
end
def more_albums
- more params
- @albums = LastFM::Artist.getTopAlbums params[:artist], @@limit[:albums], (params[:size] / @@limit[:albums] + 1)
+ prepare params
+ @albums = LastFM::Artist.getTopAlbums params[:q], @@limit[:albums], (params[:size] / @@limit[:albums] + 1)
LastFM::LastFMRequest.run_queue!
render :partial=>"more_albums", :locals=>{:albums=>@albums}
end
-
- def more params
- params[:artist] = CGI.unescape params[:artist]
- params[:size] = params[:size].to_i
- params
+ def album_info
+ @album = LastFM::Album.getInfo CGI.unescape(params[:album]), CGI.unescape(params[:artist])
+ LastFM::LastFMRequest.run_queue!
+
+ render :partial=>"album_info", :locals=>{:album=>@album}
end
-end
+
+ def prepare params
+ params[:q] = CGI.unescape params[:q]
+ params[:size] = params[:size].to_i
+ end
+end
\ No newline at end of file
diff --git a/app/controllers/search_controller.rb b/app/controllers/search_controller.rb
index 275920b..817c9a8 100644
--- a/app/controllers/search_controller.rb
+++ b/app/controllers/search_controller.rb
@@ -1,11 +1,35 @@
class SearchController < ApplicationController
- def index
- @artists = LastFM::Artist.search(params[:q].to_s.lstrip, 8)
- @tracks = LastFM::Track.search(params[:q].to_s.lstrip, 24)
- @albums = LastFM::Album.search(params[:q].to_s.lstrip, 16)
+ @@limit = { artists: 5, tracks: 10, albums: 5 }
+
+ def show
+ @q = params[:id].to_s.lstrip
+
+ @artists = LastFM::Artist.search @q, @@limit[:artists]
+ @tracks = LastFM::Track.search @q, @@limit[:tracks]
+ @albums = LastFM::Album.search @q, @@limit[:albums]
LastFM::LastFMRequest.run_queue!
+
+ render :partial=>"show", :locals=>{
+ :artist=>@artist,
+ :tracks=>@tracks,
+ :albums=>@albums
+ }
end
+
+ def autocomplete
+ q = params[:q].to_s.lstrip
+ @artists = $sevendigital_client.artist.search q, { :pagesize=>5 }
+
+ render :partial=>"autocomplete", :locals=>{ :artists=>@artists }
+ end
+
+ def more_artists
+ @artists = LastFM::Artist.search params[:q].to_s.lstrip, @@limit[:artists], (params[:size].to_i / @@limit[:artists] + 1)
+ LastFM::LastFMRequest.run_queue!
+
+ render :partial=>"more_artists", :locals=>{:artists=>@artists}
+ end
end
\ No newline at end of file
diff --git a/app/controllers/tracks_controller.rb b/app/controllers/tracks_controller.rb
index 215cc97..08eed4a 100644
--- a/app/controllers/tracks_controller.rb
+++ b/app/controllers/tracks_controller.rb
@@ -2,4 +2,11 @@ class TracksController < ApplicationController
def index
end
+ def search_video
+
+ @video = @youtube_client.videos_by(:query => "#{CGI.unescape(params[:artist])} #{CGI.unescape(params[:track])} official", :page => 1, :per_page => 1, :order_by => "relevance")
+ @id = @video.videos.first.unique_id
+
+ render :partial=>"video_id", :locals=>{:id=>@id}
+ end
end
\ No newline at end of file
diff --git a/app/views/artists/_album_info.html.haml b/app/views/artists/_album_info.html.haml
new file mode 100644
index 0000000..d1265c1
--- /dev/null
+++ b/app/views/artists/_album_info.html.haml
@@ -0,0 +1 @@
+#album_box
-#%span
-# .headline
-# = image_tag validate_img_url(@album.image, "album", :large)
-# %h4
-# = @album.name
-# %br<>
-# %span= @album.artist
.wrap
- @album.tracks.track.each do |track|
%ul
%li
%span= track["@attr"].rank+"."
= track.name
- artist = track.artist.respond_to?(:name) ? track.artist.name : track.artist
\ No newline at end of file
diff --git a/app/views/artists/_more_albums.html.haml b/app/views/artists/_more_albums.html.haml
index 68581f9..2e76489 100644
--- a/app/views/artists/_more_albums.html.haml
+++ b/app/views/artists/_more_albums.html.haml
@@ -1,7 +1,8 @@
-- albums.album.each do |album|
- %li
+- @albums.album.each do |album|
+ - artist = album.artist.respond_to?(:name) ? album.artist.name : album.artist
+ %li{:album=>"#{CGI.escape(album.name)}",:artist=>"#{CGI.escape(artist)}"}
.img= image_tag validate_img_url(album.image, "album", :medium), :class=>"cover"
%p.name<
= trimString(album.name, 48)
%br<>
- %span.artist>= trimString(album.artist.name, 80)
\ No newline at end of file
+ %span.artist>= trimString(artist, 80)
\ No newline at end of file
diff --git a/app/views/artists/_more_tracks.html.haml b/app/views/artists/_more_tracks.html.haml
index 9cc8de7..ed48fe4 100644
--- a/app/views/artists/_more_tracks.html.haml
+++ b/app/views/artists/_more_tracks.html.haml
@@ -1,5 +1,6 @@
- @tracks.track.each do |track|
- %li
+ %li{:artist=>track.artist.name,:track=>track.name}
= track.name
%span by
- = link_to trimString(track.artist.name, 50), "#!/artists/#{CGI.escape(track.artist.name)}"
\ No newline at end of file
+ - artist = track.artist.respond_to?(:name) ? track.artist.name : track.artist
+ = link_to trimString(artist, 50), "#!/artists/#{CGI.escape(artist)}"
\ No newline at end of file
diff --git a/app/views/artists/_show.html.haml b/app/views/artists/_show.html.haml
index a8124c2..8e54022 100644
--- a/app/views/artists/_show.html.haml
+++ b/app/views/artists/_show.html.haml
@@ -12,7 +12,7 @@
.content
#artist_info
%h2 About
- =raw artist.bio.summary
+ =raw artist.bio.summary.empty? ? "No information available!" : artist.bio.summary
#artist_links
%ul
= image_tag "bing.png", :class=>"bing"
@@ -26,7 +26,7 @@
%li songs
%li albums
%li related
- .content{:artist=>"#{CGI.escape(artist.name)}"}
+ .content{:q=>"#{CGI.escape(artist.name)}"}
%div
%ul.list.songs.andmore{:tile=>"more_tracks"}
= render :partial=>"more_tracks", :locals=>{:tracks=>@tracks}
@@ -43,6 +43,7 @@
%span= "#{(artist.match.to_f*100).to_i}"
.img
= image_tag validate_img_url(artist.image, "artist", :extralarge), :alt=>artist.name, :title=>artist.name
+ %div.clean
:javascript
$(document).ready(function(){
diff --git a/app/views/layouts/_player.html.haml b/app/views/layouts/_player.html.haml
new file mode 100644
index 0000000..7447193
--- /dev/null
+++ b/app/views/layouts/_player.html.haml
@@ -0,0 +1,7 @@
+.player
+ = link_to image_tag("icons/player/backward.png"), "javascript:void(0);", :class=>"backward"
+ = link_to image_tag("icons/player/play.png"), "javascript:void(0);", :class=>"play"
+ = link_to image_tag("icons/player/forward.png"), "javascript:void(0);", :class=>"forward"
+ = link_to image_tag("icons/player/volume.png"), "javascript:void(0);", :class=>"volume"
+ = link_to image_tag("icons/player/repeat.png"), "javascript:void(0);", :class=>"repeat"
+ = link_to image_tag("icons/player/fullscreen.png"), "javascript:void(0);", :id=>"full"
\ No newline at end of file
diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml
index 2de736a..41421c8 100644
--- a/app/views/layouts/application.html.haml
+++ b/app/views/layouts/application.html.haml
@@ -3,12 +3,11 @@
%head
%title Nineminutes
= stylesheet_link_tag "9minutes"
- =# javascript_include_tag "http://www.google.com/jsapi"
+ = javascript_include_tag "http://www.google.com/jsapi"
= javascript_include_tag :defaults
= csrf_meta_tag
%body
- %a#full{:style=>"position:absolute;z-index:999;color:white;"} FULL
#loading Loading
#error Error
#block
@@ -23,16 +22,16 @@
=link_to "Sign Out", destroy_user_session_path
#head
%h1= link_to image_tag("nine-minutes.png"), "/#!/home"
+ = render :partial=>"layouts/player"
#navigation
%li.active= link_to "home", "/#!/home"
%li= link_to "charts", "/#!/charts"
%li= link_to "about", "#"
%li= link_to "register", "#"
%li.search
- = form_tag '/search', :method => 'get', :id => "search_form" do
+ = form_tag '/search', :method => 'get', :id => "search_form", :remote=>true do
= text_field_tag 'q', params[:q], :class => "text", :placeholder => "Search here ..."
- = link_to image_tag("icons/search-navi.png", :class=>"button"), "javascript:void(0);", :onclick=>"submit_redirect(this);"
- = submit_tag '', :class=>"submit", :name => nil
+ = link_to image_tag("icons/search-navi.png", :class=>"button"), "/#!/search"
%br.clean
#content
%br.clean
@@ -47,6 +46,32 @@
#fullscreen
%h2 Avril Lavigne
%h1 Alice (In Wonderland)
- = image_tag "examples/video-big.jpg", :class=>"left video"
+ #video Loading
.sidebar
- .player
\ No newline at end of file
+ .top
+ = render :partial=>"layouts/player"
+ %ul.play_list
+ %li
+ %h3
+ %div= "Firework"
+ %span= "Katie Perry"
+ %li
+ %h3
+ %div= "Firework"
+ %span= "Katie Perry"
+ %li
+ %h3
+ %div= "Firework"
+ %span= "Katie Perry"
+ %li
+ %h3
+ %div= "Firework"
+ %span= "Katie Perry"
+ %li
+ %h3
+ %div= "Firework"
+ %span= "Katie Perry"
+ %li
+ %h3
+ %div= "Firework"
+ %span= "Katie Perry"
\ No newline at end of file
diff --git a/app/views/search/_autocomplete.html.haml b/app/views/search/_autocomplete.html.haml
new file mode 100644
index 0000000..cf7b3ad
--- /dev/null
+++ b/app/views/search/_autocomplete.html.haml
@@ -0,0 +1,2 @@
+- @artists.each do |artist|
+ = artist.name
\ No newline at end of file
diff --git a/app/views/search/_more_artists.html.haml b/app/views/search/_more_artists.html.haml
new file mode 100644
index 0000000..5e2aec3
--- /dev/null
+++ b/app/views/search/_more_artists.html.haml
@@ -0,0 +1,8 @@
+- @artists.artist.each do |artist|
+ %li
+ - @link = "#!/artists/#{CGI.escape(artist.name)}"
+ .img= link_to image_tag(validate_img_url(artist.image, "artist", :large)), @link
+ .text
+ %h2= link_to artist.name, @link
+ %p
+ = artist.listeners+" Listeners"
\ No newline at end of file
diff --git a/app/views/search/_search_form.html.haml b/app/views/search/_search_form.html.haml
new file mode 100644
index 0000000..df58ab9
--- /dev/null
+++ b/app/views/search/_search_form.html.haml
@@ -0,0 +1,4 @@
+.box#search_bar
+ = form_tag '/search', :method => 'get', :id => "search_bar_form", :remote=>true do
+ = text_field_tag 'q', params[:q], :class => "text", :placeholder => "Search here ..."
+ = link_to image_tag("icons/search.png", :class=>"button"), "/#!/search"
\ No newline at end of file
diff --git a/app/views/search/_show.html.haml b/app/views/search/_show.html.haml
new file mode 100644
index 0000000..357b011
--- /dev/null
+++ b/app/views/search/_show.html.haml
@@ -0,0 +1,25 @@
+.tabs.tabs_js.w03
+ %ul.nav
+ %li artists
+ %li songs
+ %li albums
+ %li youtube
+ .content{:q=>"#{@q}"}
+ %div
+ = render :partial=>"sidebar/index"
+ = render :partial=>"search_form"
+ %ul.list.artists.andmore{:tile=>"more_artists"}
+ = render :partial=>"more_artists"
+ %div
+ = render :partial=>"sidebar/index"
+ = render :partial=>"search_form"
+ %ul.list.songs.andmore{:tile=>"more_tracks"}
+ = render :partial=>"artists/more_tracks"
+ %div
+ = render :partial=>"sidebar/index"
+ = render :partial=>"search_form"
+ %ul.list.albums.andmore{:tile=>"more_albums"}
+ = render :partial=>"artists/more_albums"
+ %div
+ = render :partial=>"sidebar/index"
+ = render :partial=>"search_form"
\ No newline at end of file
diff --git a/app/views/sidebar/_index.html.haml b/app/views/sidebar/_index.html.haml
index 47b45a8..5e09883 100644
--- a/app/views/sidebar/_index.html.haml
+++ b/app/views/sidebar/_index.html.haml
@@ -1,4 +1,4 @@
#sidebar
- .advertisment
+ .box.advertisment
%sup Advertisment
- = image_tag "advertisment-placeholder.png"
\ No newline at end of file
+ = image_tag "placeholder/advertisment.png"
\ No newline at end of file
diff --git a/app/views/tracks/_list.html.haml b/app/views/tracks/_list.html.haml
index 53e4f55..0fcd6e9 100644
--- a/app/views/tracks/_list.html.haml
+++ b/app/views/tracks/_list.html.haml
@@ -7,4 +7,4 @@
= image_tag "ico/play.png", :class=>"play", :videoid=>id.videos.first.unique_id
= image_tag "ico/add.png", :class=>"add"
%span= track.name
- = link_to trimString(track.artist, 50), artist_path(CGI.escape(track.artist))
\ No newline at end of file
+ = link_to trimString(track.artist, 50), "#!/artists/#{CGI.escape(track.artist)}"
\ No newline at end of file
diff --git a/app/views/tracks/_video_id.html.haml b/app/views/tracks/_video_id.html.haml
new file mode 100644
index 0000000..e382295
--- /dev/null
+++ b/app/views/tracks/_video_id.html.haml
@@ -0,0 +1 @@
+= @id
\ No newline at end of file
diff --git a/config/application.rb b/config/application.rb
index aad14a1..cb46f52 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -41,14 +41,21 @@ module Nineminutes
plugins/path
ajax/requests
ajax/routes
+ store
plugins/bing
plugins/coloranimations
plugins/nivoslider
plugins/imageresize
+ plugins/autocomplete
+ plugins/scrolling
+ plugins/player
animations/animations
animations/fullscreen
layout
+ player
ajax/loadmore
+ ajax/album
+ search
)
# Configure the default encoding used in templates for Ruby 1.9.
diff --git a/config/initializers/sevendigital.rb b/config/initializers/sevendigital.rb
index 52699c2..0de5f5f 100644
--- a/config/initializers/sevendigital.rb
+++ b/config/initializers/sevendigital.rb
@@ -1 +1 @@
-#require "sevendigital"
#$sevendigital_client = Sevendigital::Client.new("config/sevendigital.yml", :country => "US")
\ No newline at end of file
+require "sevendigital"
$sevendigital_client = Sevendigital::Client.new("config/sevendigital.yml", :country => "US")
\ No newline at end of file
diff --git a/config/routes.rb b/config/routes.rb
index 4d33ff0..a0194b6 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -14,13 +14,18 @@ Nineminutes::Application.routes.draw do
match "/artists/:artist", :to => "artists#show"
match "/more_tracks", :to => "artists#more_tracks"
match "/more_albums", :to => "artists#more_albums"
+ match "/more_artists", :to => "search#more_artists"
match "/more_charts", :to => "charts#more"
get "artists/", :to => "artists#index"
+ match "/autocomplete", :to => "search#autocomplete"
+ match "/album_info", :to => "artists#album_info"
+ match "/search_video", :to => "tracks#search_video"
+
#resources :artists, :constraints => { :id => /.*/ }
- resources :search
resources :users
resources :sidebar
+ resources :search
get "home/", :to => "home#show"
diff --git a/public/.sass-cache/1309dacbc55d6dce7d378b0f7d2fbb9c912bce2e/9minutes.scssc b/public/.sass-cache/1309dacbc55d6dce7d378b0f7d2fbb9c912bce2e/9minutes.scssc
index d0ece72..a8dfc75 100644
Binary files a/public/.sass-cache/1309dacbc55d6dce7d378b0f7d2fbb9c912bce2e/9minutes.scssc and b/public/.sass-cache/1309dacbc55d6dce7d378b0f7d2fbb9c912bce2e/9minutes.scssc differ
diff --git a/public/.sass-cache/1309dacbc55d6dce7d378b0f7d2fbb9c912bce2e/_album.scssc b/public/.sass-cache/1309dacbc55d6dce7d378b0f7d2fbb9c912bce2e/_album.scssc
new file mode 100644
index 0000000..179c343
Binary files /dev/null and b/public/.sass-cache/1309dacbc55d6dce7d378b0f7d2fbb9c912bce2e/_album.scssc differ
diff --git a/public/.sass-cache/1309dacbc55d6dce7d378b0f7d2fbb9c912bce2e/_artist.scssc b/public/.sass-cache/1309dacbc55d6dce7d378b0f7d2fbb9c912bce2e/_artist.scssc
index 7e3ef7f..08faaad 100644
Binary files a/public/.sass-cache/1309dacbc55d6dce7d378b0f7d2fbb9c912bce2e/_artist.scssc and b/public/.sass-cache/1309dacbc55d6dce7d378b0f7d2fbb9c912bce2e/_artist.scssc differ
diff --git a/public/.sass-cache/1309dacbc55d6dce7d378b0f7d2fbb9c912bce2e/_autocomplete.scssc b/public/.sass-cache/1309dacbc55d6dce7d378b0f7d2fbb9c912bce2e/_autocomplete.scssc
new file mode 100644
index 0000000..99f7b24
Binary files /dev/null and b/public/.sass-cache/1309dacbc55d6dce7d378b0f7d2fbb9c912bce2e/_autocomplete.scssc differ
diff --git a/public/.sass-cache/1309dacbc55d6dce7d378b0f7d2fbb9c912bce2e/_charts.scssc b/public/.sass-cache/1309dacbc55d6dce7d378b0f7d2fbb9c912bce2e/_charts.scssc
index 3e7b150..f42ccf9 100644
Binary files a/public/.sass-cache/1309dacbc55d6dce7d378b0f7d2fbb9c912bce2e/_charts.scssc and b/public/.sass-cache/1309dacbc55d6dce7d378b0f7d2fbb9c912bce2e/_charts.scssc differ
diff --git a/public/.sass-cache/1309dacbc55d6dce7d378b0f7d2fbb9c912bce2e/_fullscreen.scssc b/public/.sass-cache/1309dacbc55d6dce7d378b0f7d2fbb9c912bce2e/_fullscreen.scssc
index 15f84ca..5661e82 100644
Binary files a/public/.sass-cache/1309dacbc55d6dce7d378b0f7d2fbb9c912bce2e/_fullscreen.scssc and b/public/.sass-cache/1309dacbc55d6dce7d378b0f7d2fbb9c912bce2e/_fullscreen.scssc differ
diff --git a/public/.sass-cache/1309dacbc55d6dce7d378b0f7d2fbb9c912bce2e/_layout.scssc b/public/.sass-cache/1309dacbc55d6dce7d378b0f7d2fbb9c912bce2e/_layout.scssc
index c6f14ea..3652e9c 100644
Binary files a/public/.sass-cache/1309dacbc55d6dce7d378b0f7d2fbb9c912bce2e/_layout.scssc and b/public/.sass-cache/1309dacbc55d6dce7d378b0f7d2fbb9c912bce2e/_layout.scssc differ
diff --git a/public/.sass-cache/1309dacbc55d6dce7d378b0f7d2fbb9c912bce2e/_lists.scssc b/public/.sass-cache/1309dacbc55d6dce7d378b0f7d2fbb9c912bce2e/_lists.scssc
index 42b6fa9..f0ac477 100644
Binary files a/public/.sass-cache/1309dacbc55d6dce7d378b0f7d2fbb9c912bce2e/_lists.scssc and b/public/.sass-cache/1309dacbc55d6dce7d378b0f7d2fbb9c912bce2e/_lists.scssc differ
diff --git a/public/.sass-cache/1309dacbc55d6dce7d378b0f7d2fbb9c912bce2e/_player.scssc b/public/.sass-cache/1309dacbc55d6dce7d378b0f7d2fbb9c912bce2e/_player.scssc
new file mode 100644
index 0000000..16e9d19
Binary files /dev/null and b/public/.sass-cache/1309dacbc55d6dce7d378b0f7d2fbb9c912bce2e/_player.scssc differ
diff --git a/public/.sass-cache/1309dacbc55d6dce7d378b0f7d2fbb9c912bce2e/_scrolling.scssc b/public/.sass-cache/1309dacbc55d6dce7d378b0f7d2fbb9c912bce2e/_scrolling.scssc
new file mode 100644
index 0000000..9c15d14
Binary files /dev/null and b/public/.sass-cache/1309dacbc55d6dce7d378b0f7d2fbb9c912bce2e/_scrolling.scssc differ
diff --git a/public/.sass-cache/1309dacbc55d6dce7d378b0f7d2fbb9c912bce2e/_search.scssc b/public/.sass-cache/1309dacbc55d6dce7d378b0f7d2fbb9c912bce2e/_search.scssc
new file mode 100644
index 0000000..592fc0e
Binary files /dev/null and b/public/.sass-cache/1309dacbc55d6dce7d378b0f7d2fbb9c912bce2e/_search.scssc differ
diff --git a/public/.sass-cache/1309dacbc55d6dce7d378b0f7d2fbb9c912bce2e/_sidebar.scssc b/public/.sass-cache/1309dacbc55d6dce7d378b0f7d2fbb9c912bce2e/_sidebar.scssc
index d9d2ad4..51c55ef 100644
Binary files a/public/.sass-cache/1309dacbc55d6dce7d378b0f7d2fbb9c912bce2e/_sidebar.scssc and b/public/.sass-cache/1309dacbc55d6dce7d378b0f7d2fbb9c912bce2e/_sidebar.scssc differ
diff --git a/public/images/backgrounds/overall.png b/public/images/backgrounds/overall.png
index a1a6912..7249486 100644
Binary files a/public/images/backgrounds/overall.png and b/public/images/backgrounds/overall.png differ
diff --git a/public/images/icons/arrow.png b/public/images/icons/arrow.png
new file mode 100644
index 0000000..ca3be99
Binary files /dev/null and b/public/images/icons/arrow.png differ
diff --git a/public/images/icons/player/backward.png b/public/images/icons/player/backward.png
new file mode 100644
index 0000000..a5040aa
Binary files /dev/null and b/public/images/icons/player/backward.png differ
diff --git a/public/images/icons/player/forward.png b/public/images/icons/player/forward.png
new file mode 100644
index 0000000..cdca4c1
Binary files /dev/null and b/public/images/icons/player/forward.png differ
diff --git a/public/images/icons/player/fullscreen.png b/public/images/icons/player/fullscreen.png
new file mode 100644
index 0000000..3a29e77
Binary files /dev/null and b/public/images/icons/player/fullscreen.png differ
diff --git a/public/images/icons/player/play.png b/public/images/icons/player/play.png
new file mode 100644
index 0000000..87dac19
Binary files /dev/null and b/public/images/icons/player/play.png differ
diff --git a/public/images/icons/player/repeat.png b/public/images/icons/player/repeat.png
new file mode 100644
index 0000000..8314e13
Binary files /dev/null and b/public/images/icons/player/repeat.png differ
diff --git a/public/images/icons/player/volume.png b/public/images/icons/player/volume.png
new file mode 100644
index 0000000..a8131ae
Binary files /dev/null and b/public/images/icons/player/volume.png differ
diff --git a/public/images/icons/search.png b/public/images/icons/search.png
new file mode 100644
index 0000000..f7ef6dc
Binary files /dev/null and b/public/images/icons/search.png differ
diff --git a/public/images/placeholder/advertisment.png b/public/images/placeholder/advertisment.png
new file mode 100644
index 0000000..dfa1c39
Binary files /dev/null and b/public/images/placeholder/advertisment.png differ
diff --git a/public/images/placeholder/artist-big.png b/public/images/placeholder/artist-big.png
new file mode 100644
index 0000000..89c2da0
Binary files /dev/null and b/public/images/placeholder/artist-big.png differ
diff --git a/public/images/placeholder/artist.png b/public/images/placeholder/artist.png
new file mode 100644
index 0000000..bc9a0b6
Binary files /dev/null and b/public/images/placeholder/artist.png differ
diff --git a/public/images/placeholder/related.png b/public/images/placeholder/related.png
new file mode 100644
index 0000000..73ee510
Binary files /dev/null and b/public/images/placeholder/related.png differ
diff --git a/public/javascripts/ajax/album.js b/public/javascripts/ajax/album.js
new file mode 100644
index 0000000..5dee1a2
--- /dev/null
+++ b/public/javascripts/ajax/album.js
@@ -0,0 +1,34 @@
+
+function load_songs_from_album(obj){
+ if($(obj).attr("loaded") == "true")
+ {
+ $('#album_box').fadeOut(200);
+ $(obj).removeAttr("loaded");
+ }
+ else
+ {
+ $(obj).parent().parent().children().each(function(){
+ $(this).children("a").removeAttr("loaded");
+ });
+ $(obj).attr("loaded", "true");
+ artist = $(obj).parent().attr("artist");
+ album = $(obj).parent().attr("album");
+
+ url = "/album_info";
+ params = "artist="+artist+"&album="+album;
+
+ album_request(url, params, obj);
+ }
+}
+
+function show_songs_from_album(data, obj){
+ $('#album_box').remove();
+ $(obj).parent().prepend(data);
+ $('#album_box').fadeIn(200);
+ $('#album_box .wrap').jScrollPane();
+
+ $('#album_box li').each(function(){
+ if(!$(this).has(".play").length)
+ $(this).prepend('');
+ });
+}
\ No newline at end of file
diff --git a/public/javascripts/ajax/loadmore.js b/public/javascripts/ajax/loadmore.js
index 69fb1b1..07aa490 100644
--- a/public/javascripts/ajax/loadmore.js
+++ b/public/javascripts/ajax/loadmore.js
@@ -17,11 +17,12 @@ function loadmore(obj){
size = $(obj).parent().find('li').size();
tile = $(obj).parent().children('.list').attr("tile");
artist = $(obj).parent().parent(".content").attr("artist");
+ q = $(obj).parent().parent(".content").attr("q");
disable_more_button(obj);
url = "/"+tile;
- params = "size="+size+"&artist="+artist;
+ params = "size="+size+"&artist="+artist+"&q="+q;
load_more_request(url, params);
}
diff --git a/public/javascripts/ajax/requests.js b/public/javascripts/ajax/requests.js
index 4f639ba..8a08717 100644
--- a/public/javascripts/ajax/requests.js
+++ b/public/javascripts/ajax/requests.js
@@ -16,6 +16,7 @@
}
function load_site_request(link, params){
+ hide_flash(true);
$.ajax({
type:"GET",
dataType:"html",
@@ -33,4 +34,39 @@ function load_site_request(link, params){
});
}
});
+}
+
+function album_request(link, params, obj){
+ hide_flash(true);
+ $.ajax({
+ type: "GET",
+ dataType: "html",
+ url: link,
+ data: params,
+ error: function(){
+ hide_flash(false);
+ show_flash(true);
+ //enable_more_button();
+ },
+ success: function(data){
+ show_songs_from_album(data, obj);
+ }
+ });
+}
+
+function video_request(link, params, obj){
+ $.ajax({
+ type: "GET",
+ dataType: "html",
+ url: link,
+ data: params,
+ error: function(){
+ hide_flash(false);
+ show_flash(true);
+ //enable_more_button();
+ },
+ success: function(data){
+ playTrack(data, obj);
+ }
+ });
}
\ No newline at end of file
diff --git a/public/javascripts/ajax/routes.js b/public/javascripts/ajax/routes.js
index 3ad256f..637f179 100644
--- a/public/javascripts/ajax/routes.js
+++ b/public/javascripts/ajax/routes.js
@@ -17,4 +17,10 @@ $(document).ready(function(){
show_flash(false);
load_site_request(charts_path, "");
});
+
+ // Search Page
+ Path.map(hashbang+search_path+":q").to(function(){
+ show_flash(false);
+ load_site_request(search_path, this.params['q']);
+ });
});
\ No newline at end of file
diff --git a/public/javascripts/animations/animations.js b/public/javascripts/animations/animations.js
index 3df729d..9df9b9f 100644
--- a/public/javascripts/animations/animations.js
+++ b/public/javascripts/animations/animations.js
@@ -40,4 +40,14 @@ function more_hover_out(obj){
backgroundColor: "#f4f6f9",
color: "#15191d"
}, 100);
+}
+
+function init_playlist_scrollbar(){
+ $('#fullscreen .play_list').jScrollPane();
+
+ $('#fullscreen .play_list').hover(function(){
+ $('#fullscreen .jspVerticalBar').stop().fadeTo(300, 1);
+ }, function(){
+ $('#fullscreen .jspVerticalBar').stop().fadeTo(200, 0.02);
+ });
}
\ No newline at end of file
diff --git a/public/javascripts/animations/fullscreen.js b/public/javascripts/animations/fullscreen.js
index 33cf40f..bdc370f 100644
--- a/public/javascripts/animations/fullscreen.js
+++ b/public/javascripts/animations/fullscreen.js
@@ -2,11 +2,11 @@
$('#full').live("click",function(){
if($(this).hasClass("open")) {
$("#fullscreen").animate({
- marginTop: 700,
+ marginTop: -300,
opacity: 0
}, 500, function(){
$(this).hide();
- $("#site, #bg_stripe").animate({
+ $("#site, #bg_stripe").show().animate({
marginTop: 0,
opacity: 1
}, 500);
@@ -16,13 +16,15 @@
}
else {
$("#site, #bg_stripe").animate({
- marginTop: -700,
+ marginTop: 400,
opacity: 0
}, 500, function(){
- $("#fullscreen").css("marginTop", 700).show().animate({
+ $(this).hide();
+ $("#fullscreen").css("marginTop", -100).show().animate({
marginTop: 120,
opacity: 1
}, 500);
+ init_playlist_scrollbar();
$("#fullscreen_wrap").fadeTo(1000, 0.5);
});
$(this).addClass("open");
diff --git a/public/javascripts/config.js b/public/javascripts/config.js
index e8cc93f..c575a2d 100644
--- a/public/javascripts/config.js
+++ b/public/javascripts/config.js
@@ -5,6 +5,8 @@ const hashbang = "#!";
const artist_path = "/artists/";
const home_path = "/home";
const charts_path = "/charts";
+const search_path = "/search/";
+const search_autocomplete_path = "/autocomplete/";
$(document).ready(function(){
Path.root(hashbang+home_path);
diff --git a/public/javascripts/layout.js b/public/javascripts/layout.js
index 70a50cd..ccdc6b5 100644
--- a/public/javascripts/layout.js
+++ b/public/javascripts/layout.js
@@ -54,8 +54,8 @@ function submit_redirect(obj){
function add_controls(){
$('.list.songs').each(function(){
$(this).children("li").each(function(){
- if(!$(this).has(".play").length)
- $(this).prepend('');
+ if(!$(this).has(".playsong").length)
+ $(this).prepend('');
});
});
}
@@ -112,7 +112,8 @@ function new_albums(){
function album_hover(){
$('.albums .img').hover(function(){
- $(this).append('
');
+ if(!$(this).children(".playall").hasClass("playall"))
+ $(this).append('');
$(this).find('.playall').fadeIn(200);
}, function(){
$(this).find('.playall').stop().fadeOut(300, function(){ $(this).remove(); });
@@ -120,15 +121,16 @@ function album_hover(){
}
function album_add_show_songs_button(){
- $('.albums li').each(function(){
+ $('.albums > li').each(function(){
if(!$(this).has(".songsbtn").length)
- $(this).append('Songs');
+ $(this).append('Songs');
});
}
function init_site(link){
Path.listen();
+ onYouTubePlayerReady();
switch(link) {
case artist_path:
@@ -143,10 +145,14 @@ function init_site(link){
set_active_navigation(home_path);
break;
case charts_path:
+ case search_path:
init_tabs();
add_more_button();
+ add_controls();
+ init_autocomplete();
set_active_navigation(charts_path);
break;
+
}
}
diff --git a/public/javascripts/player.js b/public/javascripts/player.js
new file mode 100644
index 0000000..4c7f2bb
--- /dev/null
+++ b/public/javascripts/player.js
@@ -0,0 +1,116 @@
+$(document).ready(function(){
+ loadPlayer();
+ initPlaylist();
+ makeTracksAddable(); // bind click-event to "add" button (for each track)
+ initPlayer();
+ initPlayTrack();
+});
+
+
+function initPlayer(){
+ $('.play').live('click', function(){
+ if($(this).hasClass('pause')) pauseVideo();
+ else playVideo();
+
+ $(this).toggleClass('pause');
+ });
+}
+
+
+function initPlayTrack(){
+ $('.playsong').live('click',function(){
+ url = "/search_video";
+ params = "artist="+$(this).parents('li').attr("artist")+"&track="+$(this).parents('li').attr("track");
+ video_request(url, params, this);
+ });
+}
+
+function playTrack(data, obj){
+ loadVideo(data);
+ $('#fullscreen h2').text($(obj).parents('li').attr("artist"));
+ $('#fullscreen h1').text($(obj).parents('li').attr("track"));
+}
+
+
+function initPlaylist() {
+ // TODO: reload Playlist form localStorage
+ storage = $.store.get("9minutesPlaylist");
+ if(storage !== undefined) {
+ size = storage.length;
+ for(i = 0; i < size; i++) {
+ $('.play_list').append(''+ storage[i].title + '
' + storage[i].artist + '');
+ $listElement = $('.play_list li:eq('+i+')');
+ //$listElement.prepend('
');
+ //$listElement.append('
');
+ }
+ }
+/*
+ $('ul#playlist').dragsort({
+ dragSelector: '.drag-handle',
+ dragEnd: savePlaylist,
+ placeHolderTemplate: '',
+ scrollContainer: '#playlist-container'
+ });
+
+ $('#playlist .delete-handle').live("click", onRemoveTrackFromPlaylist);
+
+ $('#player #icons .playlist').live("click", function(){
+ $('#playlist-container').toggle();
+ });
+
+ $('#playlist-navigation .clear').live('click', function(){
+ $('#playlist li').remove();
+ $.store.clear();
+ });*/
+}
+
+function savePlaylist() {
+ var tracks = [];
+ $('.play_list li').each(function(i) {
+ tracks[i] = {
+ title : $(this).attr("track"), // TODO
+ artist : $(this).attr("artist"),
+ videoid : $(this).attr('videoid')
+ }
+ });
+
+ //console.log(tracks);
+ $.store.set("9minutesPlaylist", tracks);
+ //console.log("playlist saved ;)");
+}
+
+function makeTracksAddable() {
+ $('.add').live("click", onAddTrackToPlaylist);
+}
+
+function onAddTrackToPlaylist(event) {
+ // if already in playlist
+ $listElement = $(event.target).parents('li').clone(); // TODO
+ $vuid = $listElement.children('.play').attr('videoid');
+
+
+ if ($('#playlist li[videoid='+$vuid+']').html() != null)
+ {
+ alert("Already in playlist!");
+ return;
+ }
+
+ $listElement.children('img').remove();
+ $listElement.attr('data-itemidx', 0); // important for dragsort plugin
+ $listElement.attr('videoid', $vuid);
+ // $listElement.prepend('
');
+ // $listElement.append('
');
+ $listElement.appendTo('#playlist');
+
+ savePlaylist();
+}
+
+function onRemoveTrackFromPlaylist(event) {
+ $listElement = $(event.target).parent();
+ $listElement.fadeTo(300, 0.1, function() {
+ $(this).hide("blind", function() {
+ $(this).remove();
+ savePlaylist();
+ });
+ });
+}
\ No newline at end of file
diff --git a/public/javascripts/plugins/autocomplete.js b/public/javascripts/plugins/autocomplete.js
new file mode 100644
index 0000000..73ccbb6
--- /dev/null
+++ b/public/javascripts/plugins/autocomplete.js
@@ -0,0 +1,843 @@
+/*
+ * jQuery Autocomplete plugin 1.2.1
+ *
+ * Copyright (c) 2009 Jörn Zaefferer
+ *
+ * Dual licensed under the MIT and GPL licenses:
+ * http://www.opensource.org/licenses/mit-license.php
+ * http://www.gnu.org/licenses/gpl.html
+ *
+ * With small modifications by Alfonso Gómez-Arzola.
+ * See changelog for details.
+ *
+ */
+
+;(function($) {
+
+$.fn.extend({
+ autocomplete: function(urlOrData, options) {
+ var isUrl = typeof urlOrData == "string";
+ options = $.extend({}, $.Autocompleter.defaults, {
+ url: isUrl ? urlOrData : null,
+ data: isUrl ? null : urlOrData,
+ delay: isUrl ? $.Autocompleter.defaults.delay : 10,
+ max: options && !options.scroll ? 10 : 150
+ }, options);
+
+ // if highlight is set to false, replace it with a do-nothing function
+ options.highlight = options.highlight || function(value) { return value; };
+
+ // if the formatMatch option is not specified, then use formatItem for backwards compatibility
+ options.formatMatch = options.formatMatch || options.formatItem;
+
+ return this.each(function() {
+ new $.Autocompleter(this, options);
+ });
+ },
+ result: function(handler) {
+ return this.bind("result", handler);
+ },
+ search: function(handler) {
+ return this.trigger("search", [handler]);
+ },
+ flushCache: function() {
+ return this.trigger("flushCache");
+ },
+ setOptions: function(options){
+ return this.trigger("setOptions", [options]);
+ },
+ unautocomplete: function() {
+ return this.trigger("unautocomplete");
+ }
+});
+
+$.Autocompleter = function(input, options) {
+
+ var KEY = {
+ UP: 38,
+ DOWN: 40,
+ DEL: 46,
+ TAB: 9,
+ RETURN: 13,
+ ESC: 27,
+ COMMA: 188,
+ PAGEUP: 33,
+ PAGEDOWN: 34,
+ BACKSPACE: 8
+ };
+
+ var globalFailure = null;
+ if(options.failure != null && typeof options.failure == "function") {
+ globalFailure = options.failure;
+ }
+
+ // Create $ object for input element
+ var $input = $(input).attr("autocomplete", "off").addClass(options.inputClass);
+
+ var timeout;
+ var previousValue = "";
+ var cache = $.Autocompleter.Cache(options);
+ var hasFocus = 0;
+ var lastKeyPressCode;
+ var config = {
+ mouseDownOnSelect: false
+ };
+ var select = $.Autocompleter.Select(options, input, selectCurrent, config);
+
+ var blockSubmit;
+
+ // prevent form submit in opera when selecting with return key
+ $.browser.opera && $(input.form).bind("submit.autocomplete", function() {
+ if (blockSubmit) {
+ blockSubmit = false;
+ return false;
+ }
+ });
+
+ // only opera doesn't trigger keydown multiple times while pressed, others don't work with keypress at all
+ $input.bind(($.browser.opera ? "keypress" : "keydown") + ".autocomplete", function(event) {
+ // a keypress means the input has focus
+ // avoids issue where input had focus before the autocomplete was applied
+ hasFocus = 1;
+ // track last key pressed
+ lastKeyPressCode = event.keyCode;
+ switch(event.keyCode) {
+
+ case KEY.UP:
+ if ( select.visible() ) {
+ event.preventDefault();
+ select.prev();
+ } else {
+ onChange(0, true);
+ }
+ break;
+
+ case KEY.DOWN:
+ if ( select.visible() ) {
+ event.preventDefault();
+ select.next();
+ } else {
+ onChange(0, true);
+ }
+ break;
+
+ case KEY.PAGEUP:
+ if ( select.visible() ) {
+ event.preventDefault();
+ select.pageUp();
+ } else {
+ onChange(0, true);
+ }
+ break;
+
+ case KEY.PAGEDOWN:
+ if ( select.visible() ) {
+ event.preventDefault();
+ select.pageDown();
+ } else {
+ onChange(0, true);
+ }
+ break;
+
+ // matches also semicolon
+ case options.multiple && $.trim(options.multipleSeparator) == "," && KEY.COMMA:
+ case KEY.TAB:
+ case KEY.RETURN:
+ if( selectCurrent() ) {
+ // stop default to prevent a form submit, Opera needs special handling
+ event.preventDefault();
+ blockSubmit = true;
+ return false;
+ }
+ break;
+
+ case KEY.ESC:
+ select.hide();
+ break;
+
+ default:
+ clearTimeout(timeout);
+ timeout = setTimeout(onChange, options.delay);
+ break;
+ }
+ }).focus(function(){
+ // track whether the field has focus, we shouldn't process any
+ // results if the field no longer has focus
+ hasFocus++;
+ }).blur(function() {
+ hasFocus = 0;
+ if (!config.mouseDownOnSelect) {
+ hideResults();
+ }
+ }).click(function() {
+ // show select when clicking in a focused field
+ // but if clickFire is true, don't require field
+ // to be focused to begin with; just show select
+ if( options.clickFire ) {
+ if ( !select.visible() ) {
+ onChange(0, true);
+ }
+ } else {
+ if ( hasFocus++ > 1 && !select.visible() ) {
+ onChange(0, true);
+ }
+ }
+ }).bind("search", function() {
+ // TODO why not just specifying both arguments?
+ var fn = (arguments.length > 1) ? arguments[1] : null;
+ function findValueCallback(q, data) {
+ var result;
+ if( data && data.length ) {
+ for (var i=0; i < data.length; i++) {
+ if( data[i].result.toLowerCase() == q.toLowerCase() ) {
+ result = data[i];
+ break;
+ }
+ }
+ }
+ if( typeof fn == "function" ) fn(result);
+ else $input.trigger("result", result && [result.data, result.value]);
+ }
+ $.each(trimWords($input.val()), function(i, value) {
+ request(value, findValueCallback, findValueCallback);
+ });
+ }).bind("flushCache", function() {
+ cache.flush();
+ }).bind("setOptions", function() {
+ $.extend(true, options, arguments[1]);
+ // if we've updated the data, repopulate
+ if ( "data" in arguments[1] )
+ cache.populate();
+ }).bind("unautocomplete", function() {
+ select.unbind();
+ $input.unbind();
+ $(input.form).unbind(".autocomplete");
+ });
+
+
+ function selectCurrent() {
+ var selected = select.selected();
+ if( !selected )
+ return false;
+
+ var v = selected.result;
+ previousValue = v;
+
+ if ( options.multiple ) {
+ var words = trimWords($input.val());
+ if ( words.length > 1 ) {
+ var seperator = options.multipleSeparator.length;
+ var cursorAt = $(input).selection().start;
+ var wordAt, progress = 0;
+ $.each(words, function(i, word) {
+ progress += word.length;
+ if (cursorAt <= progress) {
+ wordAt = i;
+ return false;
+ }
+ progress += seperator;
+ });
+ words[wordAt] = v;
+ // TODO this should set the cursor to the right position, but it gets overriden somewhere
+ //$.Autocompleter.Selection(input, progress + seperator, progress + seperator);
+ v = words.join( options.multipleSeparator );
+ }
+ v += options.multipleSeparator;
+ }
+
+ $input.val(v);
+ hideResultsNow();
+ $input.trigger("result", [selected.data, selected.value]);
+ return true;
+ }
+
+ function onChange(crap, skipPrevCheck) {
+ if( lastKeyPressCode == KEY.DEL ) {
+ select.hide();
+ return;
+ }
+
+ var currentValue = $input.val();
+
+ if ( !skipPrevCheck && currentValue == previousValue )
+ return;
+
+ previousValue = currentValue;
+
+ currentValue = lastWord(currentValue);
+ if ( currentValue.length >= options.minChars) {
+ $input.addClass(options.loadingClass);
+ if (!options.matchCase)
+ currentValue = currentValue.toLowerCase();
+ request(currentValue, receiveData, hideResultsNow);
+ } else {
+ stopLoading();
+ select.hide();
+ }
+ $inval = escape($input.val());
+ $input.next("a").attr("href", hashbang+search_path+$inval);
+ };
+
+ function trimWords(value) {
+ if (!value)
+ return [""];
+ if (!options.multiple)
+ return [$.trim(value)];
+ return $.map(value.split(options.multipleSeparator), function(word) {
+ return $.trim(value).length ? $.trim(word) : null;
+ });
+ }
+
+ function lastWord(value) {
+ if ( !options.multiple )
+ return value;
+ var words = trimWords(value);
+ if (words.length == 1)
+ return words[0];
+ var cursorAt = $(input).selection().start;
+ if (cursorAt == value.length) {
+ words = trimWords(value)
+ } else {
+ words = trimWords(value.replace(value.substring(cursorAt), ""));
+ }
+ return words[words.length - 1];
+ }
+
+ // fills in the input box w/the first match (assumed to be the best match)
+ // q: the term entered
+ // sValue: the first matching result
+ function autoFill(q, sValue){
+ // autofill in the complete box w/the first match as long as the user hasn't entered in more data
+ // if the last user key pressed was backspace, don't autofill
+ if( options.autoFill && (lastWord($input.val()).toLowerCase() == q.toLowerCase()) && lastKeyPressCode != KEY.BACKSPACE ) {
+ // fill in the value (keep the case the user has typed)
+ $input.val($input.val() + sValue.substring(lastWord(previousValue).length));
+ // select the portion of the value not typed by the user (so the next character will erase)
+ $(input).selection(previousValue.length, previousValue.length + sValue.length);
+ }
+ };
+
+ function hideResults() {
+ clearTimeout(timeout);
+ timeout = setTimeout(hideResultsNow, 200);
+ };
+
+ function hideResultsNow() {
+ var wasVisible = select.visible();
+ select.hide();
+ clearTimeout(timeout);
+ stopLoading();
+ if (options.mustMatch) {
+ // call search and run callback
+ $input.search(
+ function (result){
+ // if no value found, clear the input box
+ if( !result ) {
+ if (options.multiple) {
+ var words = trimWords($input.val()).slice(0, -1);
+ $input.val( words.join(options.multipleSeparator) + (words.length ? options.multipleSeparator : "") );
+ }
+ else {
+ $input.val( "" );
+ $input.trigger("result", null);
+ }
+ }
+ }
+ );
+ }
+ };
+
+ function receiveData(q, data) {
+ if ( data && data.length && hasFocus ) {
+ stopLoading();
+ select.display(data, q);
+ autoFill(q, data[0].value);
+ select.show();
+ } else {
+ hideResultsNow();
+ }
+ };
+
+ function request(term, success, failure) {
+ if (!options.matchCase)
+ term = term.toLowerCase();
+ var data = cache.load(term);
+ // recieve the cached data
+ if (data && data.length) {
+ success(term, data);
+ // if an AJAX url has been supplied, try loading the data now
+ } else if( (typeof options.url == "string") && (options.url.length > 0) ){
+
+ var extraParams = {
+ timestamp: +new Date()
+ };
+ $.each(options.extraParams, function(key, param) {
+ extraParams[key] = typeof param == "function" ? param() : param;
+ });
+
+ $.ajax({
+ // try to leverage ajaxQueue plugin to abort previous requests
+ mode: "abort",
+ // limit abortion to this input
+ port: "autocomplete" + input.name,
+ dataType: options.dataType,
+ url: options.url,
+ data: $.extend({
+ q: lastWord(term),
+ limit: options.max
+ }, extraParams),
+ success: function(data) {
+ var parsed = options.parse && options.parse(data) || parse(data);
+ cache.add(term, parsed);
+ success(term, parsed);
+ }
+ });
+ } else {
+ // if we have a failure, we need to empty the list -- this prevents the the [TAB] key from selecting the last successful match
+ select.emptyList();
+ if(globalFailure != null) {
+ globalFailure();
+ }
+ else {
+ failure(term);
+ }
+ }
+ };
+
+ function parse(data) {
+ var parsed = [];
+ var rows = data.split("\n");
+ for (var i=0; i < rows.length; i++) {
+ var row = $.trim(rows[i]);
+ if (row) {
+ row = row.split("|");
+ parsed[parsed.length] = {
+ data: row,
+ value: row[0],
+ result: options.formatResult && options.formatResult(row, row[0]) || row[0]
+ };
+ }
+ }
+ return parsed;
+ };
+
+ function stopLoading() {
+ $input.removeClass(options.loadingClass);
+ };
+
+};
+
+$.Autocompleter.defaults = {
+ inputClass: "ac_input",
+ resultsClass: "ac_results",
+ loadingClass: "ac_loading",
+ minChars: 1,
+ delay: 400,
+ matchCase: false,
+ matchSubset: true,
+ matchContains: false,
+ cacheLength: 100,
+ max: 1000,
+ mustMatch: false,
+ extraParams: {},
+ selectFirst: true,
+ formatItem: function(row) { return row[0]; },
+ formatMatch: null,
+ autoFill: false,
+ width: 0,
+ multiple: false,
+ multipleSeparator: " ",
+ inputFocus: true,
+ clickFire: false,
+ highlight: function(value, term) {
+ return value.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)(" + term.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi, "\\$1") + ")(?![^<>]*>)(?![^&;]+;)", "gi"), "$1");
+ },
+ scroll: true,
+ scrollHeight: 180,
+ scrollJumpPosition: true
+};
+
+$.Autocompleter.Cache = function(options) {
+
+ var data = {};
+ var length = 0;
+
+ function matchSubset(s, sub) {
+ if (!options.matchCase)
+ s = s.toLowerCase();
+ var i = s.indexOf(sub);
+ if (options.matchContains == "word"){
+ i = s.toLowerCase().search("\\b" + sub.toLowerCase());
+ }
+ if (i == -1) return false;
+ return i == 0 || options.matchContains;
+ };
+
+ function add(q, value) {
+ if (length > options.cacheLength){
+ flush();
+ }
+ if (!data[q]){
+ length++;
+ }
+ data[q] = value;
+ }
+
+ function populate(){
+ if( !options.data ) return false;
+ // track the matches
+ var stMatchSets = {},
+ nullData = 0;
+
+ // no url was specified, we need to adjust the cache length to make sure it fits the local data store
+ if( !options.url ) options.cacheLength = 1;
+
+ // track all options for minChars = 0
+ stMatchSets[""] = [];
+
+ // loop through the array and create a lookup structure
+ for ( var i = 0, ol = options.data.length; i < ol; i++ ) {
+ var rawValue = options.data[i];
+ // if rawValue is a string, make an array otherwise just reference the array
+ rawValue = (typeof rawValue == "string") ? [rawValue] : rawValue;
+
+ var value = options.formatMatch(rawValue, i+1, options.data.length);
+ if ( value === false )
+ continue;
+
+ var firstChar = value.charAt(0).toLowerCase();
+ // if no lookup array for this character exists, look it up now
+ if( !stMatchSets[firstChar] )
+ stMatchSets[firstChar] = [];
+
+ // if the match is a string
+ var row = {
+ value: value,
+ data: rawValue,
+ result: options.formatResult && options.formatResult(rawValue) || value
+ };
+
+ // push the current match into the set list
+ stMatchSets[firstChar].push(row);
+
+ // keep track of minChars zero items
+ if ( nullData++ < options.max ) {
+ stMatchSets[""].push(row);
+ }
+ };
+
+ // add the data items to the cache
+ $.each(stMatchSets, function(i, value) {
+ // increase the cache size
+ options.cacheLength++;
+ // add to the cache
+ add(i, value);
+ });
+ }
+
+ // populate any existing data
+ setTimeout(populate, 25);
+
+ function flush(){
+ data = {};
+ length = 0;
+ }
+
+ return {
+ flush: flush,
+ add: add,
+ populate: populate,
+ load: function(q) {
+ if (!options.cacheLength || !length)
+ return null;
+ /*
+ * if dealing w/local data and matchContains than we must make sure
+ * to loop through all the data collections looking for matches
+ */
+ if( !options.url && options.matchContains ){
+ // track all matches
+ var csub = [];
+ // loop through all the data grids for matches
+ for( var k in data ){
+ // don't search through the stMatchSets[""] (minChars: 0) cache
+ // this prevents duplicates
+ if( k.length > 0 ){
+ var c = data[k];
+ $.each(c, function(i, x) {
+ // if we've got a match, add it to the array
+ if (matchSubset(x.value, q)) {
+ csub.push(x);
+ }
+ });
+ }
+ }
+ return csub;
+ } else
+ // if the exact item exists, use it
+ if (data[q]){
+ return data[q];
+ } else
+ if (options.matchSubset) {
+ for (var i = q.length - 1; i >= options.minChars; i--) {
+ var c = data[q.substr(0, i)];
+ if (c) {
+ var csub = [];
+ $.each(c, function(i, x) {
+ if (matchSubset(x.value, q)) {
+ csub[csub.length] = x;
+ }
+ });
+ return csub;
+ }
+ }
+ }
+ return null;
+ }
+ };
+};
+
+$.Autocompleter.Select = function (options, input, select, config) {
+ var CLASSES = {
+ ACTIVE: "ac_over"
+ };
+
+ var listItems,
+ active = -1,
+ data,
+ term = "",
+ needsInit = true,
+ element,
+ list;
+
+ // Create results
+ function init() {
+ if (!needsInit)
+ return;
+ element = $("")
+ .hide()
+ .addClass(options.resultsClass)
+ .css("position", "absolute")
+ .appendTo(document.body)
+ .hover(function(event) {
+ // Browsers except FF do not fire mouseup event on scrollbars, resulting in mouseDownOnSelect remaining true, and results list not always hiding.
+ if($(this).is(":visible")) {
+ input.focus();
+ }
+ config.mouseDownOnSelect = false;
+ });
+
+ list = $("").appendTo(element).mouseover( function(event) {
+ if(target(event).nodeName && target(event).nodeName.toUpperCase() == 'LI') {
+ active = $("li", list).removeClass(CLASSES.ACTIVE).index(target(event));
+ $(target(event)).addClass(CLASSES.ACTIVE);
+ }
+ }).click(function(event) {
+ $(target(event)).addClass(CLASSES.ACTIVE);
+ select();
+ if( options.inputFocus )
+ input.focus();
+ return false;
+ }).mousedown(function() {
+ config.mouseDownOnSelect = true;
+ }).mouseup(function() {
+ config.mouseDownOnSelect = false;
+ });
+
+ if( options.width > 0 )
+ element.css("width", options.width);
+
+ needsInit = false;
+ }
+
+ function target(event) {
+ var element = event.target;
+ while(element && element.tagName != "LI")
+ element = element.parentNode;
+ // more fun with IE, sometimes event.target is empty, just ignore it then
+ if(!element)
+ return [];
+ return element;
+ }
+
+ function moveSelect(step) {
+ listItems.slice(active, active + 1).removeClass(CLASSES.ACTIVE);
+ movePosition(step);
+ var activeItem = listItems.slice(active, active + 1).addClass(CLASSES.ACTIVE);
+ if(options.scroll) {
+ var offset = 0;
+ listItems.slice(0, active).each(function() {
+ offset += this.offsetHeight;
+ });
+ if((offset + activeItem[0].offsetHeight - list.scrollTop()) > list[0].clientHeight) {
+ list.scrollTop(offset + activeItem[0].offsetHeight - list.innerHeight());
+ } else if(offset < list.scrollTop()) {
+ list.scrollTop(offset);
+ }
+ }
+ };
+
+ function movePosition(step) {
+ if (options.scrollJumpPosition || (!options.scrollJumpPosition && !((step < 0 && active == 0) || (step > 0 && active == listItems.size() - 1)) )) {
+ active += step;
+ if (active < 0) {
+ active = listItems.size() - 1;
+ } else if (active >= listItems.size()) {
+ active = 0;
+ }
+ }
+ }
+
+
+ function limitNumberOfItems(available) {
+ return options.max && options.max < available
+ ? options.max
+ : available;
+ }
+
+ function fillList() {
+ list.empty();
+ var max = limitNumberOfItems(data.length);
+ for (var i=0; i < max; i++) {
+ if (!data[i])
+ continue;
+ var formatted = options.formatItem(data[i].data, i+1, max, data[i].value, term);
+ if ( formatted === false )
+ continue;
+ var li = $("").html( options.highlight(formatted, term) ).addClass(i%2 == 0 ? "ac_even" : "ac_odd").appendTo(list)[0];
+ $.data(li, "ac_data", data[i]);
+ }
+ listItems = list.find("li");
+ if ( options.selectFirst ) {
+ listItems.slice(0, 1).addClass(CLASSES.ACTIVE);
+ active = 0;
+ }
+ // apply bgiframe if available
+ if ( $.fn.bgiframe )
+ list.bgiframe();
+ }
+
+ return {
+ display: function(d, q) {
+ init();
+ data = d;
+ term = q;
+ fillList();
+ },
+ next: function() {
+ moveSelect(1);
+ },
+ prev: function() {
+ moveSelect(-1);
+ },
+ pageUp: function() {
+ if (active != 0 && active - 8 < 0) {
+ moveSelect( -active );
+ } else {
+ moveSelect(-8);
+ }
+ },
+ pageDown: function() {
+ if (active != listItems.size() - 1 && active + 8 > listItems.size()) {
+ moveSelect( listItems.size() - 1 - active );
+ } else {
+ moveSelect(8);
+ }
+ },
+ hide: function() {
+ element && element.hide();
+ listItems && listItems.removeClass(CLASSES.ACTIVE);
+ active = -1;
+ },
+ visible : function() {
+ return element && element.is(":visible");
+ },
+ current: function() {
+ return this.visible() && (listItems.filter("." + CLASSES.ACTIVE)[0] || options.selectFirst && listItems[0]);
+ },
+ show: function() {
+ var offset = $(input).offset();
+ element.css({
+ width: typeof options.width == "string" || options.width > 0 ? options.width : $(input).width(),
+ top: offset.top + input.offsetHeight,
+ left: offset.left
+ }).show();
+ if(options.scroll) {
+ list.scrollTop(0);
+ list.css({
+ maxHeight: options.scrollHeight,
+ overflow: 'auto'
+ });
+
+ if($.browser.msie && typeof document.body.style.maxHeight === "undefined") {
+ var listHeight = 0;
+ listItems.each(function() {
+ listHeight += this.offsetHeight;
+ });
+ var scrollbarsVisible = listHeight > options.scrollHeight;
+ list.css('height', scrollbarsVisible ? options.scrollHeight : listHeight );
+ if (!scrollbarsVisible) {
+ // IE doesn't recalculate width when scrollbar disappears
+ listItems.width( list.width() - parseInt(listItems.css("padding-left")) - parseInt(listItems.css("padding-right")) );
+ }
+ }
+
+ }
+ },
+ selected: function() {
+ var selected = listItems && listItems.filter("." + CLASSES.ACTIVE).removeClass(CLASSES.ACTIVE);
+ return selected && selected.length && $.data(selected[0], "ac_data");
+ },
+ emptyList: function (){
+ list && list.empty();
+ },
+ unbind: function() {
+ element && element.remove();
+ }
+ };
+};
+
+$.fn.selection = function(start, end) {
+ if (start !== undefined) {
+ return this.each(function() {
+ if( this.createTextRange ){
+ var selRange = this.createTextRange();
+ if (end === undefined || start == end) {
+ selRange.move("character", start);
+ selRange.select();
+ } else {
+ selRange.collapse(true);
+ selRange.moveStart("character", start);
+ selRange.moveEnd("character", end);
+ selRange.select();
+ }
+ } else if( this.setSelectionRange ){
+ this.setSelectionRange(start, end);
+ } else if( this.selectionStart ){
+ this.selectionStart = start;
+ this.selectionEnd = end;
+ }
+ });
+ }
+ var field = this[0];
+ if ( field.createTextRange ) {
+ var range = document.selection.createRange(),
+ orig = field.value,
+ teststring = "<->",
+ textLength = range.text.length;
+ range.text = teststring;
+ var caretAt = field.value.indexOf(teststring);
+ field.value = orig;
+ this.selection(caretAt, caretAt + textLength);
+ return {
+ start: caretAt,
+ end: caretAt + textLength
+ }
+ } else if( field.selectionStart !== undefined ){
+ return {
+ start: field.selectionStart,
+ end: field.selectionEnd
+ }
+ }
+};
+
+})(jQuery);
\ No newline at end of file
diff --git a/public/javascripts/plugins/bing.js b/public/javascripts/plugins/bing.js
index 51f7e0a..2750c0c 100644
--- a/public/javascripts/plugins/bing.js
+++ b/public/javascripts/plugins/bing.js
@@ -46,7 +46,7 @@ function DisplayResults(response)
var resultStr = "";
for (var i = 0; i < results.length; ++i)
{
- title = results[i].Title.substring(0,40) + "…";
+ title = (results[i].Title.length > 40) ? results[i].Title.substring(0,40) + "…" : results[i].Title;
$appendData = ""+title+"
"+results[i].DisplayUrl+"";
$appendData = ReplaceHighlightingCharacters($appendData, "", "");
$('#artist_links ul').append($appendData);
diff --git a/public/javascripts/plugins/player.js b/public/javascripts/plugins/player.js
index 1fabbee..b97150d 100644
--- a/public/javascripts/plugins/player.js
+++ b/public/javascripts/plugins/player.js
@@ -121,7 +121,7 @@
ytplayer.loadVideoById(videoID);
active = videoID;
$li = activeVid();
- $('#playlist li').each(function(){
+ $('.play_list li').each(function(){
$(this).removeClass("active");
});
$li.addClass("active");
@@ -137,8 +137,8 @@
});
// This function is automatically called by the player once it loads
- function onYouTubePlayerReady(playerId) {
- ytplayer = document.getElementById("ytPlayer");
+ function onYouTubePlayerReady(playerid) {
+ ytplayer = document.getElementById("video");
// This causes the updatePlayerInfo function to be called every 250ms to
// get fresh data from the player
startUpdate();
@@ -151,14 +151,14 @@
}
// The "main method" of this sample. Called when someone clicks "Run".
- function loadPlayer() {
+ function loadPlayer() {
// Lets Flash from another domain call JavaScript
var params = { allowScriptAccess: "always" };
// The element id of the Flash embed
var atts = { id: "ytPlayer" };
// All of the magic handled by SWFObject (http://code.google.com/p/swfobject/)
swfobject.embedSWF("http://www.youtube.com/apiplayer?version=3&enablejsapi=1",
- "videoDiv", "50", "28", "8", null, null, params, atts);
+ "videoDiv", "640", "360", "8", null, null, params, atts);
}
function _run() {
loadPlayer();
@@ -171,7 +171,7 @@
$next = $e.next('li');
if($next.html() != null)
loadVideo($next.attr('videoid'));
- else loadVideo($('#playlist li:first-child').attr('videoid'));
+ else loadVideo($('.play_list li:first-child').attr('videoid'));
}
function prevVideo()
{
@@ -179,22 +179,22 @@
$prev = $e.prev('li');
if($prev.html() != null)
loadVideo($prev.attr('videoid'));
- else loadVideo($('#playlist li:last-child').attr('videoid'));
+ else loadVideo($('.play_list li:last-child').attr('videoid'));
//$(this).parent().children().index(this);
}
function activeVid()
{
- $x = $('#playlist [videoid='+active+']');
+ $x = $('.play_list [videoid='+active+']');
//console.log($('#playlist').html());
return ($x==null) ? '' : $x;
}
$('document').ready(function(){
- $('#player .forward').live('click', function(){
+ $('.forward').live('click', function(){
nextVideo();
});
- $('#player .backward').live('click', function(){
+ $('.backward').live('click', function(){
prevVideo();
});
});
\ No newline at end of file
diff --git a/public/javascripts/plugins/scrolling.js b/public/javascripts/plugins/scrolling.js
new file mode 100644
index 0000000..b4ebc00
--- /dev/null
+++ b/public/javascripts/plugins/scrolling.js
@@ -0,0 +1,118 @@
+/*! Copyright (c) 2010 Brandon Aaron (http://brandonaaron.net)
+ * Licensed under the MIT License (LICENSE.txt).
+ *
+ * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
+ * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
+ * Thanks to: Seamus Leahy for adding deltaX and deltaY
+ *
+ * Version: 3.0.4
+ *
+ * Requires: 1.2.2+
+ */
+
+(function($) {
+
+var types = ['DOMMouseScroll', 'mousewheel'];
+
+$.event.special.mousewheel = {
+ setup: function() {
+ if ( this.addEventListener ) {
+ for ( var i=types.length; i; ) {
+ this.addEventListener( types[--i], handler, false );
+ }
+ } else {
+ this.onmousewheel = handler;
+ }
+ },
+
+ teardown: function() {
+ if ( this.removeEventListener ) {
+ for ( var i=types.length; i; ) {
+ this.removeEventListener( types[--i], handler, false );
+ }
+ } else {
+ this.onmousewheel = null;
+ }
+ }
+};
+
+$.fn.extend({
+ mousewheel: function(fn) {
+ return fn ? this.bind("mousewheel", fn) : this.trigger("mousewheel");
+ },
+
+ unmousewheel: function(fn) {
+ return this.unbind("mousewheel", fn);
+ }
+});
+
+
+function handler(event) {
+ var orgEvent = event || window.event, args = [].slice.call( arguments, 1 ), delta = 0, returnValue = true, deltaX = 0, deltaY = 0;
+ event = $.event.fix(orgEvent);
+ event.type = "mousewheel";
+
+ // Old school scrollwheel delta
+ if ( event.wheelDelta ) { delta = event.wheelDelta/120; }
+ if ( event.detail ) { delta = -event.detail/3; }
+
+ // New school multidimensional scroll (touchpads) deltas
+ deltaY = delta;
+
+ // Gecko
+ if ( orgEvent.axis !== undefined && orgEvent.axis === orgEvent.HORIZONTAL_AXIS ) {
+ deltaY = 0;
+ deltaX = -1*delta;
+ }
+
+ // Webkit
+ if ( orgEvent.wheelDeltaY !== undefined ) { deltaY = orgEvent.wheelDeltaY/120; }
+ if ( orgEvent.wheelDeltaX !== undefined ) { deltaX = -1*orgEvent.wheelDeltaX/120; }
+
+ // Add event and delta to the front of the arguments
+ args.unshift(event, delta, deltaX, deltaY);
+
+ return $.event.handle.apply(this, args);
+}
+
+})(jQuery);
+
+
+
+
+
+
+
+
+
+
+
+
+/*
+* jScrollPane - v2.0.0beta6 - 2010-10-28
+* http://jscrollpane.kelvinluck.com/
+*
+* Copyright (c) 2010 Kelvin Luck
+* Dual licensed under the MIT and GPL licenses.
+*/
+(function (b, a, c) {
+ b.fn.jScrollPane = function (f) {
+ function d(C, L) {
+ var au, N = this, V, ah, v, aj, Q, W, y, q, av, aB, ap, i, H, h, j, X, R, al, U, t, A, am, ac, ak, F, l, ao, at, x, aq, aE, g, aA, ag = true, M = true, aD = false, k = false, Z = b.fn.mwheelIntent ? "mwheelIntent.jsp" : "mousewheel.jsp"; aE = C.css("paddingTop") + " " + C.css("paddingRight") + " " + C.css("paddingBottom") + " " + C.css("paddingLeft"); g = (parseInt(C.css("paddingLeft")) || 0) + (parseInt(C.css("paddingRight")) || 0); an(L); function an(aH) { var aL, aK, aJ, aG, aF, aI; au = aH; if (V == c) { C.css({ overflow: "hidden", padding: 0 }); ah = C.innerWidth() + g; v = C.innerHeight(); C.width(ah); V = b('').wrap(b('').css({ width: ah + "px", height: v + "px" })); C.wrapInner(V.parent()); aj = C.find(">.jspContainer"); V = aj.find(">.jspPane"); V.css("padding", aE) } else { C.css("width", ""); aI = C.outerWidth() + g != ah || C.outerHeight() != v; if (aI) { ah = C.innerWidth() + g; v = C.innerHeight(); aj.css({ width: ah + "px", height: v + "px" }) } aA = V.innerWidth(); if (!aI && V.outerWidth() == Q && V.outerHeight() == W) { if (aB || av) { V.css("width", aA + "px"); C.css("width", (aA + g) + "px") } return } V.css("width", ""); C.css("width", (ah) + "px"); aj.find(">.jspVerticalBar,>.jspHorizontalBar").remove().end() } aL = V.clone().css("position", "absolute"); aK = b('').append(aL); b("body").append(aK); Q = Math.max(V.outerWidth(), aL.outerWidth()); aK.remove(); W = V.outerHeight(); y = Q / ah; q = W / v; av = q > 1; aB = y > 1; if (!(aB || av)) { C.removeClass("jspScrollable"); V.css({ top: 0, width: aj.width() - g }); n(); D(); O(); w(); af() } else { C.addClass("jspScrollable"); aJ = au.maintainPosition && (H || X); if (aJ) { aG = ay(); aF = aw() } aC(); z(); E(); if (aJ) { K(aG); J(aF) } I(); ad(); if (au.enableKeyboardNavigation) { P() } if (au.clickOnTrack) { p() } B(); if (au.hijackInternalLinks) { m() } } if (au.autoReinitialise && !aq) { aq = setInterval(function () { an(au) }, au.autoReinitialiseDelay) } else { if (!au.autoReinitialise && aq) { clearInterval(aq) } } C.trigger("jsp-initialised", [aB || av]) } function aC() { if (av) { aj.append(b('').append(b(''), b('').append(b('').append(b(''), b(''))), b(''))); R = aj.find(">.jspVerticalBar"); al = R.find(">.jspTrack"); ap = al.find(">.jspDrag"); if (au.showArrows) { am = b('').bind("mousedown.jsp", az(0, -1)).bind("click.jsp", ax); ac = b('').bind("mousedown.jsp", az(0, 1)).bind("click.jsp", ax); if (au.arrowScrollOnHover) { am.bind("mouseover.jsp", az(0, -1, am)); ac.bind("mouseover.jsp", az(0, 1, ac)) } ai(al, au.verticalArrowPositions, am, ac) } t = v; aj.find(">.jspVerticalBar>.jspCap,>.jspVerticalBar>.jspArrow").each(function () { t -= b(this).outerHeight() }); ap.hover(function () { ap.addClass("jspHover") }, function () { ap.removeClass("jspHover") }).bind("mousedown.jsp", function (aF) { b("html").bind("dragstart.jsp selectstart.jsp", function () { return false }); ap.addClass("jspActive"); var s = aF.pageY - ap.position().top; b("html").bind("mousemove.jsp", function (aG) { S(aG.pageY - s, false) }).bind("mouseup.jsp mouseleave.jsp", ar); return false }); o() } } function o() { al.height(t + "px"); H = 0; U = au.verticalGutter + al.outerWidth(); V.width(ah - U - g); if (R.position().left == 0) { V.css("margin-left", U + "px") } } function z() {
+ if (aB) {
+ aj.append(b('').append(b(''), b('').append(b('').append(b(''), b(''))), b(''))); ak = aj.find(">.jspHorizontalBar"); F = ak.find(">.jspTrack"); h = F.find(">.jspDrag"); if (au.showArrows) {
+ at = b('').bind("mousedown.jsp", az(-1, 0)).bind("click.jsp", ax); x = b('').bind("mousedown.jsp", az(1, 0)).bind("click.jsp", ax); if (au.arrowScrollOnHover) {
+ at.bind("mouseover.jsp", az(-1, 0, at));
+ x.bind("mouseover.jsp", az(1, 0, x))
+ } ai(F, au.horizontalArrowPositions, at, x)
+ } h.hover(function () { h.addClass("jspHover") }, function () { h.removeClass("jspHover") }).bind("mousedown.jsp", function (aF) { b("html").bind("dragstart.jsp selectstart.jsp", function () { return false }); h.addClass("jspActive"); var s = aF.pageX - h.position().left; b("html").bind("mousemove.jsp", function (aG) { T(aG.pageX - s, false) }).bind("mouseup.jsp mouseleave.jsp", ar); return false }); l = aj.innerWidth(); ae()
+ } else { }
+ } function ae() { aj.find(">.jspHorizontalBar>.jspCap:visible,>.jspHorizontalBar>.jspArrow").each(function () { l -= b(this).outerWidth() }); F.width(l + "px"); X = 0 } function E() { if (aB && av) { var aF = F.outerHeight(), s = al.outerWidth(); t -= aF; b(ak).find(">.jspCap:visible,>.jspArrow").each(function () { l += b(this).outerWidth() }); l -= s; v -= s; ah -= aF; F.parent().append(b('').css("width", aF + "px")); o(); ae() } if (aB) { V.width((aj.outerWidth() - g) + "px") } W = V.outerHeight(); q = W / v; if (aB) { ao = 1 / y * l; if (ao > au.horizontalDragMaxWidth) { ao = au.horizontalDragMaxWidth } else { if (ao < au.horizontalDragMinWidth) { ao = au.horizontalDragMinWidth } } h.width(ao + "px"); j = l - ao; ab(X) } if (av) { A = 1 / q * t; if (A > au.verticalDragMaxHeight) { A = au.verticalDragMaxHeight } else { if (A < au.verticalDragMinHeight) { A = au.verticalDragMinHeight } } ap.height(A + "px"); i = t - A; aa(H) } } function ai(aG, aI, aF, s) { var aK = "before", aH = "after", aJ; if (aI == "os") { aI = /Mac/.test(navigator.platform) ? "after" : "split" } if (aI == aK) { aH = aI } else { if (aI == aH) { aK = aI; aJ = aF; aF = s; s = aJ } } aG[aK](aF)[aH](s) } function az(aF, s, aG) { return function () { G(aF, s, this, aG); this.blur(); return false } } function G(aH, aF, aK, aJ) { aK = b(aK).addClass("jspActive"); var aI, s = function () { if (aH != 0) { T(X + aH * au.arrowButtonSpeed, false) } if (aF != 0) { S(H + aF * au.arrowButtonSpeed, false) } }, aG = setInterval(s, au.arrowRepeatFreq); s(); aI = aJ == c ? "mouseup.jsp" : "mouseout.jsp"; aJ = aJ || b("html"); aJ.bind(aI, function () { aK.removeClass("jspActive"); clearInterval(aG); aJ.unbind(aI) }) } function p() { w(); if (av) { al.bind("mousedown.jsp", function (aH) { if (aH.originalTarget == c || aH.originalTarget == aH.currentTarget) { var aG = b(this), s = setInterval(function () { var aI = aG.offset(), aJ = aH.pageY - aI.top; if (H + A < aJ) { S(H + au.trackClickSpeed) } else { if (aJ < H) { S(H - au.trackClickSpeed) } else { aF() } } }, au.trackClickRepeatFreq), aF = function () { s && clearInterval(s); s = null; b(document).unbind("mouseup.jsp", aF) }; b(document).bind("mouseup.jsp", aF); return false } }) } if (aB) { F.bind("mousedown.jsp", function (aH) { if (aH.originalTarget == c || aH.originalTarget == aH.currentTarget) { var aG = b(this), s = setInterval(function () { var aI = aG.offset(), aJ = aH.pageX - aI.left; if (X + ao < aJ) { T(X + au.trackClickSpeed) } else { if (aJ < X) { T(X - au.trackClickSpeed) } else { aF() } } }, au.trackClickRepeatFreq), aF = function () { s && clearInterval(s); s = null; b(document).unbind("mouseup.jsp", aF) }; b(document).bind("mouseup.jsp", aF); return false } }) } } function w() { F && F.unbind("mousedown.jsp"); al && al.unbind("mousedown.jsp") } function ar() { b("html").unbind("dragstart.jsp selectstart.jsp mousemove.jsp mouseup.jsp mouseleave.jsp"); ap && ap.removeClass("jspActive"); h && h.removeClass("jspActive") } function S(s, aF) { if (!av) { return } if (s < 0) { s = 0 } else { if (s > i) { s = i } } if (aF == c) { aF = au.animateScroll } if (aF) { N.animate(ap, "top", s, aa) } else { ap.css("top", s); aa(s) } } function aa(aF) { if (aF == c) { aF = ap.position().top } aj.scrollTop(0); H = aF; var aI = H == 0, aG = H == i, aH = aF / i, s = -aH * (W - v); if (ag != aI || aD != aG) { ag = aI; aD = aG; C.trigger("jsp-arrow-change", [ag, aD, M, k]) } u(aI, aG); V.css("top", s); C.trigger("jsp-scroll-y", [-s, aI, aG]) } function T(aF, s) { if (!aB) { return } if (aF < 0) { aF = 0 } else { if (aF > j) { aF = j } } if (s == c) { s = au.animateScroll } if (s) { N.animate(h, "left", aF, ab) } else { h.css("left", aF); ab(aF) } } function ab(aF) { if (aF == c) { aF = h.position().left } aj.scrollTop(0); X = aF; var aI = X == 0, aH = X == j, aG = aF / j, s = -aG * (Q - ah); if (M != aI || k != aH) { M = aI; k = aH; C.trigger("jsp-arrow-change", [ag, aD, M, k]) } r(aI, aH); V.css("left", s); C.trigger("jsp-scroll-x", [-s, aI, aH]) } function u(aF, s) { if (au.showArrows) { am[aF ? "addClass" : "removeClass"]("jspDisabled"); ac[s ? "addClass" : "removeClass"]("jspDisabled") } } function r(aF, s) {
+ if (au.showArrows) {
+ at[aF ? "addClass" : "removeClass"]("jspDisabled");
+ x[s ? "addClass" : "removeClass"]("jspDisabled")
+ }
+ } function J(s, aF) { var aG = s / (W - v); S(aG * i, aF) } function K(aF, s) { var aG = aF / (Q - ah); T(aG * j, s) } function Y(aR, aM, aG) { var aK, aH, aI, s = 0, aQ = 0, aF, aL, aO, aN, aP; try { aK = b(aR) } catch (aJ) { return } aH = aK.outerHeight(); aI = aK.outerWidth(); aj.scrollTop(0); aj.scrollLeft(0); while (!aK.is(".jspPane")) { s += aK.position().top; aQ += aK.position().left; aK = aK.offsetParent(); if (/^body|html$/i.test(aK[0].nodeName)) { return } } aF = aw(); aL = aF + v; if (s < aF || aM) { aN = s - au.verticalGutter } else { if (s + aH > aL) { aN = s - v + aH + au.verticalGutter } } if (aN) { J(aN, aG) } viewportLeft = ay(); aO = viewportLeft + ah; if (aQ < viewportLeft || aM) { aP = aQ - au.horizontalGutter } else { if (aQ + aI > aO) { aP = aQ - ah + aI + au.horizontalGutter } } if (aP) { K(aP, aG) } } function ay() { return -V.position().left } function aw() { return -V.position().top } function ad() { aj.unbind(Z).bind(Z, function (aI, aJ, aH, aF) { var aG = X, s = H; T(X + aH * au.mouseWheelSpeed, false); S(H - aF * au.mouseWheelSpeed, false); return aG == X && s == H }) } function n() { aj.unbind(Z) } function ax() { return false } function I() { V.unbind("focusin.jsp").bind("focusin.jsp", function (s) { if (s.target === V[0]) { return } Y(s.target, false) }) } function D() { V.unbind("focusin.jsp") } function P() { var aF, s; C.attr("tabindex", 0).unbind("keydown.jsp").bind("keydown.jsp", function (aJ) { if (aJ.target !== C[0]) { return } var aH = X, aG = H, aI = aF ? 2 : 16; switch (aJ.keyCode) { case 40: S(H + aI, false); break; case 38: S(H - aI, false); break; case 34: case 32: J(aw() + Math.max(32, v) - 16); break; case 33: J(aw() - v + 16); break; case 35: J(W - v); break; case 36: J(0); break; case 39: T(X + aI, false); break; case 37: T(X - aI, false); break } if (!(aH == X && aG == H)) { aF = true; clearTimeout(s); s = setTimeout(function () { aF = false }, 260); return false } }); if (au.hideFocus) { C.css("outline", "none"); if ("hideFocus" in aj[0]) { C.attr("hideFocus", true) } } else { C.css("outline", ""); if ("hideFocus" in aj[0]) { C.attr("hideFocus", false) } } } function O() { C.attr("tabindex", "-1").removeAttr("tabindex").unbind("keydown.jsp") } function B() { if (location.hash && location.hash.length > 1) { var aG, aF; try { aG = b(location.hash) } catch (s) { return } if (aG.length && V.find(aG)) { if (aj.scrollTop() == 0) { aF = setInterval(function () { if (aj.scrollTop() > 0) { Y(location.hash, true); b(document).scrollTop(aj.position().top); clearInterval(aF) } }, 50) } else { Y(location.hash, true); b(document).scrollTop(aj.position().top) } } } } function af() { b("a.jspHijack").unbind("click.jsp-hijack").removeClass("jspHijack") } function m() { af(); b("a[href^=#]").addClass("jspHijack").bind("click.jsp-hijack", function () { var s = this.href.split("#"), aF; if (s.length > 1) { aF = s[1]; if (aF.length > 0 && V.find("#" + aF).length > 0) { Y("#" + aF, true); return false } } }) } b.extend(N, { reinitialise: function (aF) { aF = b.extend({}, aF, au); an(aF) }, scrollToElement: function (aG, aF, s) { Y(aG, aF, s) }, scrollTo: function (aG, s, aF) { K(aG, aF); J(s, aF) }, scrollToX: function (aF, s) { K(aF, s) }, scrollToY: function (s, aF) { J(s, aF) }, scrollBy: function (aF, s, aG) { N.scrollByX(aF, aG); N.scrollByY(s, aG) }, scrollByX: function (s, aG) { var aF = ay() + s, aH = aF / (Q - ah); T(aH * j, aG) }, scrollByY: function (s, aG) { var aF = aw() + s, aH = aF / (W - v); S(aH * i, aG) }, animate: function (aF, aI, s, aH) { var aG = {}; aG[aI] = s; aF.animate(aG, { duration: au.animateDuration, ease: au.animateEase, queue: false, step: aH }) }, getContentPositionX: function () { return ay() }, getContentPositionY: function () { return aw() }, getIsScrollableH: function () { return aB }, getIsScrollableV: function () { return av }, getContentPane: function () { return V }, scrollToBottom: function (s) { S(i, s) }, hijackInternalLinks: function () { m() } })
+ } f = b.extend({}, b.fn.jScrollPane.defaults, f); var e; this.each(function () { var g = b(this), h = g.data("jsp"); if (h) { h.reinitialise(f) } else { h = new d(g, f); g.data("jsp", h) } e = e ? e.add(g) : g }); return e
+ }; b.fn.jScrollPane.defaults = { showArrows: false, maintainPosition: true, clickOnTrack: true, autoReinitialise: false, autoReinitialiseDelay: 500, verticalDragMinHeight: 0, verticalDragMaxHeight: 99999, horizontalDragMinWidth: 0, horizontalDragMaxWidth: 99999, animateScroll: false, animateDuration: 300, animateEase: "linear", hijackInternalLinks: false, verticalGutter: 4, horizontalGutter: 4, mouseWheelSpeed: 10, arrowButtonSpeed: 10, arrowRepeatFreq: 100, arrowScrollOnHover: false, trackClickSpeed: 30, trackClickRepeatFreq: 100, verticalArrowPositions: "split", horizontalArrowPositions: "split", enableKeyboardNavigation: true, hideFocus: false }
+})(jQuery, this);
diff --git a/public/javascripts/search.js b/public/javascripts/search.js
new file mode 100644
index 0000000..e050685
--- /dev/null
+++ b/public/javascripts/search.js
@@ -0,0 +1,13 @@
+$(document).ready(function(){
+ $("#search_form .text").autocomplete('', {
+ width: 300,
+ multiple: true
+ });
+});
+
+function init_autocomplete(){
+ $("#search_bar .text").autocomplete('', {
+ width: 300,
+ multiple: true
+ });
+}
\ No newline at end of file
diff --git a/public/javascripts/store.js b/public/javascripts/store.js
new file mode 100644
index 0000000..3c9b227
--- /dev/null
+++ b/public/javascripts/store.js
@@ -0,0 +1,101 @@
+/* Copyright (c) 2010 Marcus Westin
+ *
+ * store.js
+ */
+
+jQuery.store = (function(){
+ var api = {},
+ win = window,
+ doc = win.document,
+ localStorageName = 'localStorage',
+ globalStorageName = 'globalStorage',
+ storage
+
+ api.disabled = false
+ api.set = function(key, value) {}
+ api.get = function(key) {}
+ api.remove = function(key) {}
+ api.clear = function() {}
+ api.transact = function(key, transactionFn) {
+ var val = api.get(key)
+ if (typeof val == 'undefined') { val = {} }
+ transactionFn(val)
+ api.set(key, val)
+ }
+
+ api.serialize = function(value) {
+ return JSON.stringify(value)
+ }
+ api.deserialize = function(value) {
+ if (typeof value != 'string') { return undefined }
+ return JSON.parse(value)
+ }
+
+ // Functions to encapsulate questionable FireFox 3.6.13 behavior
+ // when about.config::dom.storage.enabled === false
+ // See https://github.com/marcuswestin/store.js/issues#issue/13
+ function isLocalStorageNameSupported() {
+ try { return (localStorageName in win && win[localStorageName]) }
+ catch(err) { return false }
+ }
+
+ function isGlobalStorageNameSupported() {
+ try { return (globalStorageName in win && win[globalStorageName] && win[globalStorageName][win.location.hostname]) }
+ catch(err) { return false }
+ }
+
+ if (isLocalStorageNameSupported()) {
+ storage = win[localStorageName]
+ api.set = function(key, val) { storage.setItem(key, api.serialize(val)) }
+ api.get = function(key) { return api.deserialize(storage.getItem(key)) }
+ api.remove = function(key) { storage.removeItem(key) }
+ api.clear = function() { storage.clear() }
+
+ } else if (isGlobalStorageNameSupported()) {
+ storage = win[globalStorageName][win.location.hostname]
+ api.set = function(key, val) { storage[key] = api.serialize(val) }
+ api.get = function(key) { return api.deserialize(storage[key] && storage[key].value) }
+ api.remove = function(key) { delete storage[key] }
+ api.clear = function() { for (var key in storage ) { delete storage[key] } }
+
+ } else if (doc.documentElement.addBehavior) {
+ var storage = doc.createElement('div')
+ function withIEStorage(storeFunction) {
+ return function() {
+ var args = Array.prototype.slice.call(arguments, 0)
+ args.unshift(storage)
+ // See http://msdn.microsoft.com/en-us/library/ms531081(v=VS.85).aspx
+ // and http://msdn.microsoft.com/en-us/library/ms531424(v=VS.85).aspx
+ doc.body.appendChild(storage)
+ storage.addBehavior('#default#userData')
+ storage.load(localStorageName)
+ var result = storeFunction.apply(api, args)
+ doc.body.removeChild(storage)
+ return result
+ }
+ }
+ api.set = withIEStorage(function(storage, key, val) {
+ storage.setAttribute(key, api.serialize(val))
+ storage.save(localStorageName)
+ })
+ api.get = withIEStorage(function(storage, key) {
+ return api.deserialize(storage.getAttribute(key))
+ })
+ api.remove = withIEStorage(function(storage, key) {
+ storage.removeAttribute(key)
+ storage.save(localStorageName)
+ })
+ api.clear = withIEStorage(function(storage) {
+ var attributes = storage.XMLDocument.documentElement.attributes
+ storage.load(localStorageName)
+ for (var i=0, attr; attr = attributes[i]; i++) {
+ storage.removeAttribute(attr.name)
+ }
+ storage.save(localStorageName)
+ })
+ } else {
+ api.disabled = true
+ }
+
+ return api
+})();
diff --git a/public/stylesheets/9minutes.css b/public/stylesheets/9minutes.css
index f93c4c9..efd3de5 100644
--- a/public/stylesheets/9minutes.css
+++ b/public/stylesheets/9minutes.css
@@ -1 +1 @@
-body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,textarea,p,blockquote,th,td{margin:0;padding:0}table{border-collapse:collapse;border-spacing:0}fieldset,img{border:0}address,caption,cite,code,dfn,em,strong,th,var,optgroup{font-style:inherit;font-weight:inherit}del,ins{text-decoration:none}li{list-style:none}caption,th{text-align:left}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal}q:before,q:after{content:''}abbr,acronym{border:0;font-variant:normal}sup{vertical-align:baseline}sub{vertical-align:baseline}legend{color:#000}input,button,textarea,select,optgroup,option{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit}input,button,textarea,select{*font-size:100%}.clean{clear:both}b,strong{font-family:"Segoe UI", Corbel, Arial, sans-serif}a{cursor:pointer}body{background:#010203 url("/images/backgrounds/overall.png") no-repeat center top;color:#15191d;font-size:12px;font-family:"Segoe UI", Corbel, Arial, sans-serif}#bg_stripe{height:228px;width:100%;position:absolute;top:136px;background:transparent url("/images/backgrounds/stripe.png") repeat}#site{width:950px;position:relative;margin:0 auto}#head{height:115px}#head h1{margin:36px 0 0 94px;float:left}#navigation{float:right;overflow:hidden}#navigation li{float:left}#navigation li.active{background:url("/images/backgrounds/navi-hover.png")}#navigation li.search{width:200px;font-size:16px;color:#ffffff;line-height:58px;display:inline-block;background:transparent url("/images/backgrounds/stripe.png") repeat;margin-top:21px;height:58px;padding-left:20px;margin-left:20px}#navigation li.search img{vertical-align:middle;margin-left:10px}#navigation li.search .text{width:150px;height:45px;border:0;background:0;color:#fff}#navigation li.search .submit{display:none}#navigation li > a{font-size:16px;font-weight:bold;color:#ffffff;height:79px;line-height:99px;width:141px;display:inline-block;text-decoration:none;text-align:center}#foot{clear:both;padding:25px 0;float:right}#foot h6{color:#243037;font-size:11px;float:left;height:20px;line-height:22px}#foot ul{float:left;height:20px;line-height:20px}#foot li{float:left;margin-left:33px}#foot a{color:#ffffff;text-transform:uppercase;text-decoration:none;font-size:11px;background:url("/images/icons/arrow-foot.png") left 3px no-repeat;padding-left:22px;display:inline-block;height:20px;line-height:20px}.tabs_js .nav li{cursor:pointer}.tabs{float:right}.tabs .content{background:#fff;padding:48px 37px}.tabs .content > div{display:none}.tabs .more{background:#f4f6f9;border-top:1px solid #e5e9ef;height:40px;display:block;text-align:center;line-height:40px;font-weight:bold}.tabs .more.disabled{opacity:0.3;cursor:default}.tabs.w01 .nav{width:564px}.tabs.w01 .content{width:490px}.tabs.w01 .content > div{width:490px}.tabs.w01 .content .more{width:564px;margin:0 -37px -48px -37px}.tabs.w02 .nav{width:750px}.tabs.w02 .content{width:676px}.tabs.w02 .content > div{width:676px}.tabs.w02 .content .more{width:750px;margin:0 -37px -48px -37px}.tabs.w03 .nav{width:950px}.tabs.w03 .content{width:876px}.tabs.w03 .content > div{width:876px}.tabs.w03 .content .more{width:950px;margin:0 -37px -48px -37px}.tabs .nav{color:#fff;overflow:hidden;background:transparent url("/images/backgrounds/stripe-dark.png") repeat}.tabs .nav li{width:120px;height:54px;line-height:54px;float:left;text-align:center;text-transform:lowercase;font-size:15px}.tabs .nav li.active{background:#fff;color:#2f3a40}#content h1{color:#fff;font-size:30px;height:74px;line-height:70px;text-indent:22px;margin-bottom:23px;background:transparent url("/images/backgrounds/stripe.png") repeat}#content .information{overflow:hidden;padding-bottom:22px;background:transparent url("/images/backgrounds/stripe.png") repeat}#content .information .content > div{display:none}#content .information .nav{margin-left:22px;float:left}#content .information .nav li{width:37px;height:25px;margin-bottom:13px}#content .information .nav li.active{background:url("/images/icons/artist-information-active-arrow.png") no-repeat right 10px;cursor:default}#content .information .content{float:right;width:280px;margin-right:22px;color:#fff}#loading,#error{position:fixed;top:0;left:0;width:100%;height:30px;line-height:30px;background:#0086cc;color:#fff;text-align:center;font-weight:bold;text-transform:uppercase;display:none;z-index:999}#error{background:#ee0000}#white{width:870px;padding:50px 40px;background:#fff}#block{width:100%;height:100%;position:fixed;z-index:8;background:#000;opacity:0;display:none}#artist_left{float:left;width:386px}#artist_left h1{width:386px}#artist_left .information{width:386px}#artist_left #slider{position:relative;width:386px;height:240px;overflow:hidden}#artist_left #slider img{position:absolute;top:0;left:0;max-width:386px}#artist_left #artist_links ul{margin:-2px 0 30px 0}#artist_left #artist_links li{margin-bottom:12px;font-family:"Segoe UI", Corbel, Arial, sans-serif;overflow:hidden}#artist_left #artist_links li a{text-decoration:none;font-size:10px;color:#fff}#artist_left #artist_links li a:hover h3{color:#00a7ff}#artist_left #artist_links li h3{color:#0086cc;font-size:13px;font-weight:normal}#artist_left #artist_tags li{background:url("/images/icons/tag.png") no-repeat left 2px;color:#fff;padding-left:20px;margin-bottom:12px;font-family:"Segoe UI", Corbel, Arial, sans-serif}#artist_left #artist_info{font-family:"Segoe UI", Corbel, Arial, sans-serif;font-size:11px;line-height:16px}#artist_left h2{font-size:18px;color:#0086cc;font-weight:normal;margin:-2px 0 10px 0}#artist_left .heart{float:right;width:22px;height:19px;display:inline-block;margin:28px 20px 0 0;background:url("/images/icons/heart.png") no-repeat 0 0}#top_artist{position:relative;width:500px;height:270px;background:url("/images/icons/loading.gif") no-repeat 50% 50%;overflow:hidden}#top_artist img{position:absolute;top:0;right:0;display:none;max-width:500px;max-height:270px;overflow:hidden}#top_artist .nivo-controlNav{position:absolute;bottom:-70px}#top_artist .nivo-controlNav img{display:inline;position:relative;margin-right:10px}#user_left{float:left;width:200px}#user_left h1{width:200px}#user_left .information{width:200px}#user_left .picture{float:left;position:relative;width:200px;height:200px}#user_left h1{font-size:18px;line-height:44px;height:44px}#user_left .nav li{background:url("/images/icons/artist-information-active-arrow.png") no-repeat right 10px;cursor:default}#user_left .nav li:last-child{margin-bottom:0}#user_left .con{margin-left:80px}#user_left .con li{height:25px;margin-bottom:13px;color:White;line-height:25px}#user_left .con li:last-child{margin-bottom:0}#charts{width:530px;float:left}#charts li{overflow:hidden;display:block;padding-bottom:10px;border-bottom:1px solid #f0f2f4;margin-bottom:10px}#charts li h6{font-size:28px;font-weight:bold;float:left;height:50px;color:#a3adb5;line-height:50px;margin-left:15px;width:50px}#charts li .img{width:90px;height:50px;float:left;overflow:hidden;position:relative}#charts li .img img{max-width:90px}#charts li .text{float:left;margin-left:15px}#charts li .text h2{margin:-3px 0 5px 0}#charts li .text h2 a{color:#0086cc;font-size:16px;text-decoration:none}#charts li .text h2 a:hover{text-decoration:underline}#sidebar{float:right;width:320px}#sidebar .advertisment{width:300px;height:270px;padding:10px;border:1px solid #f4f6f9;background:#fbfbfd}#sidebar img{float:left}#sidebar sup{display:block;height:20px;line-height:20px;float:left}.nivoSlider{position:relative}.nivoSlider img{position:absolute;top:0px;left:0px}.nivo-slice{display:block;position:absolute;z-index:5;height:100%}.nivo-box{display:block;position:absolute;z-index:5}.list{margin-bottom:20px;display:block;overflow:hidden}.list.songs li{height:24px;line-height:24px;width:100%;font-size:13px;margin-bottom:12px;font-family:"Segoe UI", Corbel, Arial, sans-serif}.list.songs li span{color:#a3adb5}.list.songs li a{color:#a3adb5;text-decoration:none}.list.songs li a:hover{color:#0086cc}.list.songs li:last-child{margin-bottom:0}.list.songs li .play,.list.songs li .add{width:20px;height:20px;display:inline-block;margin-right:6px;background:url("/images/icons/list-controls.png") no-repeat 0 0;vertical-align:middle}.list.songs li .add{margin-right:16px;background-position:0 -20px}.list.albums{margin-bottom:10px}.list.albums li{overflow:hidden;margin-bottom:15px}.list.albums li:last-child{margin-bottom:0}.list.albums li .songsbtn{text-transform:uppercase;text-decoration:none;color:#0086cc;background:url("/images/icons/list-controls.png") no-repeat 0 -60px;height:20px;line-height:20px;text-indent:25px;display:inline-block;margin-top:10px;font-size:11px}.list.albums .img{margin-right:10px;position:relative;float:left;overflow:hidden;background:url("/images/backgrounds/album.png") 0 6px no-repeat;width:90px;height:74px}.list.albums .img .cover{width:64px;height:64px;margin-left:18px}.list.albums .img .playall{position:absolute;top:0;left:18px;background:transparent url("/images/backgrounds/stripe.png") repeat;width:64px;height:64px;display:none}.list.albums .img .playall a{display:inline-block;width:20px;height:20px;background:url("/images/icons/list-controls.png") no-repeat 0 -40px;margin:22px 0 0 22px}.list.albums .name{font-size:16px;line-height:17px;margin-top:-2px}.list.albums .artist{font-size:12px;color:#a3adb5}.list.related li{overflow:hidden;float:left;margin:0 20px 20px 0;width:150px}.list.related li a{text-decoration:none}.list.related li h5{font-size:14px;text-decoration:none!important;color:#2f3a40;height:30px;line-height:30px;border-bottom:2px solid #0086cc}.list.related li h5 span{color:#0086cc;font-size:11px}.list.related li h5 span:before{content:"("}.list.related li h5 span:after{content:"%)"}.list.related li div{width:150px;height:95px;float:left;overflow:hidden;position:relative}.playlist{background:#080a0c;width:150px;display:none;position:absolute;left:0;top:0}#fullscreen_wrap{width:100%;height:100%;position:fixed;z-index:70;background:#000;top:0;left:0;display:none}#fullscreen{width:950px;position:absolute;margin-left:-475px;z-index:70;opacity:0;top:0;left:50%;display:none}#fullscreen h2{font-size:18px;color:#fff;text-transform:uppercase;font-weight:bold;line-height:14px}#fullscreen h1{font-size:28px;color:#fff;margin-bottom:20px}#fullscreen img.left{float:left;width:640px}#fullscreen .sidebar{float:right;width:310px;height:360px;background:transparent url("/images/backgrounds/stripe.png") repeat}#fullscreen .sidebar .player{width:310px;height:125px;background:transparent url("/images/backgrounds/stripe.png") repeat}
+body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,textarea,p,blockquote,th,td{margin:0;padding:0}table{border-collapse:collapse;border-spacing:0}fieldset,img{border:0}address,caption,cite,code,dfn,em,strong,th,var,optgroup{font-style:inherit;font-weight:inherit}del,ins{text-decoration:none}li{list-style:none}caption,th{text-align:left}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal}q:before,q:after{content:''}abbr,acronym{border:0;font-variant:normal}sup{vertical-align:baseline}sub{vertical-align:baseline}legend{color:#000}input,button,textarea,select,optgroup,option{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit}input,button,textarea,select{*font-size:100%}.clean{clear:both}b,strong{font-family:"Segoe UI", Corbel, Arial, sans-serif}a{cursor:pointer}body{background:#05070a url("/images/backgrounds/overall.png") no-repeat center top;color:#15191d;font-size:12px;font-family:"Segoe UI", Corbel, Arial, sans-serif}#bg_stripe{height:228px;width:100%;position:absolute;top:136px;background:transparent url("/images/backgrounds/stripe.png") repeat}#site{width:950px;position:relative;margin:0 auto}#head{height:115px}#head h1{margin:36px 0 0 94px;float:left}#navigation{float:right;overflow:hidden}#navigation li{float:left}#navigation li.active{background:url("/images/backgrounds/navi-hover.png")}#navigation li.search{width:200px;font-size:16px;color:#ffffff;line-height:58px;display:inline-block;background:transparent url("/images/backgrounds/stripe.png") repeat;margin-top:21px;height:58px;padding-left:20px;margin-left:20px}#navigation li.search img{vertical-align:middle;margin-left:10px}#navigation li.search .text{width:150px;height:45px;border:0;background:0;color:#fff}#navigation li.search .submit{display:none}#navigation li > a{font-size:16px;font-weight:bold;color:#ffffff;height:79px;line-height:99px;width:141px;display:inline-block;text-decoration:none;text-align:center}#foot{clear:both;padding:25px 0;float:right}#foot h6{color:#243037;font-size:11px;float:left;height:20px;line-height:22px}#foot ul{float:left;height:20px;line-height:20px}#foot li{float:left;margin-left:33px}#foot a{color:#ffffff;text-transform:uppercase;text-decoration:none;font-size:11px;background:url("/images/icons/arrow-foot.png") left 3px no-repeat;padding-left:22px;display:inline-block;height:20px;line-height:20px}.tabs_js .nav li{cursor:pointer}.tabs{float:right}.tabs .content{background:#fff;padding:48px 37px}.tabs .content > div{display:none;position:relative}.tabs .more{background:#f4f6f9;border-top:1px solid #e5e9ef;height:40px;display:block;text-align:center;line-height:40px;font-weight:bold}.tabs .more.disabled{opacity:0.3;cursor:default}.tabs.w01 .nav{width:564px}.tabs.w01 .content{width:490px}.tabs.w01 .content > div{width:490px}.tabs.w01 .content .more{width:564px;margin:7px -37px -48px -37px}.tabs.w02 .nav{width:750px}.tabs.w02 .content{width:676px}.tabs.w02 .content > div{width:676px}.tabs.w02 .content .more{width:750px;margin:7px -37px -48px -37px}.tabs.w03 .nav{width:950px}.tabs.w03 .content{width:876px}.tabs.w03 .content > div{width:876px}.tabs.w03 .content .more{width:950px;margin:7px -37px -48px -37px}.tabs .nav{color:#fff;overflow:hidden;background:transparent url("/images/backgrounds/stripe-dark.png") repeat}.tabs .nav li{width:120px;height:54px;line-height:54px;float:left;text-align:center;text-transform:lowercase;font-size:15px}.tabs .nav li.active{background:#fff;color:#2f3a40}#content .information{overflow:hidden;padding-bottom:22px;background:transparent url("/images/backgrounds/stripe.png") repeat}#content .information .content > div{display:none}#content .information .nav{margin-left:22px;float:left}#content .information .nav li{width:37px;height:25px;margin-bottom:13px}#content .information .nav li.active{background:url("/images/icons/artist-information-active-arrow.png") no-repeat right 10px;cursor:default}#content .information .content{float:right;width:280px;margin-right:22px;color:#fff}#loading,#error{position:fixed;top:0;left:0;width:100%;height:30px;line-height:30px;background:#0086cc;color:#fff;text-align:center;font-weight:bold;text-transform:uppercase;display:none;z-index:999}#error{background:#ee0000}#white{width:870px;padding:50px 40px;background:#fff}#block{width:100%;height:100%;position:fixed;z-index:22;background:#000;opacity:0;display:none}.box{padding:10px;border:1px solid #e5e7e9;background:#f4f6f9}#artist_left{float:left;width:386px}#artist_left h1{width:386px}#artist_left .information{width:386px}#artist_left #slider{position:relative;width:386px;height:240px;overflow:hidden;background:url("/images/placeholder/artist-big.png") no-repeat 0 0}#artist_left #slider img{position:absolute;top:0;left:0;max-width:386px}#artist_left h1{color:#fff;font-size:30px;overflow:hidden;height:74px;line-height:70px;text-indent:28px;margin-bottom:23px;background:transparent url("/images/backgrounds/stripe.png") repeat}#artist_left #artist_links ul{margin:-2px 0 30px 0}#artist_left #artist_links li{margin-bottom:12px;font-family:"Segoe UI", Corbel, Arial, sans-serif;overflow:hidden}#artist_left #artist_links li a{text-decoration:none;font-size:10px;color:#fff}#artist_left #artist_links li a:hover h3{color:#00a7ff}#artist_left #artist_links li h3{color:#0086cc;font-size:13px;font-weight:normal}#artist_left #artist_tags li{background:url("/images/icons/tag.png") no-repeat left 2px;color:#fff;padding-left:20px;margin-bottom:12px;font-family:"Segoe UI", Corbel, Arial, sans-serif}#artist_left #artist_info{font-family:"Segoe UI", Corbel, Arial, sans-serif;font-size:11px;line-height:16px}#artist_left h2{font-size:18px;color:#0086cc;font-weight:normal;margin:-2px 0 10px 0}#artist_left .heart{float:right;width:22px;height:19px;display:inline-block;margin:28px 20px 0 0;background:url("/images/icons/heart.png") no-repeat 0 0}#top_artist{position:relative;width:500px;height:270px;background:url("/images/icons/loading.gif") no-repeat 50% 50%;overflow:hidden}#top_artist img{position:absolute;top:0;right:0;display:none;max-width:500px;max-height:270px;overflow:hidden}#top_artist .nivo-controlNav{position:absolute;bottom:-70px}#top_artist .nivo-controlNav img{display:inline;position:relative;margin-right:10px}#user_left{float:left;width:200px}#user_left h1{width:200px}#user_left .information{width:200px}#user_left .picture{float:left;position:relative;width:200px;height:200px}#user_left h1{font-size:18px;line-height:44px;height:44px}#user_left .nav li{background:url("/images/icons/artist-information-active-arrow.png") no-repeat right 10px;cursor:default}#user_left .nav li:last-child{margin-bottom:0}#user_left .con{margin-left:80px}#user_left .con li{height:25px;margin-bottom:13px;color:White;line-height:25px}#user_left .con li:last-child{margin-bottom:0}#charts{width:530px;float:left}#charts li{overflow:hidden;display:block;padding-bottom:10px;border-bottom:1px solid #f0f2f4;margin-bottom:10px}#charts li h6{font-size:28px;font-weight:bold;float:left;height:50px;color:#a3adb5;line-height:50px;margin-left:15px;width:50px}#charts li .img{width:90px;height:50px;background:url("/images/placeholder/artist.png") no-repeat 0 0;float:left;overflow:hidden;position:relative}#charts li .img img{max-width:90px}#charts li .text{float:left;margin-left:15px}#charts li .text h2{margin:-3px 0 5px 0}#charts li .text h2 a{color:#0086cc;font-size:16px;text-decoration:none}#charts li .text h2 a:hover{text-decoration:underline}#search_bar{width:500px;float:left;border:0;margin-bottom:20px;position:relative;padding:15px}#search_bar input{width:498px;height:35px;text-indent:10px;font-size:14px;border:1px solid #dadce0;border-radius:4px;-moz-border-radius:4px;-webkit-border-radius:4px}#search_bar input:focus{border-color:#0086cc}#search_bar .button{position:absolute;width:20px;height:20px;right:26px;top:24px}#album_box{position:absolute;top:69px;left:100px;display:none;z-index:12;border:7px solid rgba(255, 255, 255, 0.8);-moz-box-shadow:0 0 2px 2px rgba(31, 34, 40, 0.1);-webkit-box-shadow:0 0 2px 2px rgba(31, 34, 40, 0.1);box-shadow:0 0 2px 2px rgba(31, 34, 40, 0.1)}#album_box > span{position:absolute;top:-19px;left:70px;background:url("/images/icons/arrow.png") no-repeat;width:47px;height:23px}#album_box .headline{background:#e3e6ec;float:left;width:128px;height:180px;padding:10px;border-right:1px solid #d6dce4}#album_box .headline h4{font-size:18px;line-height:16px}#album_box .headline h4 span{font-size:14px;color:#0086cc}#album_box .headline img{margin-bottom:10px;width:128px;height:128px}#album_box .wrap{background:#f4f6f9;float:right;max-height:200px;overflow:auto;width:279px}#album_box .wrap li{padding:7px 9px;overflow:hidden;width:259px;border-bottom:1px solid #e0e6ee;border-top:1px solid #f7f9fb}#album_box .wrap li span{color:#9aa7b3;width:20px;display:inline-block}#album_box .wrap li .playsong,#album_box .wrap li .add{width:20px;height:20px;display:inline-block;background:url("/images/icons/list-controls.png") no-repeat 0 0;vertical-align:middle;float:right}#album_box .wrap li .add{margin-right:6px;background-position:0 -20px}.player{float:right;height:47px;margin:52px 17px 0 0;line-height:47px}.player a{float:left}.player .play{margin:-8px 5px 0 5px}.player .forward,.player .backward{display:inline-block;width:32px;height:32px}.player .volume,.player .repeat,.player #full{margin:-5px 0 0 20px}#sidebar{float:right;width:320px}#sidebar .advertisment{width:300px;height:270px}#sidebar img{float:left}#sidebar sup{display:block;height:20px;line-height:20px;float:left}.nivoSlider{position:relative}.nivoSlider img{position:absolute;top:0px;left:0px}.nivo-slice{display:block;position:absolute;z-index:5;height:100%}.nivo-box{display:block;position:absolute;z-index:5}.jspContainer{overflow:hidden;position:relative}.jspPane{position:absolute}.jspVerticalBar{position:absolute;top:0;right:0;width:6px;height:100%}.jspHorizontalBar{width:0;height:0;display:none}.jspVerticalBar *,.jspHorizontalBar *{margin:0;padding:0}.jspCap{display:none}.jspHorizontalBar .jspCap{float:left}.jspTrack{background:transparent;position:relative;padding:0 0}.jspDrag{background:#e0e6ee;position:relative;top:0;left:2px;width:4px;cursor:pointer}.jspHorizontalBar .jspTrack,.jspHorizontalBar .jspDrag{float:left;height:100%}.jspArrow{background:#50506d;text-indent:-20000px;display:block;cursor:pointer}.jspArrow.jspDisabled{cursor:default;background:#80808d}.jspVerticalBar .jspArrow{height:16px}.jspHorizontalBar .jspArrow{width:16px;float:left;height:100%}.jspVerticalBar .jspArrow:focus{outline:none}.jspCorner{background:#eeeef4;float:left;height:100%}* html .jspCorner{margin:0 -3px 0 0}.list{margin-bottom:20px;display:block;float:left}.list.songs li{height:24px;line-height:24px;width:100%;font-size:13px;margin-bottom:12px;font-family:"Segoe UI", Corbel, Arial, sans-serif}.list.songs li span{color:#a3adb5}.list.songs li a{color:#a3adb5;text-decoration:none}.list.songs li a:hover{color:#0086cc}.list.songs li:last-child{margin-bottom:0}.list.songs li .playsong,.list.songs li .add{width:20px;height:20px;display:inline-block;margin-right:6px;background:url("/images/icons/list-controls.png") no-repeat 0 0;vertical-align:middle}.list.songs li .add{margin-right:16px;background-position:0 -20px}.list.albums{margin-bottom:10px}.list.albums > li{margin-bottom:15px;min-width:450px;position:relative;clear:both}.list.albums > li:last-child{margin-bottom:0}.list.albums > li .songsbtn{text-transform:uppercase;text-decoration:none;color:#0086cc;background:url("/images/icons/list-controls.png") no-repeat 0 -60px;height:20px;line-height:20px;text-indent:25px;display:inline-block;margin-top:10px;font-size:11px}.list.albums .img{margin-right:10px;position:relative;float:left;overflow:hidden;background:url("/images/backgrounds/album.png") 0 6px no-repeat;width:90px;height:74px}.list.albums .img .cover{width:64px;height:64px;margin-left:18px}.list.albums .img .playall{position:absolute;top:0;left:18px;background:transparent url("/images/backgrounds/stripe.png") repeat;width:64px;height:64px;display:none}.list.albums .img .playall a{display:inline-block;width:20px;height:20px;background:url("/images/icons/list-controls.png") no-repeat 0 -40px;margin:22px 0 0 22px}.list.albums .name{font-size:16px;line-height:17px;margin-top:-2px}.list.albums .artist{font-size:12px;color:#a3adb5}.list.related li{overflow:hidden;float:left;margin:0 20px 20px 0;width:150px}.list.related li a{text-decoration:none}.list.related li h5{font-size:14px;text-decoration:none!important;color:#2f3a40;height:30px;line-height:30px;border-bottom:2px solid #0086cc}.list.related li h5 span{color:#0086cc;font-size:11px}.list.related li h5 span:before{content:"("}.list.related li h5 span:after{content:"%)"}.list.related li div{width:150px;height:95px;float:left;overflow:hidden;position:relative;background:url("/images/placeholder/related.png") no-repeat 0 0}.list.artists{width:530px;float:left}.list.artists li{overflow:hidden;display:block;padding-bottom:10px;border-bottom:1px solid #f0f2f4;margin-bottom:10px}.list.artists li .img{width:90px;height:50px;float:left;overflow:hidden;position:relative;background:url("/images/placeholder/artist.png") no-repeat 0 0}.list.artists li .img img{max-width:90px}.list.artists li .text{float:left;margin-left:15px}.list.artists li .text h2{margin:-3px 0 5px 0}.list.artists li .text h2 a{color:#0086cc;font-size:16px;text-decoration:none}.list.artists li .text h2 a:hover{text-decoration:underline}.playlist{background:#080a0c;width:150px;display:none;position:absolute;left:0;top:0}#fullscreen_wrap{width:100%;height:100%;position:fixed;z-index:70;background:#000;top:0;left:0;display:none}#fullscreen{width:950px;position:absolute;margin-left:-475px;z-index:70;opacity:0;top:0;left:50%;display:none}#fullscreen h2{font-size:18px;color:#fff;text-transform:uppercase;font-weight:bold;line-height:14px}#fullscreen h1{font-size:28px;color:#fff;margin-bottom:20px}#fullscreen #video{float:left;width:640px;height:360px;background:transparent url("/images/backgrounds/stripe.png") repeat}#fullscreen .sidebar{float:right;width:310px;height:360px;background:transparent url("/images/backgrounds/stripe.png") repeat}#fullscreen .sidebar .top{width:310px;height:125px;background:transparent url("/images/backgrounds/stripe.png") repeat;text-align:center;line-height:125px}#fullscreen .sidebar .top .player{float:left;margin-top:47px;margin-left:40px}#fullscreen .sidebar .play_list{width:310px;height:235px;padding:10px 0;overflow:auto}#fullscreen .sidebar .play_list li{padding:6px 25px}#fullscreen .sidebar .play_list li h3{font-size:22px;color:white;line-height:22px}#fullscreen .sidebar .play_list li h3 span{display:block;font-size:12px;text-transform:uppercase;color:#0086cc}#fullscreen .sidebar .play_list .jspVerticalBar{left:0!important;opacity:0.02}.ac_results{padding:0px;border:1px solid black;background-color:white;overflow:hidden;z-index:99999}.ac_results ul{width:100%;list-style-position:outside;list-style:none;padding:0;margin:0}.ac_results li{margin:0px;padding:2px 5px;cursor:default;display:block;font:menu;font-size:12px;line-height:16px;overflow:hidden}.ac_loading{background:white url("indicator.gif") right center no-repeat}.ac_odd{background-color:#eee}.ac_over{background-color:#0A246A;color:white}
diff --git a/public/stylesheets/sass/9minutes.scss b/public/stylesheets/sass/9minutes.scss
index d7d6c62..b625cc4 100644
--- a/public/stylesheets/sass/9minutes.scss
+++ b/public/stylesheets/sass/9minutes.scss
@@ -5,8 +5,13 @@
@import "home";
@import "user";
@import "charts";
+@import "search";
+@import "album";
+@import "player";
@import "sidebar";
@import "nivoslider";
+@import "scrolling";
@import "lists";
-@import "fullscreen";
\ No newline at end of file
+@import "fullscreen";
+@import "autocomplete";
\ No newline at end of file
diff --git a/public/stylesheets/sass/_album.scss b/public/stylesheets/sass/_album.scss
new file mode 100644
index 0000000..aa5b5e6
--- /dev/null
+++ b/public/stylesheets/sass/_album.scss
@@ -0,0 +1,78 @@
+/*********************************/
+/************* ALBUM *************/
+/*********************************/
+
+$bg: #f4f6f9;
+
+#album_box {
+ position: absolute;
+ top: 69px;
+ left: 100px;
+ display: none;
+ z-index: 12;
+ border: 7px solid rgba(255,255,255,0.8);
+ //@include rounded(10px);
+ @include shadow(0 0 2px 2px rgba(31,34,40,0.10));
+ > span {
+ position: absolute;
+ top: -19px;
+ left: 70px;
+ background: url('#{$ico-url}/arrow.png') no-repeat;
+ width: 47px;
+ height: 23px;
+ }
+ .headline {
+ background: desaturate(darken($bg,6%),10%);
+ float: left;
+ width: 128px;
+ height: 180px;
+ padding: 10px;
+ border-right: 1px solid desaturate(darken($bg,10%),10%);
+ h4 {
+ font-size: 18px;
+ line-height: 16px;
+ span {
+ font-size: 14px;
+ color: $blue;
+ }
+ }
+ img {
+ margin-bottom: 10px;
+ width: 128px;
+ height: 128px;
+ }
+ }
+
+ .wrap {
+ background: $bg;
+ float: right;
+ max-height: 200px;
+ overflow:auto;
+ width: 279px;
+ //@include rounded(8px);
+ li {
+ padding: 7px 9px;
+ overflow: hidden;
+ width: 259px;
+ border-bottom: 1px solid darken($bg,6%);
+ border-top: 1px solid lighten($bg,01%);
+ span {
+ color: #9aa7b3;
+ width: 20px;
+ display: inline-block;
+ }
+ .playsong, .add {
+ width: 20px;
+ height: 20px;
+ display: inline-block;
+ background: url('#{$ico-url}/list-controls.png') no-repeat 0 0;
+ vertical-align: middle;
+ float: right;
+ }
+ .add {
+ margin-right: 6px;
+ background-position: 0 -20px;
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/public/stylesheets/sass/_artist.scss b/public/stylesheets/sass/_artist.scss
index f35b518..baec25d 100644
--- a/public/stylesheets/sass/_artist.scss
+++ b/public/stylesheets/sass/_artist.scss
@@ -13,12 +13,13 @@ $padding: 28px;
#artist_left {
float: left;
@include set-width-for-artist-left(386px);
-
+
#slider {
position: relative;
width: 386px;
height: 240px;
overflow: hidden;
+ background: url('#{$place-url}/artist-big.png') no-repeat 0 0;
img {
position: absolute;
@@ -27,6 +28,17 @@ $padding: 28px;
max-width: 386px;
}
}
+ h1 {
+ color: #fff;
+ font-size: 30px;
+ $height: 74px;
+ overflow: hidden;
+ height: $height;
+ line-height: $height - 4;
+ text-indent: $padding;
+ margin-bottom: 23px;
+ @include stripe-bg();
+ }
#artist_links {
ul { margin: -2px 0 30px 0; }
li {
diff --git a/public/stylesheets/sass/_autocomplete.scss b/public/stylesheets/sass/_autocomplete.scss
new file mode 100644
index 0000000..e6059e4
--- /dev/null
+++ b/public/stylesheets/sass/_autocomplete.scss
@@ -0,0 +1,52 @@
+/*********************************/
+/********* AUTOCOMPLETE **********/
+/*********************************/
+
+.ac_results {
+ padding: 0px;
+ border: 1px solid black;
+ background-color: white;
+ overflow: hidden;
+ z-index: 99999;
+}
+
+.ac_results ul {
+ width: 100%;
+ list-style-position: outside;
+ list-style: none;
+ padding: 0;
+ margin: 0;
+}
+
+.ac_results li {
+ margin: 0px;
+ padding: 2px 5px;
+ cursor: default;
+ display: block;
+ /*
+ if width will be 100% horizontal scrollbar will apear
+ when scroll mode will be used
+ */
+ /*width: 100%;*/
+ font: menu;
+ font-size: 12px;
+ /*
+ it is very important, if line-height not setted or setted
+ in relative units scroll will be broken in firefox
+ */
+ line-height: 16px;
+ overflow: hidden;
+}
+
+.ac_loading {
+ background: white url('indicator.gif') right center no-repeat;
+}
+
+.ac_odd {
+ background-color: #eee;
+}
+
+.ac_over {
+ background-color: #0A246A;
+ color: white;
+}
\ No newline at end of file
diff --git a/public/stylesheets/sass/_charts.scss b/public/stylesheets/sass/_charts.scss
index 7adf15e..bf356f2 100644
--- a/public/stylesheets/sass/_charts.scss
+++ b/public/stylesheets/sass/_charts.scss
@@ -25,6 +25,7 @@
.img {
width: 90px;
height: $height;
+ background: url('#{$place-url}/artist.png') no-repeat 0 0;
float: left;
overflow: hidden;
position: relative;
@@ -44,9 +45,6 @@
&:hover { text-decoration: underline; }
}
}
- p {
-
- }
}
}
}
\ No newline at end of file
diff --git a/public/stylesheets/sass/_fullscreen.scss b/public/stylesheets/sass/_fullscreen.scss
index 6670f5b..30f631b 100644
--- a/public/stylesheets/sass/_fullscreen.scss
+++ b/public/stylesheets/sass/_fullscreen.scss
@@ -33,19 +33,49 @@
color: #fff;
margin-bottom: 20px;
}
- img.left {
+ #video {
float: left;
width: 640px;
+ height: 360px;
+ @include stripe-bg();
}
.sidebar {
float: right;
width: 310px;
height: 360px;
@include stripe-bg();
- .player {
+ .top {
width: 310px;
height: 125px;
@include stripe-bg();
+ text-align: center;
+ line-height: 125px;
+ .player {
+ float: left;
+ margin-top: 47px;
+ margin-left: 40px;
+ }
+ }
+ .play_list {
+ width: 310px;
+ height: 235px;
+ padding: 10px 0;
+ overflow: auto;
+ li {
+ padding: 6px 25px;
+ h3 {
+ font-size: 22px;
+ color: white;
+ line-height: 22px;
+ span {
+ display: block;
+ font-size: 12px;
+ text-transform: uppercase;
+ color: $blue;
+ }
+ }
+ }
+ .jspVerticalBar { left: 0!important; opacity: 0.02; }
}
}
}
\ No newline at end of file
diff --git a/public/stylesheets/sass/_layout.scss b/public/stylesheets/sass/_layout.scss
index 05b0f24..64797e1 100644
--- a/public/stylesheets/sass/_layout.scss
+++ b/public/stylesheets/sass/_layout.scss
@@ -17,6 +17,7 @@ $ultra-light: #f4f6f9;
$base-url: "/images";
$bg-url: "#{$base-url}/backgrounds";
$ico-url: "#{$base-url}/icons";
+$place-url: "#{$base-url}/placeholder";
/* FUNCTIONS */
@mixin center() {
@@ -30,6 +31,18 @@ $ico-url: "#{$base-url}/icons";
background: transparent url('#{$bg-url}/stripe-dark.png') repeat;
}
+@mixin rounded($radius) {
+ border-radius: $radius;
+ -moz-border-radius: $radius;
+ -webkit-border-radius: $radius;
+}
+@mixin shadow($value) {
+ -moz-box-shadow: $value;
+ -webkit-box-shadow: $value;
+ box-shadow: $value;
+}
+
+
/* SHORTCUTS */
.clean { clear: both; }
@@ -51,7 +64,7 @@ a { cursor: pointer; }
/* OVERALL */
body {
- background: #010203 url('#{$bg-url}/overall.png') no-repeat center top;
+ background: #05070a url('#{$bg-url}/overall.png') no-repeat center top;
color: $content-black;
font-size: 12px;
@include medium-font()
@@ -172,7 +185,7 @@ body {
> div { width: $w - 2*$p; }
.more {
width: $w;
- margin: 0 0 - $p -48px 0 - $p;
+ margin: 7px 0 - $p -48px 0 - $p;
}
}
}
@@ -184,7 +197,7 @@ body {
$padding-width: 37px;
.content {
background: #fff;
- > div { display: none; }
+ > div { display: none; position: relative; }
padding: 48px $padding-width;
}
.more {
@@ -232,16 +245,6 @@ body {
$padding: 22px;
#content {
- h1 {
- color: #fff;
- font-size: 30px;
- $height: 74px;
- height: $height;
- line-height: $height - 4;
- text-indent: $padding;
- margin-bottom: 23px;
- @include stripe-bg();
- }
.information {
overflow: hidden;
padding-bottom: 22px;
@@ -305,8 +308,14 @@ $padding: 22px;
width: 100%;
height: 100%;
position: fixed;
- z-index: 8;
+ z-index: 22;
background: #000;
opacity: 0;
display: none;
+}
+
+.box {
+ padding: 10px;
+ border: 1px solid desaturate(darken($ultra-light, 6%), 20%);
+ background: $ultra-light;
}
\ No newline at end of file
diff --git a/public/stylesheets/sass/_lists.scss b/public/stylesheets/sass/_lists.scss
index c41a941..a2c716c 100644
--- a/public/stylesheets/sass/_lists.scss
+++ b/public/stylesheets/sass/_lists.scss
@@ -5,7 +5,7 @@
.list {
margin-bottom: 20px;
display: block;
- overflow: hidden;
+ float: left;
&.songs {
li {
$height: 24px;
@@ -22,7 +22,7 @@
}
@include std-font();
&:last-child { margin-bottom: 0; }
- .play, .add {
+ .playsong, .add {
width: 20px;
height: 20px;
display: inline-block;
@@ -39,9 +39,11 @@
&.albums {
margin-bottom: 10px;
- li {
- overflow: hidden;
+ > li {
margin-bottom: 15px;
+ min-width: 450px;
+ position: relative;
+ clear: both;
&:last-child { margin-bottom: 0; }
.songsbtn {
text-transform: uppercase;
@@ -127,11 +129,50 @@
float: left;
overflow: hidden;
position: relative;
+ background: url('#{$place-url}/related.png') no-repeat 0 0;
+ }
+ }
+ }
+ &.artists {
+ width: 530px;
+ float: left;
+ li {
+ $height: 50px;
+ overflow: hidden;
+ display: block;
+ padding-bottom: 10px;
+ border-bottom: 1px solid #f0f2f4;
+ margin-bottom: 10px;
+ .img {
+ width: 90px;
+ height: $height;
+ float: left;
+ overflow: hidden;
+ position: relative;
+ background: url('#{$place-url}/artist.png') no-repeat 0 0;
+ img {
+ max-width: 90px;
+ }
+ }
+ .text {
+ float: left;
+ margin-left: 15px;
+ h2 {
+ margin: -3px 0 5px 0;
+ a {
+ color: $blue;
+ font-size: 16px;
+ text-decoration: none;
+ &:hover { text-decoration: underline; }
+ }
+ }
}
}
}
}
+
+
.playlist {
background: #080a0c;
width: 150px;
diff --git a/public/stylesheets/sass/_player.scss b/public/stylesheets/sass/_player.scss
new file mode 100644
index 0000000..2b1463e
--- /dev/null
+++ b/public/stylesheets/sass/_player.scss
@@ -0,0 +1,20 @@
+/*********************************/
+/************ LAYOUT *************/
+/*********************************/
+
+.player {
+ float: right;
+ height: 47px;
+ margin: 52px 17px 0 0;
+ line-height: 47px;
+ a { float: left; }
+ .play { margin: -8px 5px 0 5px; }
+ .forward, .backward {
+ display: inline-block;
+ width: 32px;
+ height: 32px;
+ }
+ .volume, .repeat, #full {
+ margin: -5px 0 0 20px;
+ }
+}
\ No newline at end of file
diff --git a/public/stylesheets/sass/_scrolling.scss b/public/stylesheets/sass/_scrolling.scss
new file mode 100644
index 0000000..ddba7a7
--- /dev/null
+++ b/public/stylesheets/sass/_scrolling.scss
@@ -0,0 +1,122 @@
+/*********************************/
+/********** SCROLLING ************/
+/*********************************/
+
+/*
+ * CSS Styles that are needed by jScrollPane for it to operate correctly.
+ *
+ * Include this stylesheet in your site or copy and paste the styles below into your stylesheet - jScrollPane
+ * may not operate correctly without them.
+ */
+
+.jspContainer
+{
+ overflow: hidden;
+ position: relative;
+}
+
+.jspPane
+{
+ position: absolute;
+}
+
+.jspVerticalBar
+{
+ position: absolute;
+ top: 0;
+ right: 0;
+ width: 6px;
+ height: 100%;
+}
+
+.jspHorizontalBar
+{
+ width: 0; height: 0;
+ display: none;
+}
+
+.jspVerticalBar *,
+.jspHorizontalBar *
+{
+ margin: 0;
+ padding: 0;
+}
+
+.jspCap
+{
+ display: none;
+}
+
+.jspHorizontalBar .jspCap
+{
+ float: left;
+}
+
+.jspTrack
+{
+ background: transparent;
+ position: relative;
+ padding: 0 0;
+}
+
+.jspDrag
+{
+ background: #e0e6ee;
+ position: relative;
+ top: 0;
+ left: 2px;
+ width: 4px;
+ cursor: pointer;
+}
+
+.jspHorizontalBar .jspTrack,
+.jspHorizontalBar .jspDrag
+{
+ float: left;
+ height: 100%;
+}
+
+.jspArrow
+{
+ background: #50506d;
+ text-indent: -20000px;
+ display: block;
+ cursor: pointer;
+}
+
+.jspArrow.jspDisabled
+{
+ cursor: default;
+ background: #80808d;
+}
+
+.jspVerticalBar .jspArrow
+{
+ height: 16px;
+}
+
+.jspHorizontalBar .jspArrow
+{
+ width: 16px;
+ float: left;
+ height: 100%;
+}
+
+.jspVerticalBar .jspArrow:focus
+{
+ outline: none;
+}
+
+.jspCorner
+{
+ background: #eeeef4;
+ float: left;
+ height: 100%;
+}
+
+/* Yuk! CSS Hack for IE6 3 pixel bug :( */
+* html .jspCorner
+{
+ margin: 0 -3px 0 0;
+}
+
diff --git a/public/stylesheets/sass/_search.scss b/public/stylesheets/sass/_search.scss
new file mode 100644
index 0000000..76cc734
--- /dev/null
+++ b/public/stylesheets/sass/_search.scss
@@ -0,0 +1,28 @@
+/*********************************/
+/************ LAYOUT *************/
+/*********************************/
+
+#search_bar {
+ width: 500px;
+ float: left;
+ border: 0;
+ margin-bottom: 20px;
+ position: relative;
+ padding: 15px;
+ input {
+ width: 498px;
+ height: 35px;
+ text-indent: 10px;
+ font-size: 14px;
+ border: 1px solid desaturate(darken($ultra-light, 10%), 20%);
+ @include rounded(4px);
+ &:focus { border-color: $blue }
+ }
+ .button {
+ position: absolute;
+ width: 20px;
+ height: 20px;
+ right: 26px;
+ top: 24px;
+ }
+}
\ No newline at end of file
diff --git a/public/stylesheets/sass/_sidebar.scss b/public/stylesheets/sass/_sidebar.scss
index e901f71..dcb6665 100644
--- a/public/stylesheets/sass/_sidebar.scss
+++ b/public/stylesheets/sass/_sidebar.scss
@@ -8,9 +8,6 @@
.advertisment {
width: 300px;
height: 270px;
- padding: 10px;
- border: 1px solid $ultra-light;
- background: lighten($ultra-light, 2%);
}
img { float: left; }
sup {