ruby-x.github.io/app/views/blog/index.haml

13 lines
334 B
Plaintext
Raw Normal View History

2018-04-11 18:34:35 +02:00
.blog_index
2018-04-10 21:48:23 +02:00
- @posts.each do |slug , post|
2018-04-11 16:32:38 +02:00
%h2
2018-04-11 18:34:35 +02:00
= link_to post.title.capitalize , blog_post_url(post.slug)
2018-04-11 16:32:38 +02:00
%span
(
=post.date
)
%div
= render( "posts/#{post.template_name}" )[0 ... 350].html_safe
%span.whole= link_to ". . . .Read whole post" , blog_post_url(post.slug)
%hr