Skip to content

Commit bb19049

Browse files
committed
[Scorecards] Improved styling for council table
- Considering the table now will have more data because of the year comparison. I got rid of the background-color for the section rows. - Moved the penalty score below the penalty mark warning message. This prevents the odd line break because of the smaller width of the council column. At the same time I think information wise it makes sense cosnidering the are the same topic.
1 parent d16f429 commit bb19049

File tree

1 file changed

+17
-22
lines changed

1 file changed

+17
-22
lines changed

scoring/templates/scoring/council.html

+17-22
Original file line numberDiff line numberDiff line change
@@ -243,29 +243,29 @@ <h3 class="exclamation text-white">Visit us again on a bigger screen</h3>
243243
{% for section in sections %}
244244
<tbody class="table-question-council__section">
245245

246-
{% if section.has_negative_points %}
247-
<tr data-has-plan="no" class="section-row bg-red-100 text-red-900">
248-
{% else %}
249-
<tr data-has-plan="no" class="section-row bg-primary-100">
250-
{% endif %}
246+
<tr data-has-plan="no" class="section-row fw-bold">
251247

252-
<td colspan="1" class="section-cell border-bottom border-end border-opacity-25 border-primary text-start">
248+
<td colspan="1" class="section-cell border-bottom border-start border-end border-opacity-25 border-primary text-start">
253249
{{ section.description }}
254250

255251
{% if section.has_negative_points %}
256-
<div class="d-flex flex-column mb-0 mt-2 fs-7 text-warning">
252+
<div class="d-flex flex-column mb-0 mt-2 fs-7 rounded p-2 bg-red-100 text-warning">
257253
<p class="mb-1">
258254
{% include 'caps/icons/warning.html' with classes='me-1 mb-1' width='1.1em' height='1.1em' role='presentation' %}
259255
<strong class="me-2">Penalty marks</strong>
260256
</p>
261-
{% if section.only_negative %}
262-
{{ council.name }} was only awarded penalty marks in this section
263-
{% else %}
264-
{{ council.name }} incurred a penalty of {{ section.negative_percent|floatformat:0 }}% in this section
265-
{% endif %}
257+
<p class="fw-normal mb-1">
258+
{% if section.only_negative %}
259+
{{ council.name }} was only awarded penalty marks in this section
260+
{% else %}
261+
{{ council.name }} incurred a penalty of {{ section.negative_percent|floatformat:0 }}% in this section
262+
{% endif %}
263+
</p>
264+
<p class="fw-normal mt-1 mb-0">
265+
{{ section.score }} &equals; Total score ({{ section.non_negative_max|floatformat:"-2" }}) &minus; Penalty points ({{ section.negative_points }})
266+
</p>
266267
</div>
267268
{% endif %}
268-
269269
<button type="button" class="d-block mt-2 d-md-none btn btn-outline-primary btn-sm js-toggle-council-question-table-section rounded-0" aria-label="Expand this section" title="Expand this section">
270270
{% include 'caps/icons/chevron-down.html' with classes='align-text-bottom' width='1.2em' height='1.2em' role='presentation' %}
271271
Show questions
@@ -294,11 +294,6 @@ <h3 class="exclamation text-white">Visit us again on a bigger screen</h3>
294294
<!-- TODO: If there is no variation then display '-' -->
295295
<!-- TODO Designer: Add tooltip to badge explaining this is a variation -->
296296
<p class="badge small ms-1 mb-0 align-text-bottom bg-green-100 text-success">+5%</p>
297-
{% if section.has_negative_points %}
298-
<div class="fs-7 mt-2">
299-
{{ section.score }} &equals; Total score ({{ section.non_negative_max|floatformat:"-2" }}) &minus; Penalty points ({{ section.negative_points }})
300-
</div>
301-
{% endif %}
302297
</td>
303298
{% endif %}
304299

@@ -316,7 +311,7 @@ <h3 class="exclamation text-white">Visit us again on a bigger screen</h3>
316311
</td>
317312
{% endfor %}
318313

319-
<td class="d-none d-md-table-cell top-tier-score border-bottom border-opacity-25 border-primary"></td>
314+
<td class="d-none d-md-table-cell top-tier-score border-end border-bottom border-opacity-25 border-primary"></td>
320315

321316
<td class="button-wrapper p-0 bg-white d-none d-md-table-cell text-start">
322317
<button type="button" class="btn btn-outline-primary js-toggle-council-question-table-section border-start-0 rounded-0" aria-label="Expand this section" title="Expand this section">
@@ -377,8 +372,8 @@ <h3 class="exclamation text-white">Visit us again on a bigger screen</h3>
377372
{% endfor %}
378373

379374
<tbody class="table-question-council__section">
380-
<tr data-has-plan="no" class="section-row bg-purple-200 fw-bold">
381-
<td colspan="1" class="section-cell border-bottom border-end border-opacity-25 border-primary text-start">
375+
<tr data-has-plan="no" class="section-row bg-purple-100 fw-bold">
376+
<td colspan="1" class="section-cell border-bottom border-start border-end border-opacity-25 border-primary text-start">
382377
Total score
383378
</td>
384379
<td class="score border-bottom border-opacity-25 border-primary is--section-score">
@@ -407,7 +402,7 @@ <h3 class="exclamation text-white">Visit us again on a bigger screen</h3>
407402
</td>
408403
{% endfor %}
409404

410-
<td class="d-none d-md-table-cell top-tier-score border-bottom border-opacity-25 border-primary"></td>
405+
<td class="d-none d-md-table-cell top-tier-score border-end border-bottom border-opacity-25 border-primary"></td>
411406
<td class="button-wrapper p-0 bg-white d-none d-md-table-cell"></td>
412407
</tr>
413408
</tbody>

0 commit comments

Comments
 (0)