peractus_app/app/views/public/articles/_article.html.haml
Nicolas Bally 1810d38bd6 url
2018-08-07 11:49:17 +02:00

34 lines
916 B
Plaintext

-lang_article = article.lang_articles.find_by_lang_site_id(@lang.id)
-#if article.without_text_image_file
-#img_url = "https://peractus.quartz.xyz"+article.without_text_image_file.file.large.url
-if article.image_file
-img_url = ""+article.image_file.file.large.medium.url
-if !article.breve
%div{:class => (article.breve ? "breve" : "actu")}
.img.with_ratio{:style => "background-image:url('#{img_url}');background-size:100%;background-size:cover;", :data => {:ratio => 0.62}}
.description
%h3= lang_article.title
=simple_format lang_article.description
.cta
=link_to article_path(:slug => lang_article.slug, :lang => @lang.slug), :class => "btn" do
=qit("Lire l'article")
>
.clear
-else
%div{:class => (article.breve ? "breve" : "actu")}
=l (article.published_at), :format => "%d %b"
="-"
= lang_article.title