From 0d784aee475694096afaeec6a63d17e865aa0b40 Mon Sep 17 00:00:00 2001 From: Andreas N Date: Tue, 6 Jan 2015 15:32:14 +0100 Subject: [PATCH] finish implementing new badge design --- app/assets/stylesheets/scss/user.scss | 8 +++++ app/views/user/_profile_info.html.haml | 43 +++++++++----------------- 2 files changed, 23 insertions(+), 28 deletions(-) diff --git a/app/assets/stylesheets/scss/user.scss b/app/assets/stylesheets/scss/user.scss index 437956b1..0117fd0a 100644 --- a/app/assets/stylesheets/scss/user.scss +++ b/app/assets/stylesheets/scss/user.scss @@ -112,4 +112,12 @@ .panel-badge-default { background-color: #BBB; +} + +.panel-badge-success { + background-color: #4CAF50; +} + +.panel-badge-warning { + background-color: #FF9800; } \ No newline at end of file diff --git a/app/views/user/_profile_info.html.haml b/app/views/user/_profile_info.html.haml index df61ef89..cf86eac8 100644 --- a/app/views/user/_profile_info.html.haml +++ b/app/views/user/_profile_info.html.haml @@ -1,42 +1,29 @@ .panel.panel-default %img.profile--avatar{src: @user.profile_picture.url(:large)} + - if @user.admin? + .profile--panel-badge.panel-badge-danger + %i.fa.fa-flask + Admin + - if @user.moderator? + .profile--panel-badge.panel-badge-success + %i.fa.fa-users + Mod + - if @user.supporter? + .profile--panel-badge.panel-badge-warning + %i.fa.fa-star + Supporter + - if @user.following? current_user + .profile--panel-badge.panel-badge-default + Follows you .panel-body - if @user.display_name.blank? .profile--displayname = @user.screen_name - - if @user.admin? - %span.label.label-danger.j2-up.j2-label - %i.fa.fa-flask - Admin - - if @user.moderator? - %span.label.label-success.j2-up.j2-label - %i.fa.fa-users - Mod - - if @user.supporter? - %span.label.label-warning.j2-up.j2-label - %i.fa.fa-star - Supporter - else .profile--displayname = @user.display_name - - if @user.admin? - %span.label.label-danger.j2-up.j2-label - %i.fa.fa-flask - Admin - - if @user.moderator? - %span.label.label-success.j2-up.j2-label - %i.fa.fa-users - Mod - - if @user.supporter? - %span.label.label-warning.j2-up.j2-label - %i.fa.fa-star - Supporter .profile--username = @user.screen_name - - if @user.following? current_user - %p.profile--followtag - %span.label.label-default.j2-up - Follows you - unless @user.bio.blank? %p.profile--text= @user.bio - unless @user.website.blank?