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

post_header.tmpl 2.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. ## -*- coding: utf-8 -*-
  2. <%namespace name="helper" file="post_helper.tmpl"/>
  3. <%namespace name="comments" file="comments_helper.tmpl"/>
  4. <%def name="html_title()">
  5. %if title and not post.meta('hidetitle'):
  6. <h2 class="p-name entry-title blog-post-title" itemprop="headline name"><a href="${post.permalink()}" class="u-url">${post.title()|h}</a></h2>
  7. %endif
  8. </%def>
  9. <%def name="html_translations(post)">
  10. % if len(post.translated_to) > 1:
  11. <div class="metadata posttranslations translations">
  12. <h3 class="posttranslations-intro">${messages("Also available in:")}</h3>
  13. % for langname in translations.keys():
  14. % if langname != lang and post.is_translation_available(langname):
  15. <p><a href="${post.permalink(langname)}" rel="alternate" hreflang="${langname}">${messages("LANGUAGE", langname)}</a></p>
  16. % endif
  17. % endfor
  18. </div>
  19. % endif
  20. </%def>
  21. <%def name="html_sourcelink()">
  22. % if show_sourcelink:
  23. <p class="sourceline"><a href="${post.source_link()}" id="sourcelink">${messages("Source")}</a></p>
  24. % endif
  25. </%def>
  26. <%def name="html_post_header()">
  27. <header>
  28. ${html_title()}
  29. <div class="metadata blog-post-meta">
  30. <p class="byline author vcard"><span class="byline-name fn">${post.author()}</span></p>
  31. <p class="dateline"><a href="${post.permalink()}" rel="bookmark"><time class="published dt-published" datetime="${post.date.isoformat()}" itemprop="datePublished" title="${post.formatted_date(date_format)}">${post.formatted_date(date_format)}</time></a></p>
  32. % if not post.meta('nocomments') and site_has_comments:
  33. <p class="commentline">${comments.comment_link(post.permalink(), post._base_path)}
  34. % endif
  35. ${html_sourcelink()}
  36. % if post.meta('link'):
  37. <p class="linkline"><a href='${post.meta('link')}'>${messages("Original site")}</a></p>
  38. % endif
  39. %if post.description():
  40. <meta name="description" itemprop="description" content="${post.description()}">
  41. %endif
  42. </div>
  43. ${html_translations(post)}
  44. </header>
  45. </%def>