-if @admin 
  .dynamic
    Label
    

.index_label
  %h3 Découvrez les marques 100% labélisées
  
  -NewLabelEntreprise.order("name").all.each do |new_label_entreprise| 
    =link_to new_label_entreprise.website, :target => "_blank" do 
      .label_marque_img
        .inner_logo{:style => "background-image:url('#{new_label_entreprise.image_file.file.large.medium.url if new_label_entreprise.image_file}');"}
        -if !new_label_entreprise.image_file
          .inner_title 
            =new_label_entreprise.name
  
  %h3 Découvrez les produits labellisés des marques suivantes
  
  -LabelMarque.order("name").all.each do |label_marque| 
    =link_to "/public/label_produits?search=true&q=&label_marque_id=#{label_marque.id}", :target => "_blank" do 
      .label_marque_img
        .inner_logo{:style => "background-image:url('#{label_marque.image_file.file.large.medium.url if label_marque.image_file}');"}
        -if !label_marque.image_file
          .inner_title
            =label_marque.name

:scss
  .index_label{
    text-align:center;
    h3{
      text-align:center;
      margin-top:30px;
      margin-bottom:20px;
    }
    .label_marque_img{
      
      height:140px;
      width:140px;
      margin:2px;
      padding:5px;
      
      display:inline-block;
      
      position:relative;
      border:1px solid rgba(0,0,0,0.1);
      .inner_logo{
        position:absolute;
        left:12px;
        right:12px;
        top:12px;
        bottom:12px;
        background:center center no-repeat;
        background-size:100%;
        background-size:contain;
        
        
        
      }
      .inner_title{
        position:absolute;
        left:0;
        right:0;
        top:60px;
        text-align:center;
        color:black;
        
      }
    }
    
  }
  
  
.bottom_subpages
  -@menu_item.children.order(:position).each do |menu_item|
  
    -menu_item_lang = menu_item.menu_item_langs.find_by_lang_site_id(@lang.id)

    
    -name = menu_item_lang.name
    -if menu_item_lang.enabled == true and menu_item_lang.visible == true
      -if menu_item.image_file

      
       
        -img_url = menu_item.image_file.file.large.medium.url 

        -if menu_item.image_file and menu_item.image_file.photograph
          -@page_images_credits << menu_item.image_file.photograph




      -css_style = "background-image:url('#{img_url}');background-size:100%;background-size:cover;background-position:center center;display:block;min-height:50px;"


      .subpage_link
        =link_to @one_voice_host.to_s+menu_item_path(:url => menu_item_lang.url, :lang => @lang.slug) , :class => "with_ratio" do
          .with_ratio{:style => css_style, :data => {:ratio => 0.62}}
        

          .overlay


          %h4.title
            =menu_item.menu_item_langs.find_by_lang_site_id(@lang.id).name