blog_perso_app/app/views/public/articles/_article.html.haml
Nicolas Bally ef2a73636b initial 2
2015-02-24 23:47:26 +01:00

36 lines
1.1 KiB
Plaintext

%article
%header
%h1=link_to article.title, article_path(:slug => article.slug), :title => "Blog de Nicolas Bally "+article.title.to_s
.article_infos
%time.updated{:datetime => Time.now, :pubdate => true}
Publié
="le "+l(article.published_at, :format => :human_date)
="-"
-if article.comments.count == 0
=link_to "Pas de commentaires", article_path(:slug => article.slug, :anchor => "comments")
-elsif article.comments.count == 1
=link_to "1 commentaire", article_path(:slug => article.slug, :anchor => "comments")
-else
=link_to "#{article.comments.count} commentaires", article_path(:slug => article.slug, :anchor => "comments")
.desc
%a{:href => article_path(:slug => article.slug)}= article.description
%a.read{:href => article_path(:slug => article.slug)} Lire la suite
-if article.image_file
%a{:href => article_path(:slug => article.slug)}=image_tag(article.image_file.file.large.medium.url, :alt => "")