finish implementing new badge design

This commit is contained in:
Andreas N 2015-01-06 15:32:14 +01:00
parent 17afe26171
commit 0d784aee47
2 changed files with 23 additions and 28 deletions

View File

@ -113,3 +113,11 @@
.panel-badge-default { .panel-badge-default {
background-color: #BBB; background-color: #BBB;
} }
.panel-badge-success {
background-color: #4CAF50;
}
.panel-badge-warning {
background-color: #FF9800;
}

View File

@ -1,42 +1,29 @@
.panel.panel-default .panel.panel-default
%img.profile--avatar{src: @user.profile_picture.url(:large)} %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 .panel-body
- if @user.display_name.blank? - if @user.display_name.blank?
.profile--displayname .profile--displayname
= @user.screen_name = @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 - else
.profile--displayname .profile--displayname
= @user.display_name = @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 .profile--username
= @user.screen_name = @user.screen_name
- if @user.following? current_user
%p.profile--followtag
%span.label.label-default.j2-up
Follows you
- unless @user.bio.blank? - unless @user.bio.blank?
%p.profile--text= @user.bio %p.profile--text= @user.bio
- unless @user.website.blank? - unless @user.website.blank?