diff --git a/app/assets/stylesheets/_variables.scss b/app/assets/stylesheets/_variables.scss index b32101769..4308b1214 100644 --- a/app/assets/stylesheets/_variables.scss +++ b/app/assets/stylesheets/_variables.scss @@ -111,8 +111,8 @@ $btn-font-weight: 500; $btn-box-shadow: $material-shadow-raised; $btn-active-box-shadow: 0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 3px rgba(0, 0, 0, 0.12), 0 4px 15px 0 rgba(0, 0, 0, 0.2); -// Progress bars: a thin strip, dark green filled over a lighter green track, as before. -// (These were Bootstrap 3 variables the old skin ignored; Bootstrap 5 reads them.) +// Progress bars: a thin strip over a neutral track. The bar's colour shows how the planting is +// getting on (see .progress-bar--* in overrides.scss). $progress-height: 0.875rem; -$progress-bg: lighten($green, 15%); +$progress-bg: #e0e0e0; $progress-bar-bg: $green; diff --git a/app/assets/stylesheets/overrides.scss b/app/assets/stylesheets/overrides.scss index 38eb1a84f..c601318b4 100755 --- a/app/assets/stylesheets/overrides.scss +++ b/app/assets/stylesheets/overrides.scss @@ -456,6 +456,7 @@ ul.thumbnail-buttons { text-align: justify; } +// Buttons are uppercase, as in the old skin, except link buttons. // Bootstrap only draws the button shadow when $enable-shadows is on, so draw it here. .btn { box-shadow: var(--bs-btn-box-shadow); @@ -486,6 +487,27 @@ ul.thumbnail-buttons { --bs-btn-active-bg: rgba(0, 0, 0, 0.12); } +// Progress bar colours by state (Planting#progress_state). +.progress-bar--growing { + background-color: var(--bs-info); +} + +.progress-bar--harvesting { + background-color: var(--bs-success); +} + +.progress-bar--late { + background-color: var(--bs-warning); +} + +.progress-bar--super_late { + background-color: var(--bs-danger); +} + +.progress-bar--finished { + background-color: var(--bs-secondary); +} + // The card variables drop the card's border, which also drew the line under a // header, so put that line back. .card-header { diff --git a/app/javascript/components/PlantingRow.jsx b/app/javascript/components/PlantingRow.jsx index aec40f58a..744041c92 100644 --- a/app/javascript/components/PlantingRow.jsx +++ b/app/javascript/components/PlantingRow.jsx @@ -29,7 +29,7 @@ export default function PlantingRow({planting, defaultIconUrl, highlighted}) { {planting.progress_note ? ( {planting.progress_note} ) : ( - + )}