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

26 lines
909 B
Plaintext

-lang_article = article.lang_articles.find_by_lang_site_id(@lang.id)
-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
=link_to article_path(:slug => lang_article.slug, :lang => @lang.slug), :class => "article-2x-2", :data => {:ratio => "0.62"} do
.inner{:style => "background-image:url('#{img_url}');"}
.gradient
%h2= lang_article.title
%p.date
=("le " if @lang.id != 2).to_s+l(article.published_at, :format => :human_date)
.comments
%span.coms=i(:"comment-o")+" "+article.comments.where(:enabled => true).count.to_s
%p.read_more
=qit "blog lire plus", "Lire la suite"
-if article.image_file and article.image_file.photograph
-@page_images_credits << article.image_file.photograph