index.tmpl 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. ## -*- coding: utf-8 -*-
  2. <%namespace name="helper" file="index_helper.tmpl"/>
  3. <%namespace name="comments" file="comments_helper.tmpl"/>
  4. <%inherit file="base.tmpl"/>
  5. <%block name="content">
  6. <div class="postindex">
  7. % for post in posts:
  8. <article class="h-entry post-${post.meta('type')}">
  9. <header>
  10. <h1 class="p-name entry-title">
  11. <a href="${post.permalink()}" class="u-url">${post.title()}</a>
  12. </h1>
  13. </header>
  14. %if index_teasers:
  15. <div class="p-summary entry-summary">
  16. ${post.text(teaser_only=True)}
  17. %else:
  18. <div class="e-content entry-content">
  19. ${post.text(teaser_only=False)}
  20. %endif
  21. </div>
  22. <small class="dateline">Posted: <time class="published dt-published" datetime="${post.date.isoformat()}" title="${post.formatted_date(date_format)}">${post.formatted_date(date_format)}</time></small>
  23. % if not post.meta('nocomments') and site_has_comments:
  24. | <small class="commentline">${comments.comment_link(post.permalink(), post._base_path)}</small>
  25. % endif
  26. </article>
  27. % endfor
  28. </div>
  29. ${helper.html_pager()}
  30. ${comments.comment_link_script()}
  31. ${helper.mathjax_script(posts)}
  32. </%block>