From 9633511859feb9fcbe5a1e6ab2c621512843afb0 Mon Sep 17 00:00:00 2001 From: Yuki Date: Fri, 8 May 2015 21:34:58 +0530 Subject: [PATCH] Some fixes (whoops used current_user instead of user) --- app/assets/stylesheets/scss/user.scss | 8 ++++++-- app/views/user/show.html.haml | 9 ++++----- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/app/assets/stylesheets/scss/user.scss b/app/assets/stylesheets/scss/user.scss index 7500baff..527286c3 100644 --- a/app/assets/stylesheets/scss/user.scss +++ b/app/assets/stylesheets/scss/user.scss @@ -36,6 +36,10 @@ background-color: darken($navbar-inverse-bg, 10%); } +#profile--header.profile--no-header { + position: absolute; +} + .profile--panel .panel-heading { color: $brand-primary; border-bottom: 2px solid $brand-primary; @@ -99,7 +103,7 @@ $colours: danger $brand-danger, text-decoration: line-through !important; } -.profile--panel-push-inner { +.profile--panel-push-inner:not(.profile--no-header) { display: block; height: 60px; } @@ -111,7 +115,7 @@ $colours: danger $brand-danger, } @media(min-width: 767px) { - .container.headerable { + .container.headerable:not(.profile--no-header) { padding-top: 0; margin-top: -30px; } diff --git a/app/views/user/show.html.haml b/app/views/user/show.html.haml index 9b2cb3ee..ab96e75a 100644 --- a/app/views/user/show.html.haml +++ b/app/views/user/show.html.haml @@ -1,12 +1,11 @@ -#profile--header.hidden-xs - %img.profile--header-img{src: current_user.profile_header.url(:web)} -#profile--panel-push-n.hidden-xs -.container.j2-page.headerable +#profile--header.hidden-xs{class: unless @user.profile_header.exists? then "profile--no-header" end} + %img.profile--header-img{src: @user.profile_header.url(:web)} +.container.j2-page.headerable{class: unless @user.profile_header.exists? then "profile--no-header" end} .col-md-3.col-xs-12.col-sm-4.j2-col-reset = render 'user/profile_info' .hidden-xs= render 'shared/links' .col-md-9.col-xs-12.col-sm-8.j2-col-reset - .profile--panel-push-inner.hidden-xs + .profile--panel-push-inner.hidden-xs{class: unless @user.profile_header.exists? then "profile--no-header" end} = render 'shared/questionbox' - unless @user.banned? #answers