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

41 lines
1.5 KiB
Plaintext

.card.profile#profile
.d-flex.d-sm-block
%img.profile__avatar{ src: user.profile_picture.url(:large) }
.profile__name-container
.profile__name
- unless user.profile.display_name.blank?
.profile__display-name
= user.profile.display_name
.profile__screen-name
= user.screen_name
.card-body
.profile__badge-container
- if user.banned?
%span.badge.badge-dark
%i.fa.fa-fw.fa-ban
= t(".badge.banned")
- if user.following? current_user
.badge.badge-light
= t(".badge.follows_you")
- if user_signed_in? && current_user.has_cached_role?(:administrator)
- if user.has_cached_role?(:administrator)
%span.badge.badge-danger
%i.fa.fa-fw.fa-flask
= t(".badge.admin")
- if user.has_cached_role?(:moderator)
%span.badge.badge-success
%i.fa.fa-fw.fa-users
= t(".badge.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: "me 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