mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-05 12:02:13 +00:00
A bit more useful color-coding
This commit is contained in:
parent
1a13a5f0aa
commit
c86471f708
2 changed files with 14 additions and 13 deletions
|
|
@ -2,14 +2,13 @@
|
||||||
// They will automatically be included in application.css.
|
// They will automatically be included in application.css.
|
||||||
// You can use Sass (SCSS) here: http://sass-lang.com/
|
// You can use Sass (SCSS) here: http://sass-lang.com/
|
||||||
|
|
||||||
.bad, .bad a{
|
.color-red { background-color: rgb(230, 184, 175); }
|
||||||
background-color:rgb(224, 102, 102);
|
.color-pink { background-color: rgb(244, 204, 204); }
|
||||||
color:white !important;
|
.color-orange { background-color: rgb(252, 229, 205); }
|
||||||
}
|
.color-yellow { background-color: rgb(255, 242, 204); }
|
||||||
.iffy { background-color:rgb(246, 178, 107); }
|
.color-green { background-color: rgb(217, 234, 211); }
|
||||||
.ok { background-color:rgb(255, 217, 102); }
|
.color-light-blue { background-color: rgb(208, 224, 227); }
|
||||||
.good { background-color:rgb(147, 196, 125); }
|
.color-blue { background-color: rgb(201, 218, 248); }
|
||||||
.done { background-color:rgb(201, 218, 248); }
|
|
||||||
|
|
||||||
.panel {
|
.panel {
|
||||||
vertical-align:top;
|
vertical-align:top;
|
||||||
|
|
|
||||||
|
|
@ -11,11 +11,13 @@ module HabitsHelper
|
||||||
def score_color(habit)
|
def score_color(habit)
|
||||||
s = habit.score
|
s = habit.score
|
||||||
case
|
case
|
||||||
when s<-5 then return 'bad'
|
when s<-8 then return 'color-red'
|
||||||
when s>=-5 && s<0 then return 'iffy'
|
when s>=-8 && s<-4 then return 'color-pink'
|
||||||
when s>=0 && s<5 then return 'ok'
|
when s>=-4 && s<0 then return 'color-orange'
|
||||||
when s>=5 && s<15 then return 'good'
|
when s>=0 && s<1.5 then return 'color-yellow'
|
||||||
when s>=15 then return 'done'
|
when s>=1.5 && s<5 then return 'color-green'
|
||||||
|
when s>=5 && s<10 then return 'color-light-blue'
|
||||||
|
when s>=10 then return 'color-blue'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue