Adjust profile statistics layout
- Instead of being in the sidebar, they are now present as a tabbed navigation - The questionbox is now present on any layout
This commit is contained in:
parent
ddb2537926
commit
650751e875
|
@ -5,10 +5,11 @@
|
|||
.row
|
||||
#profile-info.col-md-3.col-xs-12.col-sm-4.j2-col-reset
|
||||
= render 'user/profile_info'
|
||||
.hidden-xs= render 'shared/links'
|
||||
.d-none.d-sm-block= render 'shared/links'
|
||||
.col-md-9.col-xs-12.col-sm-8.j2-col-reset
|
||||
= render "questionbox"
|
||||
= render "tabs/profile"
|
||||
= yield
|
||||
.visible-xs= render 'shared/links'
|
||||
- if user_signed_in?
|
||||
= render 'modal/group'
|
||||
- if current_user.mod? and @user != current_user
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
.card
|
||||
.list-group.list-group-horizontal-sm.text-center
|
||||
= list_group_item "Answers", show_user_profile_path(@user.screen_name), badge: @user.answered_count
|
||||
= list_group_item "Questions", show_user_questions_path(@user.screen_name), badge: @user.asked_count
|
||||
= list_group_item "Followers", show_user_followers_path(@user.screen_name), badge: @user.follower_count
|
||||
= list_group_item "Following", show_user_friends_path(@user.screen_name), badge: @user.friend_count
|
|
@ -37,4 +37,3 @@
|
|||
%i.fa.fa-location-arrow
|
||||
= @user.location
|
||||
= render 'user/actions', user: @user, type: :follower
|
||||
= render 'user/stats', user: @user
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
.card.profile--panel#profile-stats
|
||||
.card-header Stats
|
||||
.card-body
|
||||
.row
|
||||
.col-md-6.col-sm-6.col-xs-6
|
||||
%a{href: show_user_followers_path(@user.screen_name)}
|
||||
%h4.entry-text#follower-count= @user.follower_count
|
||||
%h6.entry-subtext= t('views.general.follower').pluralize(@user.follower_count)
|
||||
.col-md-6.col-sm-6.col-xs-6
|
||||
%a{href: show_user_friends_path(@user.screen_name)}
|
||||
%h4.entry-text#friend-count= @user.friend_count
|
||||
%h6.entry-subtext= t('views.general.following')
|
||||
.row
|
||||
.col-md-6.col-sm-6.col-xs-6
|
||||
%a{href: show_user_questions_path(@user.screen_name)}
|
||||
%h4.entry-text#asked-count= @user.asked_count
|
||||
%h6.entry-subtext= t('views.general.question').pluralize(@user.asked_count)
|
||||
.col-md-6.col-sm-6.col-xs-6
|
||||
%a{href: show_user_profile_path(@user.screen_name)}
|
||||
%h4.entry-text#answered-count= @user.answered_count
|
||||
%h6.entry-subtext= t('views.general.answer').pluralize(@user.answered_count)
|
|
@ -1,5 +1,3 @@
|
|||
%h1.j2-lh.hidden-xs= @title
|
||||
%h1.visible-xs= @title
|
||||
#questions
|
||||
- @questions.each do |q|
|
||||
= render 'shared/question', q: q, type: nil
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
- no_header = unless @user.profile_header.exists? then "profile--no-header" else "" end
|
||||
.profile--panel-push-inner.hidden-xs{class: no_header}
|
||||
= render 'questionbox'
|
||||
- unless @user.banned?
|
||||
#answers
|
||||
- @answers.each do |a|
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
%h1.j2-lh.hidden-xs= @title
|
||||
%h1.visible-xs= @title
|
||||
#users
|
||||
- @users.each do |user|
|
||||
.col-md-4.col-sm-6.col-xs-12
|
||||
|
|
Loading…
Reference in New Issue