From bebcc5042aa1c1562874c82fea2892972ebc8afe Mon Sep 17 00:00:00 2001 From: Gopesh Tulsyan Date: Mon, 16 Jun 2014 23:55:11 +0530 Subject: [PATCH] Dropped Js function for styling --- app/assets/stylesheets/osem.css | 3 +++ app/views/conference/_location.html.haml | 14 +------------- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/app/assets/stylesheets/osem.css b/app/assets/stylesheets/osem.css index dcfd19c8..19c8e07c 100644 --- a/app/assets/stylesheets/osem.css +++ b/app/assets/stylesheets/osem.css @@ -99,6 +99,9 @@ body { background-size: cover; -webkit-background-size:cover; } +#venue-banner-disp.with-background{ + min-height: 500px; +} #venue-banner-disp li{ display: inline-block; diff --git a/app/views/conference/_location.html.haml b/app/views/conference/_location.html.haml index 3b0c33cf..48c90da3 100644 --- a/app/views/conference/_location.html.haml +++ b/app/views/conference/_location.html.haml @@ -3,7 +3,7 @@ %a{ href: '#location' } Location -%div#venue-banner-disp +%div#venue-banner-disp{ style: ("background-image: url(#{@conference.venue.photo})" if @conference.venue.photo), class:('with-background' if @conference.venue.photo) } %div.container.text-center .div.row.col-md-12 - unless @conference.venue.name.blank? @@ -24,15 +24,3 @@ %li %b = link_to 'Visit Venue Website', @conference.venue.website, target: '_blank' - - -- unless @conference.venue.photo.blank? - :javascript - $(document).ready(function(){ - var photo = "#{@conference.venue.photo}"; - if(photo) - { - $('#venue-banner-disp').css('min-height','500px'); - $('#venue-banner-disp').css('background-image', 'url('+photo+')'); - } - });