mirror of
https://github.com/Retrospring/retrospring.git
synced 2025-03-21 23:17:47 +01:00
Merge branch 'feature-userbox-header'
This commit is contained in:
commit
6f65f8c9f4
5 changed files with 48 additions and 40 deletions
|
@ -120,3 +120,22 @@ $colours: danger $brand-danger,
|
||||||
margin-top: -30px;
|
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;
|
||||||
|
}
|
||||||
|
|
|
@ -1,22 +1,14 @@
|
||||||
.panel.panel-default
|
.panel.panel-default
|
||||||
|
%img.userbox--header{src: user.profile_header.url(:mobile)}
|
||||||
.panel-body
|
.panel-body
|
||||||
.media
|
%img.userbox--avatar{src: user.profile_picture.url(:small)}
|
||||||
.pull-left
|
%p.userbox--username
|
||||||
%img.img-rounded.profile--img{src: gravatar_url(user)}
|
%a.profile--displayname{href: show_user_profile_path(user.screen_name)}
|
||||||
.media-body
|
= user.screen_name
|
||||||
- if user.display_name.blank?
|
|
||||||
%h2
|
|
||||||
%a{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
|
.row
|
||||||
.col-md-12.col-sm-12.col-xs-12
|
.col-md-12.col-sm-12.col-xs-12
|
||||||
- unless count.nil?
|
- unless count.nil?
|
||||||
%h4.entry-text#asked-count
|
%h4.entry-text.text-center#asked-count
|
||||||
= count
|
= count
|
||||||
= 'Report'.pluralize(count)
|
= 'Report'.pluralize(count)
|
||||||
%br
|
%br
|
||||||
|
|
|
@ -1,17 +1,16 @@
|
||||||
.panel.panel-default.hidden-xs
|
.panel.panel-default.hidden-xs
|
||||||
|
%img.userbox--header{src: current_user.profile_header.url(:mobile)}
|
||||||
.panel-body
|
.panel-body
|
||||||
.media
|
%img.userbox--avatar{src: current_user.profile_picture.url(:small)}
|
||||||
.pull-left
|
%p.userbox--username
|
||||||
%img.answerbox--img{src: current_user.profile_picture.url(:small)}
|
- if current_user.display_name.blank?
|
||||||
.media-body
|
%span.profile--displayname
|
||||||
- if current_user.display_name.blank?
|
= current_user.screen_name
|
||||||
.profile--displayname
|
- else
|
||||||
= current_user.screen_name
|
%span.profile--displayname
|
||||||
- else
|
= current_user.display_name
|
||||||
.profile--displayname
|
%span.profile--username
|
||||||
= current_user.display_name
|
= current_user.screen_name
|
||||||
.profile--username
|
|
||||||
= current_user.screen_name
|
|
||||||
.row
|
.row
|
||||||
%a{href: show_user_followers_path(current_user.screen_name)}
|
%a{href: show_user_followers_path(current_user.screen_name)}
|
||||||
.col-md-6.col-sm-6.col-xs-6
|
.col-md-6.col-sm-6.col-xs-6
|
||||||
|
|
|
@ -1,19 +1,17 @@
|
||||||
- type ||= @type || :nil
|
- type ||= @type || :nil
|
||||||
.panel.panel-default
|
.panel.panel-default
|
||||||
|
%img.userbox--header{src: user.profile_header.url(:mobile)}
|
||||||
.panel-body
|
.panel-body
|
||||||
.media
|
%img.userbox--avatar{src: user.profile_picture.url(:small)}
|
||||||
.pull-left
|
%p.userbox--username
|
||||||
%img.img-rounded.profile--img{src: gravatar_url(user)}
|
- if user.display_name.blank?
|
||||||
.media-body
|
%a.profile--displayname{href: show_user_profile_path(user.screen_name)}
|
||||||
- if user.display_name.blank?
|
= user.screen_name
|
||||||
%h2
|
- else
|
||||||
%a{href: show_user_profile_path(user.screen_name)}
|
%a.profile--displayname{href: show_user_profile_path(user.screen_name)}
|
||||||
= user.screen_name
|
= user.display_name
|
||||||
- else
|
%span.profile--username
|
||||||
%h2.profile--displayname
|
= user.screen_name
|
||||||
%a{href: show_user_profile_path(user.screen_name)}
|
|
||||||
= user.display_name
|
|
||||||
%h4.text-muted.profile--username= user.screen_name
|
|
||||||
.row
|
.row
|
||||||
.col-md-6.col-sm-6.col-xs-6
|
.col-md-6.col-sm-6.col-xs-6
|
||||||
%h4.entry-text#asked-count= user.asked_count
|
%h4.entry-text#asked-count= user.asked_count
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
%h1.visible-xs= @title
|
%h1.visible-xs= @title
|
||||||
#users
|
#users
|
||||||
- @users.each do |user|
|
- @users.each do |user|
|
||||||
.col-sm-6
|
.col-md-4.col-sm-6.col-xs-12
|
||||||
= render 'shared/userbox', user: user
|
= render 'shared/userbox', user: user
|
||||||
|
|
||||||
#pagination= will_paginate @users, renderer: BootstrapPagination::Rails, page_links: false
|
#pagination= will_paginate @users, renderer: BootstrapPagination::Rails, page_links: false
|
||||||
|
|
Loading…
Reference in a new issue