Merge branch 'feature-userbox-header'

This commit is contained in:
pixeldesu 2015-07-24 17:10:28 +02:00
commit 6f65f8c9f4
5 changed files with 48 additions and 40 deletions

View file

@ -120,3 +120,22 @@ $colours: danger $brand-danger,
margin-top: -30px;
}
}
.userbox--header {
width: 100%;
height: auto;
}
.userbox--avatar {
display: block;
margin-left: auto;
margin-right: auto;
margin-top: -60px;
border-radius: 5px;
}
.userbox--username {
text-align: center;
margin-top: 10px;
margin-bottom: 5px;
}

View file

@ -1,22 +1,14 @@
.panel.panel-default
%img.userbox--header{src: user.profile_header.url(:mobile)}
.panel-body
.media
.pull-left
%img.img-rounded.profile--img{src: gravatar_url(user)}
.media-body
- if user.display_name.blank?
%h2
%a{href: show_user_profile_path(user.screen_name)}
%img.userbox--avatar{src: user.profile_picture.url(:small)}
%p.userbox--username
%a.profile--displayname{href: show_user_profile_path(user.screen_name)}
= user.screen_name
- else
%h2.profile--displayname
%a{href: show_user_profile_path(user.screen_name)}
= user.display_name
%h4.text-muted.profile--username= user.screen_name
.row
.col-md-12.col-sm-12.col-xs-12
- unless count.nil?
%h4.entry-text#asked-count
%h4.entry-text.text-center#asked-count
= count
= 'Report'.pluralize(count)
%br

View file

@ -1,16 +1,15 @@
.panel.panel-default.hidden-xs
%img.userbox--header{src: current_user.profile_header.url(:mobile)}
.panel-body
.media
.pull-left
%img.answerbox--img{src: current_user.profile_picture.url(:small)}
.media-body
%img.userbox--avatar{src: current_user.profile_picture.url(:small)}
%p.userbox--username
- if current_user.display_name.blank?
.profile--displayname
%span.profile--displayname
= current_user.screen_name
- else
.profile--displayname
%span.profile--displayname
= current_user.display_name
.profile--username
%span.profile--username
= current_user.screen_name
.row
%a{href: show_user_followers_path(current_user.screen_name)}

View file

@ -1,19 +1,17 @@
- type ||= @type || :nil
.panel.panel-default
%img.userbox--header{src: user.profile_header.url(:mobile)}
.panel-body
.media
.pull-left
%img.img-rounded.profile--img{src: gravatar_url(user)}
.media-body
%img.userbox--avatar{src: user.profile_picture.url(:small)}
%p.userbox--username
- if user.display_name.blank?
%h2
%a{href: show_user_profile_path(user.screen_name)}
%a.profile--displayname{href: show_user_profile_path(user.screen_name)}
= user.screen_name
- else
%h2.profile--displayname
%a{href: show_user_profile_path(user.screen_name)}
%a.profile--displayname{href: show_user_profile_path(user.screen_name)}
= user.display_name
%h4.text-muted.profile--username= user.screen_name
%span.profile--username
= user.screen_name
.row
.col-md-6.col-sm-6.col-xs-6
%h4.entry-text#asked-count= user.asked_count

View file

@ -9,7 +9,7 @@
%h1.visible-xs= @title
#users
- @users.each do |user|
.col-sm-6
.col-md-4.col-sm-6.col-xs-12
= render 'shared/userbox', user: user
#pagination= will_paginate @users, renderer: BootstrapPagination::Rails, page_links: false