Skip to content

Commit

Permalink
Updated Stats colours in All Reports page
Browse files Browse the repository at this point in the history
With these new colors it should comply with WCAG color contrast requirement(Headlines AA (3:1))
  • Loading branch information
lucascumsille committed Jul 8, 2024
1 parent ecde96b commit 9de9bfc
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
16 changes: 8 additions & 8 deletions templates/web/base/reports/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ <h2>[% loc('All time') %]</h2>
data-values-reports="[[% problems_reported_by_period.join(',') %]]"
data-values-fixed="[[% problems_fixed_by_period.join(',') %]]"
></canvas>
<span class="label" data-datasetindex="0"><strong style="color: #F4A140">[% tprintf(nget("%s problem reported", "%s problems reported", problems_reported_by_period.last), decode(problems_reported) _ '</strong>') %]</span>
<span class="label" data-datasetindex="1"><strong style="color: #62B356">[% tprintf(nget("%s problem marked as fixed", "%s problems marked as fixed", problems_fixed_by_period.last), decode(problems_fixed) _ '</strong>') %]</span>
<span class="label" data-datasetindex="0"><strong style="color: #D97B0C">[% tprintf(nget("%s problem reported", "%s problems reported", problems_reported_by_period.last), decode(problems_reported) _ '</strong>') %]</span>
<span class="label" data-datasetindex="1"><strong style="color: #56A54A">[% tprintf(nget("%s problem marked as fixed", "%s problems marked as fixed", problems_fixed_by_period.last), decode(problems_fixed) _ '</strong>') %]</span>
</div>
</div>
</div>
Expand All @@ -41,20 +41,20 @@ <h2 class="dashboard-subheading">[% loc('Last 7 days') %]</h2>
<div class="dashboard-sparklines">
<div>
<div class="labelled-sparkline">
<canvas width="200" height="50" data-color="#F4A140" data-values="[% last_seven_days.problems.join(' ') %]"></canvas>
<span class="label" data-datasetindex="0"><strong style="color: #F4A140;">[% tprintf(nget("%s problem reported", "%s problems reported", last_seven_days.problems_total), decode(last_seven_reported) _ '</strong>') %]</span>
<canvas width="200" height="50" data-color="#D97B0C" data-values="[% last_seven_days.problems.join(' ') %]"></canvas>
<span class="label" data-datasetindex="0"><strong style="color: #D97B0C;">[% tprintf(nget("%s problem reported", "%s problems reported", last_seven_days.problems_total), decode(last_seven_reported) _ '</strong>') %]</span>
</div>
</div>
<div>
<div class="labelled-sparkline">
<canvas width="200" height="50" data-color="#4FADED" data-values="[% last_seven_days.updated.join(' ') %]"></canvas>
<span class="label" data-datasetindex="0"><strong style="color: #4FADED;">[% tprintf(nget("%s update on problems", "%s updates on problems", last_seven_days.updated_total), decode(last_seven_updated) _ '</strong>') %]</span>
<canvas width="200" height="50" data-color="#269AE9" data-values="[% last_seven_days.updated.join(' ') %]"></canvas>
<span class="label" data-datasetindex="0"><strong style="color: #269AE9;">[% tprintf(nget("%s update on problems", "%s updates on problems", last_seven_days.updated_total), decode(last_seven_updated) _ '</strong>') %]</span>
</div>
</div>
<div>
<div class="labelled-sparkline">
<canvas width="200" height="50" data-color="#62B356" data-values="[% last_seven_days.fixed.join(' ') %]"></canvas>
<span class="label" data-datasetindex="0"><strong style="color: #62B356;">[% tprintf(nget("%s problem marked as fixed", "%s problems marked as fixed", last_seven_days.fixed_total), decode(last_seven_fixed) _ '</strong>') %]</span>
<canvas width="200" height="50" data-color="#56A54A" data-values="[% last_seven_days.fixed.join(' ') %]"></canvas>
<span class="label" data-datasetindex="0"><strong style="color: #56A54A;">[% tprintf(nget("%s problem marked as fixed", "%s problems marked as fixed", last_seven_days.fixed_total), decode(last_seven_fixed) _ '</strong>') %]</span>
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion web/cobrands/fixmystreet.com/images/healthcheck-bad.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion web/cobrands/fixmystreet.com/images/healthcheck-good.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions web/js/dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ $(function(){

var colours = [
'#FF4343', // red
'#F4A140', // orange
'#D97B0C', // orange
'#FFD000', // yellow
'#62B356', // green
'#4D96E5', // blue
'#56A54A', // green
'#269AE9', // blue
'#B446CA', // purple
'#7B8B98', // gunmetal
'#BCB590', // taupe
Expand Down

0 comments on commit 9de9bfc

Please sign in to comment.