Commit e0ee47ec5155cefc7a44eebb54c83169408a01f2
1 parent
0886b7e7
Exists in
master
and in
1 other branch
improve star rating
Showing
2 changed files
with
6 additions
and
5 deletions
Show diff stats
public/style.css
| ... | ... | @@ -29,11 +29,11 @@ |
| 29 | 29 | |
| 30 | 30 | .gamification-notification .badge .image, |
| 31 | 31 | .gamification .badge .image { |
| 32 | - width: 110px; | |
| 33 | - height: 80px; | |
| 32 | + width: 120px; | |
| 33 | + height: 90px; | |
| 34 | 34 | background-image: url(/plugins/gamification/images/badge-icon.png); |
| 35 | 35 | background-repeat: no-repeat; |
| 36 | - background-position: center; | |
| 36 | + background-position: 50% 10%; | |
| 37 | 37 | background-color: rgba(128, 128, 128, 0.25); |
| 38 | 38 | margin-left: auto; |
| 39 | 39 | margin-right: auto; |
| ... | ... | @@ -185,8 +185,9 @@ |
| 185 | 185 | .rating > span { |
| 186 | 186 | display: inline-block; |
| 187 | 187 | position: relative; |
| 188 | - font-size: 24px; | |
| 188 | + font-size: 20px; | |
| 189 | 189 | width: 1.1em; |
| 190 | + bottom: 22px; | |
| 190 | 191 | } |
| 191 | 192 | .rating > span.earned:before { |
| 192 | 193 | content: "\2605"; | ... | ... |
views/gamification/dashboard.html.erb
| ... | ... | @@ -42,12 +42,12 @@ |
| 42 | 42 | <li class="badge <%= badge.name %>"> |
| 43 | 43 | <div class="badge" title="<%= badge.description %>"> |
| 44 | 44 | <div class="image <%= badge.name %>"></div> |
| 45 | - <div class="title"><%= badge.title %></div> | |
| 46 | 45 | <ul class="level rating"> |
| 47 | 46 | <% 1.upto(badge.level).map do |n|%> |
| 48 | 47 | <span class="<%= (person_badge && person_badge.level >= n) ? 'earned' : 'not-earned' %>" > ☆ </span> |
| 49 | 48 | <% end %> |
| 50 | 49 | </ul> |
| 50 | + <div class="title"><%= badge.title %></div> | |
| 51 | 51 | </div> |
| 52 | 52 | </li> |
| 53 | 53 | <% end %> | ... | ... |