Retrospring/app/views/user/_profile.html.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
2022-07-31 07:06:09 -07:00
= t(".badge.banned")
2020-05-10 00:08:58 -07:00
- if user.following? current_user
.badge.badge-light
2022-07-31 07:06:09 -07:00
= 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
2022-07-31 07:06:09 -07:00
= t(".badge.admin")
- if user.has_cached_role?(:moderator)
%span.badge.badge-success
%i.fa.fa-fw.fa-users
2022-07-31 07:06:09 -07:00
= t(".badge.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
2022-07-31 07:06:09 -07: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
2022-07-31 07:06:09 -07:00
= render "user/actions", user: user, type: :follower