-if input.video_file -video_file = input.video_file -if input.video_file.image_file -img_url = input.video_file.image_file.file.large.url -else -img_url = "" -css_style = "background-image:url('#{img_url}');background-size:100%;background-size:cover;background-position:center center;" -if video_file and video_file.youtube_code? -facebook_link = link_to "https://www.facebook.com/sharer/sharer.php?u=#{public_video_file_url(:slug => video_file.slug)}", :target => "_blank", :class => "link facebook", :onclick => "event.stopPropagation();" do =i(:"facebook") =#text=CSS%20Social%20Media%20Sidebar& -twitter_link = link_to "https://twitter.com/intent/tweet?url=#{public_video_file_url(:slug => video_file.slug)}&via=onevoiceplanet", :target => "_blank", :class => "link twitter", :onclick => "event.stopPropagation();" do =i(:"twitter") .video_expand.menu_itemlink_content{:style => css_style, :data => {:video_title => video_file.title, :facebook_link => facebook_link, :twitter_link => twitter_link, :ratio => "0.62", :video_url => 'https://www.youtube.com/embed/'+video_file.youtube_code+'?autoplay=1&rel=0'}} .overlay .gradient %h4.title =ic(:play) = video_file.title if video_file.title?