Homesite 50%;
@@ -1,9 +1,7 @@
|
||||
class HomeController < ApplicationController
|
||||
|
||||
def show
|
||||
@charts = LastFM::Chart.getTopArtists 10
|
||||
LastFM::Request.run_queue!
|
||||
|
||||
def show
|
||||
@files = Dir.glob("public/images/startsite/*.jpg")
|
||||
render :partial=>"index"
|
||||
end
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
%ul#top_artist
|
||||
- @charts.artist.each do |a|
|
||||
%li= image_tag validate_img_url(a.image, "artist", :mega)
|
||||
- for file in @files
|
||||
%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"
|
||||
@@ -9,7 +9,7 @@
|
||||
= favicon_link_tag "9minutes-logo.png", :rel=>"icon", :type=>"image/png"
|
||||
= csrf_meta_tag
|
||||
%body
|
||||
#loading Loading
|
||||
#loading= image_tag "icons/loading_dark.gif", :class=>"loadingimg"
|
||||
#error Error
|
||||
#block
|
||||
#bg_stripe
|
||||
@@ -27,7 +27,6 @@
|
||||
#navigation
|
||||
%li.active= link_to "home", "/#!/home"
|
||||
%li= link_to "charts", "/#!/charts"
|
||||
%li= link_to "about", "#"
|
||||
%li= link_to "register", "/#!/register"
|
||||
%li.search
|
||||
= form_tag '/search', :method => 'get', :id => "search_form", :remote=>true do
|
||||
|
||||
@@ -9,8 +9,7 @@ module Nineminutes
|
||||
|
||||
# enable caching in development mode
|
||||
config.action_controller.perform_caching = true
|
||||
|
||||
config.action_controller.page_cache_directory = RAILS_ROOT+"/public/cache/"
|
||||
config.action_controller.page_cache_directory = Rails.root.to_s+"/public/cache/"
|
||||
|
||||
# asset packaging
|
||||
config.gem "jammit"
|
||||
|
||||
@@ -12,6 +12,7 @@ javascripts:
|
||||
common:
|
||||
- public/javascripts/config.js
|
||||
- public/javascripts/pinify.js
|
||||
- public/javascripts/home.js
|
||||
- public/javascripts/player.js
|
||||
- public/javascripts/search.js
|
||||
- public/javascripts/store.js
|
||||
|
||||
@@ -19,14 +19,13 @@ Nineminutes::Application.routes.draw do
|
||||
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 :search, :constraints => { :id => /.*/ }
|
||||
resources :users, :only => [ :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){
|
||||
show_flash(false);
|
||||
|
||||
$(obj).parent().children('.list').attr("wanting","true");
|
||||
|
||||
size = $(obj).parent().find('li').size();
|
||||
@@ -50,4 +48,20 @@ function show_li(obj, c){
|
||||
setTimeout(function(){
|
||||
$(obj).show();
|
||||
}, 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');
|
||||
});
|
||||
}
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
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(){
|
||||
$('.list.related li:nth-child(3n)').css("marginRight", 0);
|
||||
@@ -138,10 +125,7 @@ function init_site(link){
|
||||
init_artist();
|
||||
break;
|
||||
case home_path:
|
||||
$('#top_artist').nivoSlider({
|
||||
controlNav: true,
|
||||
pauseTime: 3000
|
||||
});
|
||||
init_home();
|
||||
set_active_navigation(home_path);
|
||||
break;
|
||||
case charts_path:
|
||||
|
||||
@@ -3,23 +3,16 @@
|
||||
function bing_search(search_term)
|
||||
{
|
||||
var requestStr = "http://api.bing.net/json.aspx?"
|
||||
// Common request fields (required)
|
||||
+ "AppId=" + app_id
|
||||
+ "&Query=" + search_term
|
||||
+ "&Sources=Web"
|
||||
|
||||
// Common request fields (optional)
|
||||
+ "&Version=2.0"
|
||||
+ "&Market=en-us"
|
||||
+ "&Adult=Moderate"
|
||||
+ "&Options=EnableHighlighting"
|
||||
|
||||
// Web-specific request fields (optional)
|
||||
+ "&Web.Count=5"
|
||||
+ "&Web.Count=4"
|
||||
+ "&Web.Offset=0"
|
||||
+ "&Web.Options=DisableHostCollapsing+DisableQueryAlterations"
|
||||
|
||||
// JSON-specific request fields (optional)
|
||||
+ "&JsonType=callback"
|
||||
+ "&JsonCallback=SearchCompleted";
|
||||
|
||||
@@ -47,8 +40,11 @@ function DisplayResults(response)
|
||||
for (var i = 0; i < results.length; ++i)
|
||||
{
|
||||
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>");
|
||||
|
||||
$('#artist_links ul').append($appendData);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -166,7 +166,7 @@ body {
|
||||
padding: 25px 0;
|
||||
float: right; }
|
||||
#foot h6 {
|
||||
color: #243037;
|
||||
color: #aab7c4;
|
||||
font-size: 11px;
|
||||
float: left;
|
||||
height: 20px;
|
||||
@@ -210,8 +210,11 @@ body {
|
||||
line-height: 40px;
|
||||
font-weight: bold; }
|
||||
.tabs .more.disabled {
|
||||
opacity: 0.3;
|
||||
cursor: default; }
|
||||
cursor: default;
|
||||
background: #0086cc!important; }
|
||||
.tabs .more .loadingimg {
|
||||
display: inline-block;
|
||||
margin-top: 10px; }
|
||||
.tabs.w01 .nav {
|
||||
width: 564px; }
|
||||
.tabs.w01 .content {
|
||||
@@ -291,6 +294,8 @@ body {
|
||||
text-transform: uppercase;
|
||||
display: none;
|
||||
z-index: 999; }
|
||||
#loading .loadingimg, #error .loadingimg {
|
||||
margin-top: 5px; }
|
||||
|
||||
#error {
|
||||
background: #ee0000; }
|
||||
@@ -391,7 +396,8 @@ body {
|
||||
width: 500px;
|
||||
height: 270px;
|
||||
background: url("/images/icons/loading.gif") no-repeat 50% 50%;
|
||||
overflow: hidden; }
|
||||
overflow: hidden;
|
||||
float: left; }
|
||||
#top_artist img {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
@@ -410,6 +416,22 @@ body {
|
||||
position: relative;
|
||||
margin-right: 10px; }
|
||||
|
||||
#top_artist_nav {
|
||||
float: right; }
|
||||
#top_artist_nav li, #top_artist_nav a, #top_artist_nav img {
|
||||
width: 150px;
|
||||
height: 199px;
|
||||
display: inline-block;
|
||||
float: left; }
|
||||
#top_artist_nav a, #top_artist_nav img {
|
||||
position: absolute; }
|
||||
#top_artist_nav .ll img, #top_artist_nav .rr img {
|
||||
opacity: 0.4; }
|
||||
#top_artist_nav .ll {
|
||||
background: url("/images/icons/home-left.png"); }
|
||||
#top_artist_nav .rr {
|
||||
background: url("/images/icons/home-right.png"); }
|
||||
|
||||
/*********************************/
|
||||
/************ LAYOUT *************/
|
||||
/*********************************/
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
height: 270px;
|
||||
background: url('#{$ico-url}/loading.gif') no-repeat 50% 50%;
|
||||
overflow: hidden;
|
||||
float: left;
|
||||
|
||||
img {
|
||||
position: absolute;
|
||||
@@ -26,4 +27,17 @@
|
||||
position:relative;
|
||||
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";
|
||||
$ico-url: "#{$base-url}/icons";
|
||||
$place-url: "#{$base-url}/placeholder";
|
||||
$home-url: "#{$base-url}/startsite";
|
||||
|
||||
|
||||
/* FUNCTIONS */
|
||||
@mixin center() {
|
||||
@@ -150,7 +152,7 @@ body {
|
||||
float: right;
|
||||
|
||||
h6 {
|
||||
color: #243037;
|
||||
color: #aab7c4;
|
||||
font-size: $font-size;
|
||||
float: left;
|
||||
height: $height;
|
||||
@@ -209,8 +211,12 @@ body {
|
||||
line-height: 40px;
|
||||
font-weight: bold;
|
||||
&.disabled {
|
||||
opacity: 0.3;
|
||||
cursor: default;
|
||||
background: #0086cc!important;
|
||||
}
|
||||
.loadingimg {
|
||||
display: inline-block;
|
||||
margin-top: 10px;
|
||||
}
|
||||
}
|
||||
&.w01 { @include set-width-for-tabs(564px, $padding-width) }
|
||||
@@ -290,6 +296,9 @@ $padding: 22px;
|
||||
text-transform: uppercase;
|
||||
display: none;
|
||||
z-index: 999;
|
||||
.loadingimg {
|
||||
margin-top: 5px;
|
||||
}
|
||||
}
|
||||
#error {
|
||||
background: $red;
|
||||
|
||||