A new Riff-radio.org site with a static approach.

index.tmpl 1.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. ## -*- coding: utf-8 -*-
  2. <%namespace name="helper" file="index_helper.tmpl"/>
  3. <%namespace name="comments" file="comments_helper.tmpl"/>
  4. <%namespace name="math" file="math_helper.tmpl"/>
  5. <%inherit file="base.tmpl"/>
  6. <%block name="extra_head">
  7. ${parent.extra_head()}
  8. % if posts and (permalink == '/' or permalink == '/' + index_file):
  9. <link rel="prefetch" href="${posts[0].permalink()}" type="text/html">
  10. % endif
  11. ${math.math_styles_ifposts(posts)}
  12. </%block>
  13. <%block name="content">
  14. <%block name="content_header"></%block>
  15. <div class="postindex">
  16. % for post in posts:
  17. <article class="blog-post h-entry post-${post.meta('type')}">
  18. <header>
  19. <h2 class="p-name entry-title blog-post-title"><a href="${post.permalink()}" class="u-url">${post.title()|h}</a></h2>
  20. <div class="metadata blog-post-meta text-justify">
  21. <p class="byline author vcard"><span class="byline-name fn">${post.author()}</span></p>
  22. <p class="dateline"><a href="${post.permalink()}" rel="bookmark"><time class="published dt-published" datetime="${post.date.isoformat()}" title="${post.formatted_date(date_format)}">${post.formatted_date(date_format)}</time></a></p>
  23. % if not post.meta('nocomments') and site_has_comments:
  24. <p class="commentline">${comments.comment_link(post.permalink(), post._base_path)}
  25. % endif
  26. </div>
  27. </header>
  28. %if index_teasers:
  29. <div class="p-summary entry-summary">
  30. ${post.text(teaser_only=True)}
  31. %else:
  32. <div class="e-content entry-content">
  33. ${post.text(teaser_only=False)}
  34. %endif
  35. </div>
  36. </article>
  37. % endfor
  38. </div>
  39. ${helper.html_pager()}
  40. ${comments.comment_link_script()}
  41. ${math.math_scripts_ifposts(posts)}
  42. </%block>