-if @m_odr
  -@title = @m_odr.name
  -@description = @m_odr.description


-@products_controllers = ["ProductOrdersController", "ProductsController","ProductCategoriesController", "ProductCustomersController", "ProductCustomersAuthsController" ]

-@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= ""
!!!

- @social_url = @social_url || request.url.to_s
-if @description and @description == ""
  - @description = qit "SEO texte description par défaut",""

%html{:lang => "fr", "xml:lang" => "fr", :xmlns => "http://www.w3.org/1999/xhtml"}
  %head
    -@title = strip_tags(@title.to_s)
    %title=@title.to_s
    <link rel="apple-touch-icon" sizes="57x57" href="/apple-touch-icon-57x57.png">
    <link rel="apple-touch-icon" sizes="60x60" href="/apple-touch-icon-60x60.png">
    <link rel="apple-touch-icon" sizes="72x72" href="/apple-touch-icon-72x72.png">
    <link rel="apple-touch-icon" sizes="76x76" href="/apple-touch-icon-76x76.png">
    <link rel="apple-touch-icon" sizes="114x114" href="/apple-touch-icon-114x114.png">
    <link rel="apple-touch-icon" sizes="120x120" href="/apple-touch-icon-120x120.png">
    <link rel="apple-touch-icon" sizes="144x144" href="/apple-touch-icon-144x144.png">
    <link rel="apple-touch-icon" sizes="152x152" href="/apple-touch-icon-152x152.png">
    <link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon-180x180.png">
    <link rel="icon" type="image/png" href="/favicon-32x32.png" sizes="32x32">
    <link rel="icon" type="image/png" href="/favicon-194x194.png" sizes="194x194">
    <link rel="icon" type="image/png" href="/favicon-96x96.png" sizes="96x96">
    <link rel="icon" type="image/png" href="/android-chrome-192x192.png" sizes="192x192">
    <link rel="icon" type="image/png" href="/favicon-16x16.png" sizes="16x16">
    <link rel="manifest" href="/manifest.json">
    <link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5">
    <meta name="msapplication-TileColor" content="#ffffff">
    <meta name="msapplication-TileImage" content="/mstile-144x144.png">
    <meta name="theme-color" content="#ffffff">
    <link href="https://fonts.googleapis.com/css?family=Open+Sans:800&display=swap" rel="stylesheet">
    %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 }  
    =raw '<meta property="og:title" content="'+@facebook_title.to_s+'" />'
    =raw '<meta property="og:description" content="'+@description.to_s+'" />'
    =raw '<meta property="og:url" content="'+@social_url+'" />'
    
    
    =raw '<meta property="twitter:description" content="'+((@description and @description != "") ? @description : "En savoir plus :").to_s+'"/>'
    =raw '<meta property="twitter:title" content="'+@twitter_title.to_s+'"/>'
    =raw '<meta property="twitter:site" content=""/>'
    =raw '<meta property="twitter:creator" content=""/>'
    =raw '<meta property="twitter:url" content="'+@social_url+'"/>'
    
    
    -if @facebook_img
      =raw '<meta property="og:image" content="https://mmsc.olwen.xyz'+@facebook_img.to_s+'"/>'
      =raw '<link rel="image_src" href="https://mmsc.olwen.xyz'+@facebook_img.to_s+'"/>'
      
      =raw '<meta name="twitter:card" content="summary_large_image">'
      
      
      
      
      =raw '<meta property="twitter:image" content="https://mmsc.olwen.xyz'+@facebook_img.to_s+'"/>'
      
     
      
      
     
  
    = javascript_include_tag "public"
    
    = csrf_meta_tag 
    =render :partial => "public/shared/ga"
    
    = stylesheet_link_tag 'public', :media => :all
    
    
      
  %body.pageAccueil
    -if flash[:error] or flash[:notice] or flash[:alert] 
      .flashs
        -if flash[:error]
          .error
            %span.remove=ic :times
            =flash[:error] 
        -if flash[:notice]
          .notice
            %span.remove=ic :times
            =flash[:notice] 
        -if flash[:alert]
          .alert
            %span.remove=ic :times
            =flash[:alert]
    %span.fond_body_1
      %span.fond_body_2
        #conteneur
          #conteneur_contenu
            #header.WithCarousel
              .top-bar
                .container
                  .header-topbarbox-1
                  .header-topbarbox-2
                    %ul.social-links
                    
                      -if current_p_customer
                        =link_to ic(:"power-off")+" Déconnexion", logout_public_p_customer_auths_path()
                        
                        
                      %li
                        -if current_p_customer
                          =link_to public_my_account_path do 
                            =ic(:user)
                            Mon compte : 
                            =current_p_customer.particular.firstname
                            =current_p_customer.particular.name
                            
                        -else
                          =link_to ic(:user)+" Mon compte", public_my_account_path
                        
                      
                      %li
                        %a{:href => "https://www.facebook.com/mamotosurcircuit/", :target => "_blank"}
                          =ic :"facebook-f"
                     
              #conteneur_header
                #logo
                  %h1
                    %a{:href => "/"}
                      %img.logo_top{:alt => "Ma moto sur circuit", :src => "/images/interface/Logo-DMD.png", :title => "Ma moto sur circuit"}/
                      %img.logo_scroll{:alt => "Ma moto sur circuit", :src => "/images/interface/logo_petit.png", :title => "Ma moto sur circuit"}/
                #position-menu
                  #menu_haut.WithCarousel
                    %ul
                      

                      -MenuItem.where(:parent_id => nil, :menu_id => 1).order(:position).each do |menu_item|
                        -if menu_item_link(menu_item) and menu_item_link(menu_item) != ""
                          %li
                            =menu_item_link(menu_item)
                      

                      -if false
                        %li.PGS_ROULAGE
                          =link_to "Trouvez votre journée", public_m_events_path


                      %li.PGS_ANNUAIRE_CIRCUIT
                        =link_to "Circuits", public_circuits_path, :class => ("active" if @circuits_active)
                      %li.PGS_ANNUAIRE_ORGA
                        =link_to "Organisateurs", public_organisateurs_path, :class => ("active" if @organisateurs_active)
                      
                      %li.PGS_DISTRIBUTEUR
                        %a{:href => "https://www.dunlop.eu/fr_fr/motorcycle/dealers/find-a-dealer.html", :target => "_blank", :title => "Distributeurs"}
                          %span Distributeurs
             
                     


              %button.navbar-toggle.collapsed.btn-menu{"aria-controls" => "navbar", "aria-expanded" => "false", "data-target" => "#navbar", "data-toggle" => "collapse", :type => "button"}
                %span.sr-only Toggle navigation
                %span.icon-bar
                %span.icon-bar
                %span.icon-bar
            
            #contenu
              / 
              #centreetdroite
                


                =yield
              / 
            #pied
              #conteneur_pied
                .row
                  .col-md-4
                    .footer-section
                      %a.footer__logo{:href => "#"}
                        %img.img-responsive{:src => "/images/interface/Logo-DMD.png"}/
                      .footer__info Devenez membre de la communauté pour accéder aux avantages exclusifs.
                      %ul.social-net.list-inline
                        %li.social-net__item
                          %a.social-net__link.text-primary_h{:href => "https://www.facebook.com/mamotosurcircuit/", :target => "_blank"}
                            =ic(:"facebook-f")
                       
                  .col-md-4
                    %section.footer-section.footer-section_list-columns
                      %h3.footer-section__title.ui-title-inner Liens utiles
                      %ul.footer-list.footer-list_columns.list-unstyled
                        %li
                          %a{:accesskey => "3", :href => "/fr/plan-site.html", :title => "Plan du site"} Plan du site
                        %li
                          %a{:accesskey => "8", :href => "/fr/mentions-legales.html", :title => "Mentions légales"} Mentions légales
                        %li
                          %a{:accesskey => "8", :href => "/fr/conditions-generales-utilisation.html", :title => "Conditions générales d'utilisation"} Conditions générales d'utilisation
                  .col-md-4
                    %section.footer-section
                      %h3.footer-section__title.ui-title-inner Nous contacter
                      .footer-contact
                        %i.icon.icon-xs.fa.fa-envelope-o
                        %a{:href => "mailto:contact@mamotosurcircuit.com"} contact@mamotosurcircuit.com
                      .footer-contact
                        %i.icon.icon-lg.fa.fa-map-marker>
                        8 route des bois 38500 VOIRON
                      .footer-contact
                        %i.icon.icon-lg.fa.fa-phone>
                        04 76 31 38 38
          / conteneur_contenu //
        / conteneur//
    %button#totop{:style => "display: none;", :type => "button"} To the top
  
    
      
    :javascript
      resize()
  
