-@facebook_title = @facebook_title || @title - @twitter_title = @twitter_title || @title -@menu_shadow=true -@lang = @lang || LangSite.first -if !@facebook_img or @facebook_img == "" -@facebook_img= "/public_medias/image_file/file/13/large_4df7bef3.jpg" !!! - @social_url = @social_url || request.url.to_s -if @description and @description == "" - @description = qit "SEO texte description par défaut 2","" %html{:lang => "fr", "xml:lang" => "fr", :xmlns => "http://www.w3.org/1999/xhtml"} %head -@title = strip_tags(@title.to_s) %title=@title.to_s %meta{:name=>"viewport", :content=>"width=device-width,initial-scale=1"} %meta{ :"http-equiv" => "Content-Type", :content => "text/html; charset=utf-8" } %meta{ :"name" => "Description", :content => @description } %meta{ :"name" => "Keywords", :content => @keywords } -if @facebook_img =raw '' =raw '' =raw '' =raw '' -@img_size = FastImage.size('https://olwen-capital.com'+@facebook_img.to_s) -if @img_size and @img_size.size > 0 =raw '' =raw '' = javascript_include_tag "public" = csrf_meta_tag =render :partial => "public/shared/ga" = stylesheet_link_tag 'public', :media => :all =javascript_include_tag "https://maps.googleapis.com/maps/api/js?libraries=places,geometry&sensor=false" %body =link_to image_tag("/logo-fond.png", :id => "logo_fond"), "/" -if @menu_item and @menu_item.id == 1 .slide_home_wrapper =image_tag("/50ans.png", :id => "cinquante") #menu_top .sub_menu =ic :"map-marker" 2089 route de St Quentin - 38430 MOIRANS    =ic :phone 04 76 35 31 69 .menu =link_to "LE GROUPE", "#main" =link_to "ACTUALITES", "#actus" =link_to "CONTACT", "#footer" .slide_home.slider -@home_slider = HomeSlider.find_by_slug("home") -@date = Time.now -if @home_slider -@home_slides_simu = @home_slider.home_slider_slides.where(:enabled => true) -@home_slides_simu = @home_slides_simu.where("start_at IS NULL or start_at <= ?",@date) -@home_slides_simu = @home_slides_simu.where("end_at IS NULL or end_at >= ?",@date) -@home_slides_simu = @home_slides_simu.order(:position) -@home_slides_simu = @home_slides_simu.joins(:lang_sites).where("lang_sites.id = ?", @lang.id) -@home_slides_simu.each do |home_slider_slide| -if home_slider_slide.image_file %div.with_ratio.slide{:style => "background-image:url('#{home_slider_slide.image_file.file.large.url}');background-size:100%;background-size:cover;", :data => {:ratio => 0.45}} =link_to home_slider_slide.url.to_s, :target => ("_blank" if home_slider_slide.popup) do .link_overlay .description.vertical_center =link_to home_slider_slide.url.to_s, :target => ("_blank" if home_slider_slide.popup) do %h3 -if home_slider_slide.article -lang_article = home_slider_slide.article.lang_articles.find_by_lang_site_id(@lang.id) =lang_article.title -else =image_tag "/payre-#{home_slider_slide.titre1.to_s.downcase}.png", :class => "logo" -if home_slider_slide.titre2? .sub_title=home_slider_slide.titre2 -elsif home_slider_slide.article .sub_title -if home_slider_slide.article.category -cats = [] -home_slider_slide.article.categories.uniq.each do |cat| -cats << cat.lang(I18n.locale.to_s).name =cats.join(", ") %span.sep ="|" =l(home_slider_slide.article.published_at, :format => :human_date) .content =home_slider_slide.description1 .sub_bar{:style => "left:0%;color:#2ca8e1;border-color:#2ca8e1;"} Agriculture .sub_bar{:style => "left:25%;color:#f2930d;border-color:#f2930d;"} Energies .sub_bar{:style => "left:50%;color:#e3101a;border-color:#e3101a;"} Maintenance .sub_bar{:style => "left:75%;color:#118d42;border-color:#118d42;"} Jardinerie :javascript $(document).ready(function(){ $('.slider').bxSlider({ nextText: '>', prevText: '<', auto: true }); }); -else .slide_home_wrapper.with_ratio{:style => "background-image:url('#{@img_url}');", :data => {:ratio => 0.35}} #menu_top .sub_menu =ic :"map-marker" 2089 route de St Quentin - 38430 MOIRANS    =ic :phone 04 76 35 31 69 .menu =link_to "LE GROUPE", "/#main" =link_to "ACTUALITES", "/#actus" =link_to "CONTACT", "/#footer" -if @menu_item and @menu_item.id == 1 #main=yield -else #main_content=yield -if @menu_item and @menu_item.id == 1 #actus .center #left_actus %h2 L'actualité du groupe -@articles = Article.before(Time.now).recents.where(:category_id => 1).joins(:lang_articles).where("lang_articles.enabled = 1 and lang_articles.lang_site_id = ?", @lang.id) =render @articles #right_actus %h2 L'actu de nos domaines -@articles = Article.before(Time.now).recents.where("category_id != 1").joins(:lang_articles).where("lang_articles.enabled = 1 and lang_articles.lang_site_id = ?", @lang.id) -@articles.each do |article| -lang_article = article.lang_articles.find_by_lang_site_id(@lang.id) =link_to article_path(:slug => lang_article.slug, :lang => @lang.slug), :style => "text-decoration:none;" do %div{:class => "breve"} .color{:style => "background:#{article.category.color};"} =l (article.published_at), :format => "%d %b" ="-" = lang_article.title .clear #footer .center %h2 Nous contacter -@contact = @contact || Contact.new(:provenance_id => 1) .contact_form.contact_militer#form =render :partial => "public/contacts/form" =image_tag "/bottom-lines.png", :id => "bottom_lines" #sub_footer #logos =link_to "http://payreagri.quartz.xyz", :target => "_blank" do =image_tag "/payre-agriculture.png" =link_to "http://payre3p.quartz.xyz", :target => "_blank" do =image_tag "/payre-energies.png" =link_to "http://payrepmc.quartz.xyz", :target => "_blank" do =image_tag "/payre-maintenance.png" =link_to "http://payrejardi.quartz.xyz", :target => "_blank" do =image_tag "/payre-jardinerie.png" #place %p SAS PAYRE %br 2089 route de St Quentin %br 38430 MOIRANS #contacts %p =ic :phone 04 76 35 31 69 %br =ic :fax 04 76 35 37 36 %br =link_to "mailto:contact@payre.co" do =ic :"envelope-o" contact@payre.co .clear :javascript resize()