Fix coach table colouring. Resolves #871 (#2317)

This commit is contained in:
Ferdinand Holzer 2019-02-16 09:05:50 +01:00 committed by Peter Hedenskog
parent bf1b8d73ad
commit c382019cc7
3 changed files with 13 additions and 7 deletions

File diff suppressed because one or more lines are too long

View File

@ -35,6 +35,12 @@ tr {
&:nth-child(even) {
background: $color--white;
}
&.odd {
background: darken($color--white, 2%);
}
&.even {
background: $color--white;
}
}
th {

View File

@ -12,12 +12,12 @@ mixin adviceInfo(name, perfectScore, node)
th Advice
th Score
tbody
each advice, adviceName in node.adviceList
if advice.score < 100
tr
td(data-title='Title') #{advice.title} (#{adviceName})
td.url(data-title='Advice') #{advice.advice}
td.number(data-title='Score') #{advice.score}
each adviceName, idx in Object.getOwnPropertyNames(node.adviceList).filter(e => node.adviceList[e].score < 100)
- const advice = node.adviceList[adviceName]
tr(class=idx % 2 == 0 ? 'odd' : 'even')
td(data-title='Title') #{advice.title} (#{adviceName})
td.url(data-title='Advice') #{advice.advice}
td.number(data-title='Score') #{advice.score}
if (advice.offending.length > 0)
tr.u-hideable
td.url.offendingurl(colspan='3')