From fb6a270fa61f054eaf49e3dbf4ee44e1026e3fac Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Sun, 10 Feb 2019 21:51:06 +1300 Subject: [PATCH] Tidy up crop predictions display --- app/assets/stylesheets/overrides.sass | 1 - app/assets/stylesheets/predictions.sass | 8 ++++++-- app/views/crops/_predictions.html.haml | 13 +++++-------- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/app/assets/stylesheets/overrides.sass b/app/assets/stylesheets/overrides.sass index 2af4dfa7f..1b7d4d152 100644 --- a/app/assets/stylesheets/overrides.sass +++ b/app/assets/stylesheets/overrides.sass @@ -41,7 +41,6 @@ h3 .profile-sidebar margin-top: -5rem .avatar - border-radius: 50% border-radius: 50% z-index: 2 position: relative diff --git a/app/assets/stylesheets/predictions.sass b/app/assets/stylesheets/predictions.sass index ad7fd45c1..f8120c8b5 100644 --- a/app/assets/stylesheets/predictions.sass +++ b/app/assets/stylesheets/predictions.sass @@ -1,10 +1,14 @@ .predictions - .metric + .prediction-metric + text-align: center height: 180px border: 1px solid lighten($green, 20%) + border-radius: 5% background: $white margin: 4px strong - font-size: 250% + font-size: 4em font-align: center h3 + span + display: block \ No newline at end of file diff --git a/app/views/crops/_predictions.html.haml b/app/views/crops/_predictions.html.haml index 74e8bafb1..dfdc7659f 100644 --- a/app/views/crops/_predictions.html.haml +++ b/app/views/crops/_predictions.html.haml @@ -12,24 +12,21 @@ = link_to 'https://en.wikipedia.org/wiki/Annual_vs._perennial_plant_evolution' do an annual crop (living and reproducing in a single year or less) - .row - if crop.annual? && crop.median_lifespan.present? - .metric.col-md-3.col-xs-5 + .prediction-metric.col-md-3.col-xs-5 %h3 Median lifespan %strong= crop.median_lifespan %span days - if crop.median_days_to_first_harvest.present? - .metric.col-md-3.col-xs-5 + .prediction-metric.col-md-3.col-xs-5 %h3 First harvest expected %strong= crop.median_days_to_first_harvest - %span days - after planting + %span days after planting - if crop.annual? && crop.median_days_to_last_harvest.present? - .metric.col-md-3.col-xs-5 + .prediction-metric.col-md-3.col-xs-5 %h3 Last harvest expected %strong= crop.median_days_to_last_harvest - %span days - after planting + %span days after planting