Retrospring/app/views/user/_profile.haml

39 lines
1.3 KiB
Plaintext
Raw Normal View History

.card#profile
%img.profile__avatar{src: @user.profile_picture.url(:large)}
.card-body
.profile__name
- unless @user.display_name.blank?
.profile__display-name
= @user.display_name
.profile__screen-name
= @user.screen_name
.profile__badge-container
- if @user.banned?
%span.badge.badge-dark
%i.fa.fa-fw.fa-ban
= t 'views.user.title.banned'
- if @user.following? current_user
.badge.badge-light
= t 'views.user.follows_you'
- if user_signed_in? && current_user.has_role?(:administrator)
- if @user.has_role?(:administrator)
%span.badge.badge-danger
%i.fa.fa-fw.fa-flask
= t 'views.user.title.admin'
- if @user.has_role?(:moderator)
%span.badge.badge-success
%i.fa.fa-fw.fa-users
= t 'views.user.title.moderator'
- unless @user.bio.blank?
.profile__biography
= markdown @user.bio
- unless @user.website.blank?
.profile__website
%i.fa.fa-fw.fa-globe
%a{href: @user.website}= @user.display_website
- unless @user.location.blank?
.profile__location
%i.fa.fa-fw.fa-location-arrow
= @user.location
= render 'user/actions', user: @user, type: :follower