Retrospring/app/views/user/_profile_info.html.haml

44 lines
1.6 KiB
Plaintext

.panel.panel-default
.panel-body
.media
.pull-left
%img.img-rounded.profile--img{src: gravatar_url(@user)}
.media-body
- if @user.display_name.blank?
%h2= @user.screen_name
- else
%h2.profile--displayname= @user.display_name
%h4.text-muted.profile--username= @user.screen_name
- if @user.admin?
%p.profile--admin
%i.fa.fa-flask
Admin
- unless @user.bio.blank?
%p.profile--text= @user.bio
- unless @user.website.blank?
%p.profile--text
%i.fa.fa-globe
%a{href: @user.website}= @user.display_website
- unless @user.location.blank?
%p.profile--text
%i.fa.fa-location-arrow
= @user.location
.row
%a{href: show_user_followers_path(@user.screen_name)}
.col-md-6.col-sm-6.col-xs-6
%h4.entry-text#follower-count= @user.follower_count
%h6.entry-subtext Followers
%a{href: show_user_friends_path(@user.screen_name)}
.col-md-6.col-sm-6.col-xs-6
%h4.entry-text#friend-count= @user.friend_count
%h6.entry-subtext Following
.row
%a{href: show_user_questions_path(@user.screen_name)}
.col-md-6.col-sm-6.col-xs-6
%h4.entry-text#asked-count= @user.asked_count
%h6.entry-subtext Questions
%a{href: show_user_profile_path(@user.screen_name)}
.col-md-6.col-sm-6.col-xs-6
%h4.entry-text#answered-count= @user.answered_count
%h6.entry-subtext Answers
= render 'user/actions', user: @user, type: :follower