diff --git a/app/assets/javascripts/session.coffee b/app/assets/javascripts/session.coffee
index 60e7904..c40d92a 100644
--- a/app/assets/javascripts/session.coffee
+++ b/app/assets/javascripts/session.coffee
@@ -35,3 +35,13 @@ class window.Session
_session.setUser ar.user
false
false
+
+ displayAuthorizedContent: ->
+ $('.playlist, .player').show()
+ $('.ad_here, #login').hide()
+ $('#authorized').css display: 'block'
+
+ hideAuthorizedContent: ->
+ $('.playlist, .player, #authorized').hide()
+ $('.ad_here').show()
+ $('#login').css display: 'block'
diff --git a/app/assets/javascripts/vkontakte.coffee b/app/assets/javascripts/vkontakte.coffee
index 28f45ac..3fe62d4 100644
--- a/app/assets/javascripts/vkontakte.coffee
+++ b/app/assets/javascripts/vkontakte.coffee
@@ -36,16 +36,14 @@ class window.Vkontakte
.html (if _session.getUser().name then _session.getUser().name else '%username%')
window._session = _session
_ajax.detectPage()
- $('.fullscreen').hide();
- $('#login').hide()
+ _session.displayAuthorizedContent()
$('#authorized').css display: 'block'
else
_session.setUser ar.user
$('#username')
.html (if _session.getUser().name then _session.getUser().name else '%username%')
- $('#login').hide()
- $('#authorized').css display: 'block'
+ _session.displayAuthorizedContent()
window._session = _session
_ajax.detectPage()
$('.fullscreen').hide();
@@ -58,8 +56,7 @@ class window.Vkontakte
else
_session = new Session({})
_session.setUser {}
- $('#login').css display: 'block'
- $('#authorized').hide()
+ _session.hideAuthorizedContent()
window._session = _session
_ajax.detectPage()
$('.fullscreen').hide();
diff --git a/app/assets/stylesheets/common.scss b/app/assets/stylesheets/common.scss
index 2a577ca..18f36e3 100644
--- a/app/assets/stylesheets/common.scss
+++ b/app/assets/stylesheets/common.scss
@@ -8,7 +8,7 @@
width: 100%;
height: 100%;
background-color: #ffffff;
- @include opacity(0.9);
+ //@include opacity(0.9);
.inner {
position: relative;
top: 50%;
diff --git a/app/assets/stylesheets/misc.scss b/app/assets/stylesheets/misc.scss
index 21d1b94..d2bc3ed 100644
--- a/app/assets/stylesheets/misc.scss
+++ b/app/assets/stylesheets/misc.scss
@@ -12,4 +12,16 @@
top: 45px;
width: 210px;
height: 200px;
+}
+
+.player, .playlist {
+ display: none;
+}
+
+.ad_here {
+ display: block;
+ border: #e0e0e0 1px solid;
+ padding: 200px 20px;
+ font-size: 20px;
+ text-align: center;
}
\ No newline at end of file
diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml
index ca3f758..4df60a6 100644
--- a/app/views/layouts/application.html.haml
+++ b/app/views/layouts/application.html.haml
@@ -50,6 +50,7 @@
.span5.columns
+ .ad_here= (I18n.t 'global.your_ad_here').html_safe
.player
%h5.now-playing= I18n.t 'global.do_add'
.progress
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 62fd628..28e6318 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -12,6 +12,7 @@ en:
do_empty: "Empty playlist"
hello: "Hi there"
settings: "Settings"
+ your_ad_here: "Your ad couldn't
be here"
search:
fail: "Something very bad happened while we tried out to load some info about this artist. How about some other one?"
diff --git a/config/locales/ru.yml b/config/locales/ru.yml
index 82f3f21..d0f2fd4 100644
--- a/config/locales/ru.yml
+++ b/config/locales/ru.yml
@@ -12,6 +12,7 @@ ru:
do_empty: "Очистить"
hello: "Привет"
settings: "Настройки"
+ your_ad_here: "Здесь не могла бы
быть Ваша реклама"
search:
fail: "Что-то ужасное произошло пока мы собирали информацию об этом исполнителе. Может пока поищем другого?"