peractus_app/app/views/public/articles/_article_img.html.haml
Nicolas Bally 57c4286eb9 Suite
2018-08-07 12:00:05 +02:00

17 lines
411 B
Plaintext

-if article.without_text_image_file
-img_url = "http://peractus.quartz.xyz"+article.without_text_image_file.file.large.url
-elsif article.image_file
-img_url = "http://peractus.quartz.xyz"+article.image_file.file.large.url
-else
-img_url = ""
%a.article_img{:href => article_path(:slug => article.slug), :style => "background-image:url('#{img_url}')"}
.content
%span=article.title