Merge branch 'master' of https://github.com/tombu/9minutes
@@ -11,4 +11,4 @@ Thumbs.db
|
|||||||
/config/sevendigital.yml
|
/config/sevendigital.yml
|
||||||
|
|
||||||
/public/images_old/
|
/public/images_old/
|
||||||
/public/.sass_cache/
|
/public/.sass-cache/
|
||||||
@@ -1,9 +1,7 @@
|
|||||||
class HomeController < ApplicationController
|
class HomeController < ApplicationController
|
||||||
|
|
||||||
def show
|
def show
|
||||||
@charts = LastFM::Chart.getTopArtists 10
|
@files = Dir.glob("public/images/startsite/*.jpg")
|
||||||
LastFM::Request.run_queue!
|
|
||||||
|
|
||||||
render :partial=>"index"
|
render :partial=>"index"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
%ul#top_artist
|
%ul#top_artist
|
||||||
- @charts.artist.each do |a|
|
- for file in @files
|
||||||
%li= image_tag validate_img_url(a.image, "artist", :mega)
|
%li= image_tag "startsite/"+File.basename(file)
|
||||||
|
%ul#top_artist_nav
|
||||||
|
%li= link_to image_tag("startsite/small/beatles.jpg"),"", :class=>"ll dir"
|
||||||
|
%li= image_tag "startsite/small/katy-perry.jpg", :class=>"cc"
|
||||||
|
%li= link_to image_tag("startsite/small/coldplay.jpg"),"", :class=>"rr dir"
|
||||||
@@ -4,4 +4,4 @@
|
|||||||
= link_to image_tag("icons/player/forward.png"), "javascript:void(0);", :class=>"forward"
|
= 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/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/repeat.png"), "javascript:void(0);", :class=>"repeat"
|
||||||
= link_to image_tag("icons/player/fullscreen.png"), "javascript:void(0);", :id=>"full"
|
= link_to image_tag("icons/player/fullscreen.png"), "javascript:void(0);", :class=>"full"
|
||||||
@@ -8,21 +8,8 @@
|
|||||||
= favicon_link_tag
|
= favicon_link_tag
|
||||||
= favicon_link_tag "9minutes-logo.png", :rel=>"icon", :type=>"image/png"
|
= favicon_link_tag "9minutes-logo.png", :rel=>"icon", :type=>"image/png"
|
||||||
= csrf_meta_tag
|
= csrf_meta_tag
|
||||||
:plain
|
|
||||||
<meta name="msapplication-task"
|
|
||||||
content="name=Home;action-uri=http://www.beautyoftheweb.com/#/startdeveloping;icon-uri=favicon.ico" />
|
|
||||||
|
|
||||||
<meta name="msapplication-task"
|
|
||||||
content="name=Charts;action-uri=http://www.beautyoftheweb.com/#/camps;icon-uri=favicon.ico" />
|
|
||||||
|
|
||||||
<meta name="msapplication-task"
|
|
||||||
content="name=Register;action-uri=http://www.beautyoftheweb.com/#/download;icon-uri=favicon.ico" />
|
|
||||||
|
|
||||||
<meta name="msapplication-task"
|
|
||||||
content="name=About;action-uri=http://www.beautyoftheweb.com/#/download;icon-uri=favicon.ico" />
|
|
||||||
|
|
||||||
%body
|
%body
|
||||||
#loading Loading
|
#loading= image_tag "icons/loading_dark.gif", :class=>"loadingimg"
|
||||||
#error Error
|
#error Error
|
||||||
#block
|
#block
|
||||||
#bg_stripe
|
#bg_stripe
|
||||||
@@ -40,7 +27,6 @@
|
|||||||
#navigation
|
#navigation
|
||||||
%li.active= link_to "home", "/#!/home"
|
%li.active= link_to "home", "/#!/home"
|
||||||
%li= link_to "charts", "/#!/charts"
|
%li= link_to "charts", "/#!/charts"
|
||||||
%li= link_to "about", "#"
|
|
||||||
%li= link_to "register", "/#!/register"
|
%li= link_to "register", "/#!/register"
|
||||||
%li.search
|
%li.search
|
||||||
= form_tag '/search', :method => 'get', :id => "search_form", :remote=>true do
|
= form_tag '/search', :method => 'get', :id => "search_form", :remote=>true do
|
||||||
|
|||||||
@@ -9,8 +9,7 @@ module Nineminutes
|
|||||||
|
|
||||||
# enable caching in development mode
|
# enable caching in development mode
|
||||||
config.action_controller.perform_caching = true
|
config.action_controller.perform_caching = true
|
||||||
|
config.action_controller.page_cache_directory = Rails.root.to_s+"/public/cache/"
|
||||||
config.action_controller.page_cache_directory = RAILS_ROOT+"/public/cache/"
|
|
||||||
|
|
||||||
# asset packaging
|
# asset packaging
|
||||||
config.gem "jammit"
|
config.gem "jammit"
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ javascripts:
|
|||||||
common:
|
common:
|
||||||
- public/javascripts/config.js
|
- public/javascripts/config.js
|
||||||
- public/javascripts/pinify.js
|
- public/javascripts/pinify.js
|
||||||
|
- public/javascripts/home.js
|
||||||
- public/javascripts/player.js
|
- public/javascripts/player.js
|
||||||
- public/javascripts/search.js
|
- public/javascripts/search.js
|
||||||
- public/javascripts/store.js
|
- public/javascripts/store.js
|
||||||
|
|||||||
@@ -19,16 +19,18 @@ Nineminutes::Application.routes.draw do
|
|||||||
match "/more_albums", :to => "artists#more_albums"
|
match "/more_albums", :to => "artists#more_albums"
|
||||||
match "/more_artists", :to => "search#more_artists"
|
match "/more_artists", :to => "search#more_artists"
|
||||||
match "/more_charts", :to => "charts#more"
|
match "/more_charts", :to => "charts#more"
|
||||||
|
|
||||||
#get "artists/", :to => "artists#index"
|
#get "artists/", :to => "artists#index"
|
||||||
match "/users/:user", :to => "users#show"
|
match "/users/:user", :to => "users#show"
|
||||||
match "/users/:user/edit", :to => "users#edit"
|
match "/users/:user/edit", :to => "users#edit"
|
||||||
|
|
||||||
|
|
||||||
match "/autocomplete", :to => "search#autocomplete"
|
match "/autocomplete", :to => "search#autocomplete"
|
||||||
match "/album_info", :to => "artists#album_info"
|
match "/album_info", :to => "artists#album_info"
|
||||||
match "/search_video", :to => "tracks#search_video"
|
match "/search_video", :to => "tracks#search_video"
|
||||||
|
|
||||||
#resources :artists, :constraints => { :id => /.*/ }
|
#resources :artists, :constraints => { :id => /.*/ }
|
||||||
resources :search
|
resources :search, :constraints => { :id => /.*/ }
|
||||||
#resources :users, :only => [ :show ]
|
#resources :users, :only => [ :show ]
|
||||||
|
|
||||||
get "home/", :to => "home#show"
|
get "home/", :to => "home#show"
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 336 KiB After Width: | Height: | Size: 337 KiB |
|
After Width: | Height: | Size: 59 KiB |
|
After Width: | Height: | Size: 59 KiB |
|
After Width: | Height: | Size: 67 KiB |
|
After Width: | Height: | Size: 43 KiB |
|
After Width: | Height: | Size: 68 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 54 KiB |
|
After Width: | Height: | Size: 48 KiB |
|
After Width: | Height: | Size: 87 KiB |
|
After Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 36 KiB |
|
After Width: | Height: | Size: 39 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 39 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 40 KiB |
@@ -10,8 +10,6 @@
|
|||||||
|
|
||||||
|
|
||||||
function loadmore(obj){
|
function loadmore(obj){
|
||||||
show_flash(false);
|
|
||||||
|
|
||||||
$(obj).parent().children('.list').attr("wanting","true");
|
$(obj).parent().children('.list').attr("wanting","true");
|
||||||
|
|
||||||
size = $(obj).parent().find('li').size();
|
size = $(obj).parent().find('li').size();
|
||||||
@@ -50,4 +48,20 @@ function show_li(obj, c){
|
|||||||
setTimeout(function(){
|
setTimeout(function(){
|
||||||
$(obj).show();
|
$(obj).show();
|
||||||
}, 200+c);
|
}, 200+c);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function disable_more_button(obj){
|
||||||
|
$(obj).die("click");
|
||||||
|
$(obj).unbind('mouseenter mouseleave');
|
||||||
|
$(obj).addClass("disabled");
|
||||||
|
$(obj).html('<img src="images/icons/loading_dark.gif" class="loadingimg" />');
|
||||||
|
}
|
||||||
|
|
||||||
|
function enable_more_button(){
|
||||||
|
more_hover();
|
||||||
|
$('.more').each(function(){
|
||||||
|
$(this).removeClass("disabled");
|
||||||
|
$(this).html('SHOW MORE');
|
||||||
|
});
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$('#full').live("click",function(){
|
$('.full').live("click",function(){
|
||||||
if($(this).hasClass("open")) {
|
if($(this).hasClass("open")) {
|
||||||
$("#fullscreen").animate({
|
$("#fullscreen").animate({
|
||||||
marginTop: -300,
|
marginTop: -300,
|
||||||
@@ -12,7 +12,7 @@
|
|||||||
}, 500);
|
}, 500);
|
||||||
$("#fullscreen_wrap").fadeTo(500, 0, function(){$(this).hide();});
|
$("#fullscreen_wrap").fadeTo(500, 0, function(){$(this).hide();});
|
||||||
});
|
});
|
||||||
$(this).removeClass("open");
|
$('.full').removeClass("open");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$("#site, #bg_stripe").animate({
|
$("#site, #bg_stripe").animate({
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
init_playlist_scrollbar();
|
init_playlist_scrollbar();
|
||||||
$("#fullscreen_wrap").fadeTo(1000, 0.5);
|
$("#fullscreen_wrap").fadeTo(1000, 0.5);
|
||||||
});
|
});
|
||||||
$(this).addClass("open");
|
$('.full').addClass("open");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
|
||||||
|
// Default paths for application
|
||||||
|
// DON'T CHANGE!!!
|
||||||
|
var hashbang = "#!";
|
||||||
|
var artist_path = "/artists/";
|
||||||
|
var home_path = "/home";
|
||||||
|
function init_home(){
|
||||||
|
$('#top_artist').nivoSlider({
|
||||||
|
controlNav: false,
|
||||||
|
pauseTime: 3000
|
||||||
|
});
|
||||||
|
$('#top_artist_nav .dir').hover(function(){
|
||||||
|
$(this).children("img").stop().fadeTo(300, 0.15);
|
||||||
|
}, function(){
|
||||||
|
$(this).children("img").stop().fadeTo(300, 0.4);
|
||||||
|
});
|
||||||
|
}
|
||||||
@@ -73,19 +73,6 @@ function add_more_button(){
|
|||||||
more_hover();
|
more_hover();
|
||||||
}
|
}
|
||||||
|
|
||||||
function disable_more_button(obj){
|
|
||||||
$(obj).die("click");
|
|
||||||
$(obj).unbind('mouseenter mouseleave');
|
|
||||||
$(obj).addClass("disabled");
|
|
||||||
}
|
|
||||||
|
|
||||||
function enable_more_button(){
|
|
||||||
more_hover();
|
|
||||||
$('.more').each(function(){
|
|
||||||
$(this).removeClass("disabled");
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function margin_fixes(){
|
function margin_fixes(){
|
||||||
$('.list.related li:nth-child(3n)').css("marginRight", 0);
|
$('.list.related li:nth-child(3n)').css("marginRight", 0);
|
||||||
@@ -138,10 +125,7 @@ function init_site(link){
|
|||||||
init_artist();
|
init_artist();
|
||||||
break;
|
break;
|
||||||
case home_path:
|
case home_path:
|
||||||
$('#top_artist').nivoSlider({
|
init_home();
|
||||||
controlNav: true,
|
|
||||||
pauseTime: 3000
|
|
||||||
});
|
|
||||||
set_active_navigation(home_path);
|
set_active_navigation(home_path);
|
||||||
break;
|
break;
|
||||||
case charts_path:
|
case charts_path:
|
||||||
|
|||||||
@@ -3,23 +3,16 @@
|
|||||||
function bing_search(search_term)
|
function bing_search(search_term)
|
||||||
{
|
{
|
||||||
var requestStr = "http://api.bing.net/json.aspx?"
|
var requestStr = "http://api.bing.net/json.aspx?"
|
||||||
// Common request fields (required)
|
|
||||||
+ "AppId=" + app_id
|
+ "AppId=" + app_id
|
||||||
+ "&Query=" + search_term
|
+ "&Query=" + search_term
|
||||||
+ "&Sources=Web"
|
+ "&Sources=Web"
|
||||||
|
|
||||||
// Common request fields (optional)
|
|
||||||
+ "&Version=2.0"
|
+ "&Version=2.0"
|
||||||
+ "&Market=en-us"
|
+ "&Market=en-us"
|
||||||
+ "&Adult=Moderate"
|
+ "&Adult=Moderate"
|
||||||
+ "&Options=EnableHighlighting"
|
+ "&Options=EnableHighlighting"
|
||||||
|
+ "&Web.Count=4"
|
||||||
// Web-specific request fields (optional)
|
|
||||||
+ "&Web.Count=5"
|
|
||||||
+ "&Web.Offset=0"
|
+ "&Web.Offset=0"
|
||||||
+ "&Web.Options=DisableHostCollapsing+DisableQueryAlterations"
|
+ "&Web.Options=DisableHostCollapsing+DisableQueryAlterations"
|
||||||
|
|
||||||
// JSON-specific request fields (optional)
|
|
||||||
+ "&JsonType=callback"
|
+ "&JsonType=callback"
|
||||||
+ "&JsonCallback=SearchCompleted";
|
+ "&JsonCallback=SearchCompleted";
|
||||||
|
|
||||||
@@ -47,8 +40,11 @@ function DisplayResults(response)
|
|||||||
for (var i = 0; i < results.length; ++i)
|
for (var i = 0; i < results.length; ++i)
|
||||||
{
|
{
|
||||||
title = (results[i].Title.length > 40) ? results[i].Title.substring(0,40) + "…" : results[i].Title;
|
title = (results[i].Title.length > 40) ? results[i].Title.substring(0,40) + "…" : results[i].Title;
|
||||||
$appendData = "<li><a href=\""+results[i].Url+"\"><h3>"+title+"</h3>"+results[i].DisplayUrl+"</a></li>";
|
url = (results[i].DisplayUrl.length > 55) ? results[i].DisplayUrl.substring(0,55) + "…" : results[i].DisplayUrl;
|
||||||
|
|
||||||
|
$appendData = "<li><a href=\""+results[i].Url+"\"><h3>"+title+"</h3>"+url+"</a></li>";
|
||||||
$appendData = ReplaceHighlightingCharacters($appendData, "<span>", "</span>");
|
$appendData = ReplaceHighlightingCharacters($appendData, "<span>", "</span>");
|
||||||
|
|
||||||
$('#artist_links ul').append($appendData);
|
$('#artist_links ul').append($appendData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
height: 270px;
|
height: 270px;
|
||||||
background: url('#{$ico-url}/loading.gif') no-repeat 50% 50%;
|
background: url('#{$ico-url}/loading.gif') no-repeat 50% 50%;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
float: left;
|
||||||
|
|
||||||
img {
|
img {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@@ -26,4 +27,17 @@
|
|||||||
position:relative;
|
position:relative;
|
||||||
margin-right:10px;
|
margin-right:10px;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
#top_artist_nav {
|
||||||
|
float: right;
|
||||||
|
li, a, img {
|
||||||
|
width: 150px;
|
||||||
|
height: 199px;
|
||||||
|
display: inline-block;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
a, img { position: absolute; }
|
||||||
|
.ll img, .rr img { opacity: 0.4 }
|
||||||
|
.ll { background: url('#{$ico-url}/home-left.png') }
|
||||||
|
.rr { background: url('#{$ico-url}/home-right.png') }
|
||||||
}
|
}
|
||||||
@@ -18,6 +18,8 @@ $base-url: "/images";
|
|||||||
$bg-url: "#{$base-url}/backgrounds";
|
$bg-url: "#{$base-url}/backgrounds";
|
||||||
$ico-url: "#{$base-url}/icons";
|
$ico-url: "#{$base-url}/icons";
|
||||||
$place-url: "#{$base-url}/placeholder";
|
$place-url: "#{$base-url}/placeholder";
|
||||||
|
$home-url: "#{$base-url}/startsite";
|
||||||
|
|
||||||
|
|
||||||
/* FUNCTIONS */
|
/* FUNCTIONS */
|
||||||
@mixin center() {
|
@mixin center() {
|
||||||
@@ -150,7 +152,7 @@ body {
|
|||||||
float: right;
|
float: right;
|
||||||
|
|
||||||
h6 {
|
h6 {
|
||||||
color: #243037;
|
color: #aab7c4;
|
||||||
font-size: $font-size;
|
font-size: $font-size;
|
||||||
float: left;
|
float: left;
|
||||||
height: $height;
|
height: $height;
|
||||||
@@ -209,8 +211,12 @@ body {
|
|||||||
line-height: 40px;
|
line-height: 40px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
&.disabled {
|
&.disabled {
|
||||||
opacity: 0.3;
|
|
||||||
cursor: default;
|
cursor: default;
|
||||||
|
background: #0086cc!important;
|
||||||
|
}
|
||||||
|
.loadingimg {
|
||||||
|
display: inline-block;
|
||||||
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
&.w01 { @include set-width-for-tabs(564px, $padding-width) }
|
&.w01 { @include set-width-for-tabs(564px, $padding-width) }
|
||||||
@@ -290,6 +296,9 @@ $padding: 22px;
|
|||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
display: none;
|
display: none;
|
||||||
z-index: 999;
|
z-index: 999;
|
||||||
|
.loadingimg {
|
||||||
|
margin-top: 5px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#error {
|
#error {
|
||||||
background: $red;
|
background: $red;
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
width: 32px;
|
width: 32px;
|
||||||
height: 32px;
|
height: 32px;
|
||||||
}
|
}
|
||||||
.volume, .repeat, #full {
|
.volume, .repeat, .full {
|
||||||
margin: -5px 0 0 20px;
|
margin: -5px 0 0 20px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||