extends ../layout

block content
  if posts.length > 0
    each post in posts
      article.post
        header.post-header
          h1.post-title
            a(href="/blog/post/#{post._id}")=post.title
          span.post-date=moment(post.date).format('DD MMMM YYYY')
          section.post-content!=post.content

          hr
          p by #{post._author.profile.name}
          hr
  else
    article.post
    header.post-header
      h1.post-title No posts
      p login to the #[a(href="/admin") admin] and make some articles

