23 lines
1.0 KiB
Mako
23 lines
1.0 KiB
Mako
<%inherit file="/base.mako"/>
|
|
<%include file="/flash.mako"/>
|
|
% for post in c.posts:
|
|
<% post.full_url = u'/archive/%s/%s/%s/%s' % (post.created.strftime('%Y'), post.created.strftime('%m'), post.created.strftime('%d'), post.url) %>
|
|
<div class="post">
|
|
<h2 class="title"><a href="${post.full_url}">${post.title}</a></h2>
|
|
<div class="entry">
|
|
${h.literal(h.teaser(post.body, post.full_url))}
|
|
</div>
|
|
<p class="meta">
|
|
<span class="byline">Posted by ${post.user.nick} on ${post.created.strftime('%B %d, %Y')}</span>
|
|
<a href="${post.full_url}" class="read-more">Read more</a>
|
|
% if len(post.comments) == 0:
|
|
<a href="${post.full_url}#comments" class="comments">No comments</a>
|
|
% elif len(post.comments) == 1:
|
|
<a href="${post.full_url}#comments" class="comments">1 comment</a>
|
|
% else:
|
|
<a href="${post.full_url}#comments" class="comments">${len(post.comments)} comments</a>
|
|
% endif
|
|
</p>
|
|
</div>
|
|
% endfor
|