This repository has been archived on 2024-11-20. You can view files and clone it, but cannot push or open issues or pull requests.
old-scribeengine/scribeengine/templates/blog/index.mako
Raoul Snyman c0e74e19bb Added "logged in as" text to identify the current user.
Added pagination to the default post view.
Fixed a bug where the comments were being ordered incorrectly.
2010-01-31 15:45:20 +02:00

24 lines
1021 B
Mako

<%inherit file="/base.mako"/>
<%include file="/flash.mako"/>
<%include file="/pagination.mako"/>
% for post in c.posts:
<div class="post">
<h2 class="title"><a href="${h.url_for_post(post)}">${post.title}</a></h2>
<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
<%include file="/pagination.mako"/>