From a29f4433cae42aa6e4c9508f1ff2edf8c05fbc69 Mon Sep 17 00:00:00 2001 From: Gregory Eremin Date: Mon, 10 Sep 2012 20:45:17 +0400 Subject: [PATCH] Boostrap 2.1 --- Gemfile | 4 +- Gemfile.lock | 41 +++++-------- app/assets/javascripts/application.js.coffee | 14 ++--- .../javascripts/backbone/beat_haven.js.coffee | 3 +- .../backbone/models/track.js.coffee | 6 +- .../backbone/templates/album/show.mustache | 4 +- .../backbone/templates/artist/show.mustache | 58 ++++++++++--------- .../bindings/autocomplete.js.coffee | 6 +- app/assets/stylesheets/album-track.css.scss | 17 +++--- app/assets/stylesheets/application.css.scss | 11 ++-- app/assets/stylesheets/artist.css.scss | 16 ++--- app/assets/stylesheets/autocomplete.css.scss | 20 +++---- app/assets/stylesheets/player.css.scss | 14 ++--- app/assets/stylesheets/playlist.css.scss | 6 +- .../{auth.css.scss => preferences.css.scss} | 2 +- 15 files changed, 104 insertions(+), 118 deletions(-) rename app/assets/stylesheets/{auth.css.scss => preferences.css.scss} (91%) diff --git a/Gemfile b/Gemfile index 1d089d5..c762625 100644 --- a/Gemfile +++ b/Gemfile @@ -14,7 +14,7 @@ group :assets do gem "rails-backbone" gem "hogan_assets" gem "bourbon" - gem "bootstrap-sass", "~> 2.0.4.0" + gem "bootstrap-sass", "~> 2.1.0.0" gem "soundmanager-rails" gem "font-awesome-rails" end @@ -29,5 +29,5 @@ end gem "jbuilder" gem "haml" +gem "lastfm-client" gem "robbie", path: "../robbie" -gem "beatparser", path: "../beatparser" diff --git a/Gemfile.lock b/Gemfile.lock index 3bd7036..b24fe8f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,11 +1,3 @@ -PATH - remote: ../beatparser - specs: - beatparser (0.0.1) - lastfm-client - musicbrainz - robbie - PATH remote: ../robbie specs: @@ -45,12 +37,12 @@ GEM multi_json (~> 1.0) arel (3.0.2) awesome_print (1.0.2) - blankslate (2.1.2.4) - bootstrap-sass (2.0.4.0) + blankslate (3.1.2) + bootstrap-sass (2.1.0.0) bourbon (2.1.1) sass (>= 3.1) - builder (3.0.0) - capistrano (2.12.0) + builder (3.0.3) + capistrano (2.13.3) highline net-scp (>= 1.0.0) net-sftp (>= 2.0.0) @@ -66,27 +58,27 @@ GEM daemons (1.1.9) ejs (1.0.0) erubis (2.7.0) - eventmachine (0.12.10) + eventmachine (1.0.0) execjs (1.4.0) multi_json (~> 1.0) font-awesome-rails (0.4.0) railties (~> 3.1) haml (3.1.7) - highline (1.6.13) + highline (1.6.14) hike (1.2.1) hogan_assets (1.3.2) execjs (>= 1.2.9) sprockets (>= 2.0.3) tilt (>= 1.3.3) - httparty (0.8.3) + httparty (0.9.0) multi_json (~> 1.0) multi_xml - i18n (0.6.0) - jbuilder (0.4.0) + i18n (0.6.1) + jbuilder (0.5.0) activesupport (>= 3.0.0) blankslate (>= 2.1.2.4) journey (1.0.4) - jquery-rails (2.1.1) + jquery-rails (2.1.2) railties (>= 3.1.0, < 5.0) thor (~> 0.14) json (1.7.5) @@ -100,8 +92,6 @@ GEM mime-types (1.19) multi_json (1.3.6) multi_xml (0.5.1) - musicbrainz (0.7.0) - nokogiri net-scp (1.0.4) net-ssh (>= 1.99.1) net-sftp (2.0.5) @@ -109,9 +99,8 @@ GEM net-ssh (2.5.2) net-ssh-gateway (1.1.0) net-ssh (>= 1.99.1) - nokogiri (1.5.5) oj (1.3.4) - pg (0.14.0) + pg (0.14.1) polyglot (0.3.3) rack (1.4.1) rack-cache (1.2) @@ -164,17 +153,16 @@ GEM polyglot polyglot (>= 0.3.1) tzinfo (0.3.33) - uglifier (1.2.7) + uglifier (1.3.0) execjs (>= 0.3.0) - multi_json (~> 1.3) + multi_json (~> 1.0, >= 1.0.2) PLATFORMS ruby DEPENDENCIES awesome_print - beatparser! - bootstrap-sass (~> 2.0.4.0) + bootstrap-sass (~> 2.1.0.0) bourbon capistrano coffee-rails (~> 3.2.1) @@ -183,6 +171,7 @@ DEPENDENCIES hogan_assets jbuilder jquery-rails + lastfm-client pg rails (= 3.2.8) rails-backbone diff --git a/app/assets/javascripts/application.js.coffee b/app/assets/javascripts/application.js.coffee index 512174f..1dc96f3 100644 --- a/app/assets/javascripts/application.js.coffee +++ b/app/assets/javascripts/application.js.coffee @@ -2,7 +2,11 @@ #= require jquery_ujs #= require jquery.autocomplete -# require soundmanager +#= require bootstrap-dropdown +#= require bootstrap-tooltip +#= require bootstrap-popover + +#= require soundmanager #= require vk_music #= require hogan @@ -14,10 +18,4 @@ #= require backbone/beat_haven #= require locale/en #= require locale/ru - -#= require bootstrap-dropdown -#= require bootstrap-tooltip -#= require bootstrap-popover - -#= require_tree . - +#= require_tree ./bindings diff --git a/app/assets/javascripts/backbone/beat_haven.js.coffee b/app/assets/javascripts/backbone/beat_haven.js.coffee index 054c7f0..8e3aa22 100644 --- a/app/assets/javascripts/backbone/beat_haven.js.coffee +++ b/app/assets/javascripts/backbone/beat_haven.js.coffee @@ -5,7 +5,6 @@ #= require_tree ./collections #= require_tree ./views #= require_tree ./routers -#= require ./i18n window.BeatHaven = Modules: {} @@ -29,7 +28,7 @@ window.BeatHaven = @VK = new BeatHaven.Models.VK() @I18n = new BeatHaven.Modules.I18n() - # @VK.init() + @VK.init() Backbone.history.start(pushState: true); $("a").live "click", (e) -> diff --git a/app/assets/javascripts/backbone/models/track.js.coffee b/app/assets/javascripts/backbone/models/track.js.coffee index 583473d..9fa24cc 100644 --- a/app/assets/javascripts/backbone/models/track.js.coffee +++ b/app/assets/javascripts/backbone/models/track.js.coffee @@ -15,9 +15,9 @@ class BeatHaven.Models.Track extends Backbone.Model artists: @.get("artists") track: @.get("title") ) - # unless @.get("sm_obj")? - # this.add_to_library(autoload: true, autoplay: false) - # BH.Player.play(this) + unless @.get("sm_obj")? + this.add_to_library(autoload: true, autoplay: false) + BH.Player.play(this) $(".artist-page .tracks li[data-id]").removeClass("now-playing").removeClass("paused") this.node().addClass("now-playing") diff --git a/app/assets/javascripts/backbone/templates/album/show.mustache b/app/assets/javascripts/backbone/templates/album/show.mustache index 70a7e0b..ce85d76 100644 --- a/app/assets/javascripts/backbone/templates/album/show.mustache +++ b/app/assets/javascripts/backbone/templates/album/show.mustache @@ -9,12 +9,12 @@ {{i18n_add}} -
+
+ {{/artist_albums}} diff --git a/app/assets/javascripts/bindings/autocomplete.js.coffee b/app/assets/javascripts/bindings/autocomplete.js.coffee index c01dc04..6aeea07 100644 --- a/app/assets/javascripts/bindings/autocomplete.js.coffee +++ b/app/assets/javascripts/bindings/autocomplete.js.coffee @@ -1,10 +1,10 @@ $ -> $(".navbar-search input").focus -> - $(this).animate(width: 249) + $(this).animate(width: 244) $(".player").animate(width: 368) $(".navbar-search input").blur -> - $(this).animate(width: 99) - $(".player").animate(width: 518) + $(this).animate(width: 133) + $(".player").animate(width: 467) window.desired = $(".navbar-search input").autocomplete serviceUrl: "/api/search/complete.json" diff --git a/app/assets/stylesheets/album-track.css.scss b/app/assets/stylesheets/album-track.css.scss index 715cf1d..fc840ad 100644 --- a/app/assets/stylesheets/album-track.css.scss +++ b/app/assets/stylesheets/album-track.css.scss @@ -1,10 +1,11 @@ .artist-page .album .tracks { - margin-left: 265px; + margin: 0 0 10px 0; & > li { position: relative; display: block; - width: 100%; + margin: 0 0 0 -5px; + width: 625px; height: 38px; list-style: none; font-family: "Source Sans Pro", $helvetica; @@ -15,7 +16,7 @@ &:after { content: ""; display: block; - width: 627px; + width: 578px; float: right; border-bottom: #e0e0e0 1px solid; margin: 0 5px 0 0; @@ -54,12 +55,12 @@ } .btn-round { - width: 10px; + width: 2px; height: 22px; border-radius: 50px; i { - margin: 6px 0 0 -2px; + margin: 5px 0 0 -6px; } } @@ -82,11 +83,11 @@ top: 5px; left: 42px; height: 28px; - max-width: 580px; + max-width: 530px; overflow: hidden; .inner { - width: 1000px; + width: 10000px; .track-link { color: #303030; @@ -135,7 +136,7 @@ display: none; i { - margin-left: -3px; + margin-left: -7px; } } diff --git a/app/assets/stylesheets/application.css.scss b/app/assets/stylesheets/application.css.scss index b561cd2..783ba92 100644 --- a/app/assets/stylesheets/application.css.scss +++ b/app/assets/stylesheets/application.css.scss @@ -9,7 +9,7 @@ @import "album-track"; @import "player"; @import "playlist"; -@import "auth"; +@import "preferences"; @import "popup"; @import "tour"; @@ -27,6 +27,7 @@ body { .navbar { background-color: #0a3a82; background: url($blue_noise); + @include box-shadow(0 0 5px rgba(0, 0, 0, .5)); .navbar-inner { background: none; @@ -37,10 +38,11 @@ body { } } a.brand { - margin-top: 1px; + margin-top: -1px; font-family: "Lobster Two", $helvetica; font-style: italic; font-size: 24px; + line-height: 24px; color: #fafafa; letter-spacing: 1px; text-shadow: 1px 1px 0 rgba(255, 255, 255, .2); @@ -51,11 +53,12 @@ body { } } .navbar-search { - margin-top: 8px; + margin: 6px; input { - width: 99px; + width: 133px; line-height: 16px; + color: #ffffff; border-color: rgba(0, 0, 0, .4); background-color: rgba(0, 0, 0, .3); diff --git a/app/assets/stylesheets/artist.css.scss b/app/assets/stylesheets/artist.css.scss index caae2ae..9174f55 100644 --- a/app/assets/stylesheets/artist.css.scss +++ b/app/assets/stylesheets/artist.css.scss @@ -5,20 +5,19 @@ weight: 700; size: 42px; } - line-height: 64px; + line-height: 48px; letter-spacing: 1px; text-shadow: 0 0 1px rgba(0, 0, 0, .3); } .artist-info { - min-height: 250px; + min-height: 300px; margin-bottom: 20px; .pic { - float: left; img { - width: 250px; + width: 100%; margin-top: 5px; border: { size: 1px; @@ -30,7 +29,6 @@ } } .bio { - margin-left: 270px; font-family: "Source Sans Pro", $helvetica; font-size: 22px; line-height: 26px; @@ -46,19 +44,17 @@ font: { family: "Lobster Two", $helvetica; weight: 700; - size: 26px; + size: 28px; } + margin: 5px 0; text-shadow: 0 0 1px rgba(0, 0, 0, .3); } .pic { - float: left; - height: 300px; text-align: center; img { background-color: #a0a0a0; - width: 250px; - height: 250px; + width: 100%; margin-top: 5px; border: { size: 1px; diff --git a/app/assets/stylesheets/autocomplete.css.scss b/app/assets/stylesheets/autocomplete.css.scss index 059628d..619ea5e 100644 --- a/app/assets/stylesheets/autocomplete.css.scss +++ b/app/assets/stylesheets/autocomplete.css.scss @@ -1,25 +1,24 @@ .autocomplete-w1 { - margin: 10px 0 0 0; - width: 268px; + margin: 8px 0 0 0; + width: 274px; background: { - color: #f0f0f0; - color: rgba(240, 243, 246, .95); + color: #124ba8; + color: rgba(18, 75, 158, .95); } @include box-shadow(5px 14px 5px rgba(0, 0, 0, .15)); .autocomplete { + max-height: 330px !important; + div { - width: 258px; + width: 264px; padding: 5px 5px; border: { color: transparent; style: solid; width: 1px; } - background: { - color: #f0f0f0; - color: rgba(240, 243, 246, .95); - } + color: #f0f0f0; &:last-child { border-bottom: { @@ -30,8 +29,7 @@ &.selected { color: #ffffff; - background-color: #49AFCD; - background-color: rgba(73, 175, 205, .95); + background-color: rgba(255, 255, 255, .3); border-radius: 5px; } } diff --git a/app/assets/stylesheets/player.css.scss b/app/assets/stylesheets/player.css.scss index 4dbb0a0..9511797 100644 --- a/app/assets/stylesheets/player.css.scss +++ b/app/assets/stylesheets/player.css.scss @@ -1,13 +1,13 @@ .player { - width: 518px; + width: 467px; .controls { float: left; - margin: 3px 0 0 -96px; + margin: 1px 0 0 -109px; a { @include inline-block; - margin: 11px 2px 0 0; + margin: 11px 6px 0 0; font-size: 22px; color: #e0e0e0; text-shadow: 0 0 2px rgba(255, 255, 255, .6); @@ -26,8 +26,8 @@ .progress-bar { position: relative; width: 100%; - height: 26px; - margin: 8px 0 0; + height: 28px; + margin: 6px 0 0; background-color: rgba(0, 0, 0, .3); border: { style: solid; @@ -40,7 +40,7 @@ .bar { position: absolute; width: 0%; - height: 26px; + height: 28px; background-color: rgba(255, 255, 255, .1); @include box-shadow(inset 0 0 2px rgba(255, 255, 255, .2)); @include border-radius(4px 0px 0px 4px); @@ -52,7 +52,7 @@ family: "Source Sans Pro", $helvetica; size: 14px; } - line-height: 24px; + line-height: 26px; color: #ffffff; text-shadow: 1px 1px 0 rgba(80, 80, 80, .4); } diff --git a/app/assets/stylesheets/playlist.css.scss b/app/assets/stylesheets/playlist.css.scss index 8650236..38c1640 100644 --- a/app/assets/stylesheets/playlist.css.scss +++ b/app/assets/stylesheets/playlist.css.scss @@ -1,9 +1,9 @@ .playlist { display: none; - position: absolute; + position: fixed; top: 41px; right: 50%; - width: 618px; + width: 578px; margin-right: -430px; padding: 7px 0 3px 0; background-color: #124ba8; @@ -45,7 +45,7 @@ } .length { position: absolute; - right: 9391px; + right: 9431px; } } } diff --git a/app/assets/stylesheets/auth.css.scss b/app/assets/stylesheets/preferences.css.scss similarity index 91% rename from app/assets/stylesheets/auth.css.scss rename to app/assets/stylesheets/preferences.css.scss index 2ea0f52..69e481a 100644 --- a/app/assets/stylesheets/auth.css.scss +++ b/app/assets/stylesheets/preferences.css.scss @@ -1,6 +1,6 @@ .navbar { .preferences { - margin: 14px 10px 0 15px; + margin: 12px 10px 0 15px; .toggle-button { @include inline-block;