
=#.circuit
=#    %h3=circuit.name


=link_to [:public, circuit], :class => "circuit" do
  -img = ""
  -img = circuit.logo.file.large.medium.url if circuit.logo 
  -img = circuit.image_file.file.large.medium.url if circuit.image_file 
  .img{:style => ("background-image:url('#{img}');" if img).to_s+(" background-size:contain;" if !circuit.image_file ).to_s}

  
  .desc
    -if circuit.logo
      .absolute_logo
        =image_tag (circuit.logo.file.large.medium.url )
 
    .titre_list
      %h3=circuit.name
    .details
      -if circuit.description.size > 250
        %p
          =circuit.description.truncate(250)
        
          %u
            + d'infos
      -else
        =simple_format circuit.description
    .info_lien
      .block_info
        =circuit.cp
        =circuit.city
      
      -if circuit.longueur?
        .block_info
          %img{:src => "https://www.mamotosurcircuit.com/images/interface/picto_flag.png"}/
          =circuit.longueur


      -if circuit.nbr_courbes?
        .block_info
          %img{:src => "https://www.mamotosurcircuit.com/images/interface/picto_nombre_virages.png"}/
          =circuit.nbr_courbes

      -if circuit.longueur_ligne?
        .block_info
          %img{:src => "https://www.mamotosurcircuit.com/images/interface/picto_longueur_circuit.png"}/
          =circuit.longueur_ligne
      
