You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
1.0 KiB

mixin renderBlogPostListItem (post, postIndex = 1, postIndexModulus = 3)
a(href=`/post/${post.slug}`).uk-display-block.uk-link-reset
div(uk-grid).uk-grid-small
div(class='uk-visible@m', class={
'uk-flex-first': ((postIndex % postIndexModulus) === 0),
'uk-flex-last': ((postIndex % postIndexModulus) !== 0),
}).uk-width-1-3
if post.image
img(src= `/image/${post.image._id}`).responsive
else
img(src="/img/default-poster.jpg").responsive
div(class='uk-width-1-1 uk-width-2-3@m', class={
'uk-flex-first': ((postIndex % postIndexModulus) !== 0),
'uk-flex-last': ((postIndex % postIndexModulus) === 0),
})
article.uk-article
h4(style="line-height: 1.1;").uk-article-title.uk-margin-small= post.title
.uk-article-meta
if post.updated
span updated: #{moment(post.updated).format("MMM DD YYYY HH:MM a")}
else
span published: #{moment(post.created).format("MMM DD YYYY HH:MM a")}