This commit is contained in:
Thomas Buchöster
2011-06-29 22:45:56 +02:00
55 changed files with 1097 additions and 61 deletions
+1 -1
View File
@@ -11,4 +11,4 @@ Thumbs.db
/config/sevendigital.yml
/public/images_old/
/public/.sass_cache/
/public/.sass-cache/
+1 -3
View File
@@ -1,9 +1,7 @@
class HomeController < ApplicationController
def show
@charts = LastFM::Chart.getTopArtists 10
LastFM::Request.run_queue!
@files = Dir.glob("public/images/startsite/*.jpg")
render :partial=>"index"
end
+6 -2
View File
@@ -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"
+1 -1
View File
@@ -4,4 +4,4 @@
= 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"
= link_to image_tag("icons/player/fullscreen.png"), "javascript:void(0);", :class=>"full"
+1 -15
View File
@@ -8,21 +8,8 @@
= favicon_link_tag
= favicon_link_tag "9minutes-logo.png", :rel=>"icon", :type=>"image/png"
= 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
#loading Loading
#loading= image_tag "icons/loading_dark.gif", :class=>"loadingimg"
#error Error
#block
#bg_stripe
@@ -40,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
+1 -2
View File
@@ -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"
+1
View File
@@ -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
+3 -1
View File
@@ -19,16 +19,18 @@ 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 "/users/:user", :to => "users#show"
match "/users/:user/edit", :to => "users#edit"
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"
Binary file not shown.

Before

Width:  |  Height:  |  Size: 336 KiB

After

Width:  |  Height:  |  Size: 337 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

+16 -2
View File
@@ -10,8 +10,6 @@
function loadmore(obj){
show_flash(false);
$(obj).parent().children('.list').attr("wanting","true");
size = $(obj).parent().find('li').size();
@@ -51,3 +49,19 @@ function show_li(obj, c){
$(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');
});
}
+3 -3
View File
@@ -1,5 +1,5 @@
$(document).ready(function() {
$('#full').live("click",function(){
$('.full').live("click",function(){
if($(this).hasClass("open")) {
$("#fullscreen").animate({
marginTop: -300,
@@ -12,7 +12,7 @@
}, 500);
$("#fullscreen_wrap").fadeTo(500, 0, function(){$(this).hide();});
});
$(this).removeClass("open");
$('.full').removeClass("open");
}
else {
$("#site, #bg_stripe").animate({
@@ -27,7 +27,7 @@
init_playlist_scrollbar();
$("#fullscreen_wrap").fadeTo(1000, 0.5);
});
$(this).addClass("open");
$('.full').addClass("open");
}
});
});
+17
View File
@@ -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);
});
}
+1 -17
View File
@@ -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:
+5 -9
View File
@@ -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) + "&hellip;" : 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) + "&hellip;" : 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);
}
}
File diff suppressed because one or more lines are too long
+14
View File
@@ -8,6 +8,7 @@
height: 270px;
background: url('#{$ico-url}/loading.gif') no-repeat 50% 50%;
overflow: hidden;
float: left;
img {
position: absolute;
@@ -27,3 +28,16 @@
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') }
}
+11 -2
View File
@@ -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;
+1 -1
View File
@@ -14,7 +14,7 @@
width: 32px;
height: 32px;
}
.volume, .repeat, #full {
.volume, .repeat, .full {
margin: -5px 0 0 20px;
}
}