scribeengine/scribeengine/templates/blog/tag.mako

23 lines
1003 B
Mako

<%inherit file="/base.mako"/>
<%include file="/flash.mako"/>
<h2 class="title">Blog posts with tag: ${c.tag.name}</h2>
% for post in c.tag.posts:
<div class="post">
<h3 class="title"><a href="${h.url_for_post(post)}">${post.title}</a></h3>
<div class="entry">
${h.literal(h.teaser(post.body))}
</div>
<p class="meta">
<span class="byline">Posted by ${post.user.nick} on ${post.created.strftime('%B %d, %Y')}</span>
<a href="${h.url_for_post(post)}" class="read-more">Read more</a>
% if len(post.comments) == 0:
<a href="${h.url_for_post(post)}#comments" class="comments">No comments</a>
% elif len(post.comments) == 1:
<a href="${h.url_for_post(post)}#comments" class="comments">1 comment</a>
% else:
<a href="${h.url_for_post(post)}#comments" class="comments">${len(post.comments)} comments</a>
% endif
</p>
</div>
% endfor