jipe_app/app/views/public/articles/_article.html.haml
2017-08-14 10:53:30 +02:00

34 lines
973 B
Plaintext

-lang_article = article.lang_articles.find_by_lang_site_id(@lang.id)
-#if article.without_text_image_file
-#img_url = "https://jipe.fr"+article.without_text_image_file.file.large.url
-if article.image_file
-img_url = "https://jipe.fr"+article.image_file.file.large.url
=link_to article_path(:slug => lang_article.slug, :lang => @lang.slug), :class => "article-1x" do
.img.with_ratio{:data => {:ratio => 0.62}, :style => "background-image:url('#{img_url}');background-size:100%;background-size:cover;"}
.comment
%div=i(:"comment-o")
=article.comments.where(:enabled => true).count.to_s
.date
%div
=article.published_at.day
=article.published_at.month
.description
-if !article.title_cached
%h2= lang_article.title
=simple_format lang_article.description
-if article.image_file and article.image_file.photograph
-@page_images_credits << article.image_file.photograph