forked from OpenNeo/impress
put userbar where it belongs
This commit is contained in:
parent
895c6e721e
commit
7939b0570b
4 changed files with 56 additions and 7 deletions
|
@ -1,4 +1,12 @@
|
|||
module ApplicationHelper
|
||||
def auth_server_icon_url
|
||||
# TODO: if auth servers expand, don't hardcode path
|
||||
URI::HTTP.build(
|
||||
:host => Openneo::Auth.config.auth_server,
|
||||
:path => '/favicon.png'
|
||||
).to_s
|
||||
end
|
||||
|
||||
def flashes
|
||||
flash.inject('') do |html, pair|
|
||||
key, value = pair
|
||||
|
|
|
@ -31,5 +31,24 @@ h1 {
|
|||
}
|
||||
}
|
||||
|
||||
#userbar-log-in {
|
||||
text-decoration: none;
|
||||
|
||||
img {
|
||||
margin: {
|
||||
bottom: -4px;
|
||||
right: .25em;
|
||||
}
|
||||
}
|
||||
|
||||
span {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
&:hover span {
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
|
||||
@import "items/index";
|
||||
@import "items/show";
|
||||
|
|
|
@ -7,13 +7,6 @@
|
|||
= javascript_include_tag "http://#{RemoteImpressHost}/assets/js/analytics.js"
|
||||
%body{:class => params[:action]}
|
||||
#container
|
||||
- if user_signed_in?
|
||||
You are logged in as
|
||||
= current_user.name
|
||||
== (#{current_user.id})
|
||||
= link_to 'Log out', logout_path
|
||||
- else
|
||||
= link_to 'Log in', login_path
|
||||
%h1
|
||||
= link_to items_path do
|
||||
= image_tag 'http://images.neopets.com/items/mall_floatingneggfaerie.gif'
|
||||
|
@ -25,6 +18,17 @@
|
|||
= yield
|
||||
%a#home-link{:href => "http://#{RemoteImpressHost}"}
|
||||
%span Dress to Impress
|
||||
#userbar
|
||||
- if user_signed_in?
|
||||
%div
|
||||
== Hey, #{current_user.name}!
|
||||
== You have #{current_user.points} points.
|
||||
%div
|
||||
= link_to 'Log out', logout_path
|
||||
- else
|
||||
= link_to login_path, :id => 'userbar-log-in' do
|
||||
= image_tag auth_server_icon_url
|
||||
%span Log in
|
||||
#footer
|
||||
%ul
|
||||
%li= link_to 'OpenNeo', 'http://www.openneo.net/'
|
||||
|
|
|
@ -32,6 +32,24 @@ h1 a:hover span {
|
|||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* line 34, ../../../app/stylesheets/screen.scss */
|
||||
#userbar-log-in {
|
||||
text-decoration: none;
|
||||
}
|
||||
/* line 37, ../../../app/stylesheets/screen.scss */
|
||||
#userbar-log-in img {
|
||||
margin-bottom: -4px;
|
||||
margin-right: .25em;
|
||||
}
|
||||
/* line 44, ../../../app/stylesheets/screen.scss */
|
||||
#userbar-log-in span {
|
||||
text-decoration: underline;
|
||||
}
|
||||
/* line 48, ../../../app/stylesheets/screen.scss */
|
||||
#userbar-log-in:hover span {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* line 1, ../../../app/stylesheets/items/_index.scss */
|
||||
form {
|
||||
margin-bottom: 2em;
|
||||
|
|
Loading…
Reference in a new issue