Tweak formatting of images with popovers (used mostly on homepage)

This commit is contained in:
Skud
2014-08-28 11:46:36 +10:00
parent b260169d2d
commit 848b583d94
4 changed files with 11 additions and 4 deletions

View File

@@ -176,6 +176,11 @@ footer .navbar .nav {
border-radius: 0;
}
.crop-image, .member-image {
width: 100%;
height: 100%;
}
// Overrides applying only to mobile view. This must be at the end of the overrides file.
@media only screen and (max-width: 767px) {

View File

@@ -2,11 +2,12 @@
= link_to |
image_tag( |
crop.default_photo ? crop.default_photo.thumbnail_url : 'placeholder_150.png', |
:alt => crop.name |
:alt => crop.name, |
:class => 'image-responsive crop-image' |
), |
crop, |
:rel => "popover", |
'data-trigger' => 'hover', |
'data-title' => crop.name, |
'data-content' => "#{ render :partial => 'crops/popover', :locals => { :crop => crop } }", |
'data-html' => true
'data-html' => true |

View File

@@ -5,7 +5,7 @@
:size => defined?(size) ? size : 150, |
:default => :identicon }), |
:alt => member.login_name, |
:class => 'img-responsive' |
:class => 'img-responsive member-image' |
), |
member, |
:rel => "popover", |

View File

@@ -2,7 +2,8 @@
= link_to |
image_tag( |
planting.photos.present? ? planting.photos.first.thumbnail_url : 'placeholder_150.png', |
:alt => planting.to_s |
:alt => planting.to_s, |
:class => 'image-responsive crop-image' |
), |
planting, |
:rel => "popover", |