Tidy up visual link between planting thumbnail and crop name

This commit is contained in:
Brenda Wallace
2018-04-21 12:38:32 +12:00
parent 4fe8cd566b
commit 935aebcb0d
3 changed files with 28 additions and 14 deletions

View File

@@ -93,17 +93,28 @@ p.stats
padding-left: 1em
width: 15em
.progress
border-radius: 0
.planting
.planting-badges
position: absolute
.planting-thumbnail
padding: 0
border: 1px solid darken($beige, 10%)
border-radius: 4px
.planting-name
position: relative
top: -1em
dl.planting-attributes
dt
text-align: left
dd
margin-left: auto
.planting-badges
position: absolute
#placesmap, #cropmap
height: 500px
@@ -156,6 +167,7 @@ p.stats
text-align: center
margin-bottom: 1.5em
max-width: 160px
max-height: 200px
.member-thumbnail
text-align: left

View File

@@ -1,5 +1,6 @@
- if planting.crop.perennial
%p Perennial
%p
%i perennial
- elsif !planting.planted?
- if show_explanation
%p Progress: 0% - not planted yet

View File

@@ -1,11 +1,12 @@
.planting-badges
= render 'plantings/badges', planting: planting
.hover-wrapper
.text= render 'plantings/actions', planting: planting
.thumbnail
.planting-thumbnail
= link_to image_tag(planting_image_path(planting), alt: planting.crop.name, class: 'img'), planting_path(planting)
.plantinginfo
.planting
.planting-badges
= render 'plantings/badges', planting: planting
.hover-wrapper
.text
= render 'plantings/actions', planting: planting
.thumbnail
.planting-thumbnail
= link_to image_tag(planting_image_path(planting), alt: planting.crop.name, class: 'img'), planting_path(planting)
= render 'plantings/progress', planting: planting, show_explanation: false
.planting-name
= render 'plantings/progress', planting: planting, show_explanation: false
= link_to planting.crop.name, planting