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

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

-if !@facebook_img or @facebook_img == ""
  -@facebook_img= ""
  

%html{:lang => "fr"}
  %head
    %meta{:charset => "UTF-8"}/
    %meta{:content => "width=device-width, initial-scale=1.0", :name => "viewport"}/
    %meta{:content => "", :name => "description"}/
    %meta{:content => "", :name => "author"}/
    
    / Favicons
    <link rel="apple-touch-icon" sizes="180x180" href="/sf/apple-touch-icon.png">
    <link rel="icon" type="image/png" sizes="32x32" href="/sf/favicon-32x32.png">
    <link rel="icon" type="image/png" sizes="16x16" href="/sf/favicon-16x16.png">
    <link rel="manifest" href="/sf/site.webmanifest">
    <link rel="mask-icon" href="/sf/safari-pinned-tab.svg" color="#5bbad5">
    <meta name="msapplication-TileColor" content="#ffffff">
    <meta name="theme-color" content="#ffffff">
    / Web Fonts
    <link rel="preconnect" href="https://fonts.gstatic.com">
    <link href="https://fonts.googleapis.com/css2?family=Montserrat&family=Nunito&display=swap" rel="stylesheet">
    %link{:href => "https://use.fontawesome.com/releases/v5.0.6/css/all.css", :rel => "stylesheet"}/
  
  
    =########
    -@title = strip_tags(@title.to_s)
    %title=@title.to_s
    
  
    %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="'+@facebook_description.to_s+'" />'
    =raw '<meta property="og:url" content="'+@social_url+'" />'


    
    =raw '<meta property="twitter:title" content="'+@twitter_title.to_s+'"/>'
    =raw '<meta property="twitter:description" content="'+@twitter_description.to_s+'"/>'
    =raw '<meta property="twitter:url" content="'+@social_url+'"/>'


    -if @facebook_img
      =raw '<meta property="og:image" content="https://'+QI_CONFIG["hostname"].to_s+@facebook_img.to_s+'"/>'
      =raw '<link rel="image_src" href="https://'+QI_CONFIG["hostname"].to_s+@facebook_img.to_s+'"/>'

      =raw '<meta name="twitter:card" content="summary_large_image">'

      =raw '<meta property="twitter:image" content="https://'+QI_CONFIG["hostname"].to_s+@facebook_img.to_s+'"/>'

      -begin     
        -if @facebook_img
          -require 'rmagick'

          -img = Magick::Image.ping((Rails.root.to_s + "/public".to_s + @facebook_img.to_s) ).first
          -@img_size = []
          -puts @img_size[0] = img.columns
          -puts @img_size[1] = img.rows
      
      -rescue
        -""
    
      -if @img_size and @img_size.size > 0
        =raw '<meta property="og:image:width" content="'+@img_size[0].to_s+'"/>'
        =raw '<meta property="og:image:height" content="'+@img_size[1].to_s+'"/>'

  
    = javascript_include_tag "public"
    = stylesheet_link_tag 'public', :media => :all
 
    = csrf_meta_tag
  
    =render :partial => "public/shared/ga"
    
    
    
    
    
  %body
    -if current_admin
    
      
      %header.header
        
        .container-fluid
          / Brand
          .inner-header
            =link_to public_p_products_path, :class => "inner-header" do
              =image_tag "/logo-mdmb.png", :id => "logo"
            
            
          / Navigation
          .inner-navigation.collapse
            .inner-nav
            
            
              %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) != "" and menu_item.menu_item_langs.present?
                    %li{:class => ("menu-item-has-children menu-item-has-mega-menu" if menu_item.children.size > 0).to_s}
                      =link_to menu_item_url(menu_item), :class => (" active" if @menu_item and (@menu_item.id == menu_item.id or menu_item.children.ids.include?(@menu_item.id)) ).to_s do
                        %span.menu-item-span  
                          =menu_item.lang("fr").name
                    
                    
                      -if menu_item.children.size
                        .mega-menu
                          %ul.sub-menu.mega-menu-row
                            %li.menu-item-has-children.mega-menu-col
                              %ul.sub-menu
                                -menu_item.children.order("position ASC").all.each do |menu_item|
                                  %li{:class => (" active" if @menu_item and (@menu_item.id == menu_item.id or menu_item.children.ids.include?(@menu_item.id)) ).to_s}
                                    =link_to menu_item_url(menu_item), :class => (" active" if @menu_item and (@menu_item.id == menu_item.id or menu_item.children.ids.include?(@menu_item.id)) ).to_s do
                                      -if menu_item.icon_b_image_file
                                        .b_icon=image_tag menu_item.icon_b_image_file.file.large.url
                                      
                                      -if menu_item.icon_v_image_file
                                        .v_icon=image_tag menu_item.icon_v_image_file.file.large.url
                                    
                                      =menu_item.lang("fr").name
                        
            
            
          .extra-nav
            %ul
              -if false
                %li
                  %a.top-bar-cart{:href => "/fr/public/p_orders/cart"}
                    %span.menu-item-span
                      %i.ti-shopping-cart
                    
                %li
                  %a.off-canvas-open{:href => "#"}
                    %span.menu-item-span
                      %i.ti-menu
              %li.nav-toggle
                %a{"data-target" => ".inner-navigation", "data-toggle" => "collapse", :href => "#"}
                  %span.menu-item-span
                    %i.ti-menu
        #sub_menu
          =render :partial => "public/p_orders/cart_menu"


      .wrapper#main_wrapper
      
        =yield
      
        %footer.footer
          .footer-widgets
            .container
              .row
              
                .col-md-3
                  %p
                    %img.wp-image-10.alignleft{:alt => "", :height => "96", :src => "/logo-mdmb.png", :width => "168"}/
          
                .col-md-5
                  %p{:style => "text-align: left;"} 
                    MAISON DES METIERS DE BOUCHE
                    %br/
                    20 chemin des Posés
                    %br/
                    74330 POISY
                  
                  %p{:style => "text-align: left;"}
                    T. +33 (0)9 83 51 63 80
    
                    %br/
                    %a{:href => "mailto:CONTACT@MAISONDESMETIERSDEBOUCHE.FR"} CONTACT@MAISONDESMETIERSDEBOUCHE.FR
                    
                .col-md-1
                  
          
                .col-md-3
                  %p{:style => "text-align: left;"} SARL au capital de 25 000 € 
                  %p{:style => "text-align: left;"}
                    RCS : ANNECY B 789 317 708
                    %br/
                    SIRET : 789 317 708 00038 - APE : 4669C
                    %br/
                    N° TVA intra. : FR00789317708
            %p
              
              
    
      %a.scroll-top{:href => "#top"}
        %i.fas.fa-angle-up

  

  
  
  
      
    


      :javascript
        resize()

