= content_for :splash_nav do %li %a.smoothscroll{ href: '#venue' } Venue -if !@conference.venue.latitude.blank? and !@conference.venue.longitude.blank? #map{style: "height: 500px;" } - popup = "

#{@conference.venue.name}


#{@conference.venue.street}
#{@conference.venue.city}
#{@conference.venue.country_name}" - content_for(:script_body) do :javascript // create a map in the "map" div, set the view to a given place and zoom var map = L.map('map', {scrollWheelZoom: false}).setView([#{@conference.venue.longitude}, #{@conference.venue.latitude}], 11); // add an OpenStreetMap tile layer L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', { attribution: 'Map data © OpenStreetMap contributors, CC-BY-SA, Imagery © Mapbox', maxZoom: 18 }).addTo(map); // add a marker in the given location, attach some popup content to it and open the popup L.marker([#{@conference.venue.longitude}, #{@conference.venue.latitude}]).addTo(map) .bindPopup("#{popup}") .openPopup(); // Turn scrollwheel on when user clicks map.on('focus', function(e) { map.scrollWheelZoom.enable(); }); // Turn scrollwheel off once the map isn't in the viewport anymore $('#map').waypoint({ handler: function(direction) { map.scrollWheelZoom.disable(); //alert('map'); }, offset: '90%' }); $('#map').waypoint({ handler: function(direction) { map.scrollWheelZoom.disable(); //alert('map'); }, offset: '10%' }); -else .container .row .col-md-12 %h2.text-center = "#{@conference.venue.city} / #{@conference.venue.country_name}" .col-md-6 .thumbnail =image_tag(@conference.venue.photo, class: 'img-responsive img-rounded') unless @conference.venue.photo.blank? .caption - unless @conference.venue.description.blank? = markdown(@conference.venue.description) .col-md-6 %address %h1 = @conference.venue.name = @conference.venue.street %br = "#{@conference.venue.postalcode}, #{@conference.venue.city}" %br = @conference.venue.country_name - if @conference.venue.website %br =link_to @conference.venue.website, @conference.venue.website