transformeurs_app/app/views/public/articles/_article_x2.html.haml
Nicolas Bally edc6aa0b89 Suite
2018-08-07 12:00:10 +02:00

19 lines
693 B
Plaintext

-lang_article = article.lang_articles.find_by_lang_site_id(@lang.id)
-if article.without_text_image_file
-img_url = "http://transformeurs.quartz.xyz"+article.without_text_image_file.file.large.medium.small.url
-elsif article.image_file
-img_url = "http://transformeurs.quartz.xyz"+article.image_file.file.large.medium.small.url
=link_to article_path(:slug => lang_article.slug, :lang => @lang.slug), :class => "article-2x " do
.img.with_ratio{:style => "background-image:url('#{img_url}');", :data => {:ratio => 0.62}}
.description
%h2= lang_article.title
-if article.image_file and article.image_file.photograph
-@page_images_credits << article.image_file.photograph