From 932c611dab8a666e6d67f236a8f6832e06be7732 Mon Sep 17 00:00:00 2001 From: Andreas Nedbal Date: Fri, 1 May 2020 18:55:18 +0200 Subject: [PATCH] Fix userbox layout on frontpage --- .../{_sidebar.html.haml => _sidebar.haml} | 21 +++++++------------ 1 file changed, 8 insertions(+), 13 deletions(-) rename app/views/shared/{_sidebar.html.haml => _sidebar.haml} (70%) diff --git a/app/views/shared/_sidebar.html.haml b/app/views/shared/_sidebar.haml similarity index 70% rename from app/views/shared/_sidebar.html.haml rename to app/views/shared/_sidebar.haml index fc27a3e6..0bc5ef37 100644 --- a/app/views/shared/_sidebar.html.haml +++ b/app/views/shared/_sidebar.haml @@ -1,18 +1,13 @@ -- header_class = if current_user.profile_header.exists? then "userbox--header-container" else "userbox--no-header" end -.card - %div{class: header_class} - %img.userbox--header{src: current_user.profile_header.url(:mobile)} +.card.userbox + %img.userbox__header{src: current_user.profile_header.url(:mobile)} .card-body - %img.userbox--avatar{src: current_user.profile_picture.url(:small)} - %p.userbox--username - - if current_user.display_name.blank? - %span.profile--displayname - = current_user.screen_name - - else - %span.profile--displayname - = current_user.display_name - %span.profile--username + %img.userbox__avatar{src: current_user.profile_picture.url(:small)} + .profile__name + - unless current_user.display_name.blank? + .profile__display-name = current_user.screen_name + .profile__screen-name + = current_user.screen_name .row .col-md-6.col-sm-6.col-xs-6 %a{href: show_user_followers_path(current_user.screen_name)}