Retrospring/app/views/user/_profile.haml

39 lines
1.4 KiB
Plaintext

.card#profile
%img.profile__avatar{ src: user.profile_picture.url(:large) }
.card-body
.profile__name
- unless user.profile.display_name.blank?
.profile__display-name
= user.profile.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.profile.description.blank?
.profile__biography
= markdown user.profile.description
- unless user.profile.website.blank?
.profile__website
%i.fa.fa-fw.fa-globe
%a{ href: user.profile.website, target: '_blank', rel: 'nofollow' }= user.profile.display_website
- unless user.profile.location.blank?
.profile__location
%i.fa.fa-fw.fa-location-arrow
= user.profile.location
= render 'user/actions', user: user, type: :follower