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,11 +29,11 @@ | ||
| 29 | 29 | ||
| 30 | .gamification-notification .badge .image, | 30 | .gamification-notification .badge .image, |
| 31 | .gamification .badge .image { | 31 | .gamification .badge .image { |
| 32 | - width: 110px; | ||
| 33 | - height: 80px; | 32 | + width: 120px; |
| 33 | + height: 90px; | ||
| 34 | background-image: url(/plugins/gamification/images/badge-icon.png); | 34 | background-image: url(/plugins/gamification/images/badge-icon.png); |
| 35 | background-repeat: no-repeat; | 35 | background-repeat: no-repeat; |
| 36 | - background-position: center; | 36 | + background-position: 50% 10%; |
| 37 | background-color: rgba(128, 128, 128, 0.25); | 37 | background-color: rgba(128, 128, 128, 0.25); |
| 38 | margin-left: auto; | 38 | margin-left: auto; |
| 39 | margin-right: auto; | 39 | margin-right: auto; |
| @@ -185,8 +185,9 @@ | @@ -185,8 +185,9 @@ | ||
| 185 | .rating > span { | 185 | .rating > span { |
| 186 | display: inline-block; | 186 | display: inline-block; |
| 187 | position: relative; | 187 | position: relative; |
| 188 | - font-size: 24px; | 188 | + font-size: 20px; |
| 189 | width: 1.1em; | 189 | width: 1.1em; |
| 190 | + bottom: 22px; | ||
| 190 | } | 191 | } |
| 191 | .rating > span.earned:before { | 192 | .rating > span.earned:before { |
| 192 | content: "\2605"; | 193 | content: "\2605"; |
views/gamification/dashboard.html.erb
| @@ -42,12 +42,12 @@ | @@ -42,12 +42,12 @@ | ||
| 42 | <li class="badge <%= badge.name %>"> | 42 | <li class="badge <%= badge.name %>"> |
| 43 | <div class="badge" title="<%= badge.description %>"> | 43 | <div class="badge" title="<%= badge.description %>"> |
| 44 | <div class="image <%= badge.name %>"></div> | 44 | <div class="image <%= badge.name %>"></div> |
| 45 | - <div class="title"><%= badge.title %></div> | ||
| 46 | <ul class="level rating"> | 45 | <ul class="level rating"> |
| 47 | <% 1.upto(badge.level).map do |n|%> | 46 | <% 1.upto(badge.level).map do |n|%> |
| 48 | <span class="<%= (person_badge && person_badge.level >= n) ? 'earned' : 'not-earned' %>" > ☆ </span> | 47 | <span class="<%= (person_badge && person_badge.level >= n) ? 'earned' : 'not-earned' %>" > ☆ </span> |
| 49 | <% end %> | 48 | <% end %> |
| 50 | </ul> | 49 | </ul> |
| 50 | + <div class="title"><%= badge.title %></div> | ||
| 51 | </div> | 51 | </div> |
| 52 | </li> | 52 | </li> |
| 53 | <% end %> | 53 | <% end %> |