Retrospring/app/views/user/_profile.haml

41 lines
1.5 KiB
Plaintext
Raw Normal View History

2022-07-24 05:30:20 -07:00
.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
2020-05-10 00:08:58 -07:00
- if user.banned?
%span.badge.badge-dark
%i.fa.fa-fw.fa-ban
= t 'views.user.title.banned'
2020-05-10 00:08:58 -07:00
- if user.following? current_user
.badge.badge-light
= t 'views.user.follows_you'
- if user_signed_in? && current_user.has_role?(:administrator)
2020-05-10 00:08:58 -07:00
- if user.has_role?(:administrator)
%span.badge.badge-danger
%i.fa.fa-fw.fa-flask
= t 'views.user.title.admin'
2020-05-10 00:08:58 -07:00
- if user.has_role?(:moderator)
%span.badge.badge-success
%i.fa.fa-fw.fa-users
= t 'views.user.title.moderator'
2021-12-19 08:10:05 -08:00
- unless user.profile.description.blank?
.profile__biography
2021-12-19 08:10:05 -08:00
= markdown user.profile.description
- unless user.profile.website.blank?
.profile__website
%i.fa.fa-fw.fa-globe
2021-12-31 10:23:32 -08:00
%a{ href: user.profile.website, target: '_blank', rel: 'nofollow' }= user.profile.display_website
2021-12-19 08:10:05 -08:00
- unless user.profile.location.blank?
.profile__location
%i.fa.fa-fw.fa-location-arrow
2021-12-19 08:10:05 -08:00
= user.profile.location
2020-05-10 00:08:58 -07:00
= render 'user/actions', user: user, type: :follower