diff options
Diffstat (limited to 'themes/erdgeist/templates/post_header.tmpl')
| -rw-r--r-- | themes/erdgeist/templates/post_header.tmpl | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/themes/erdgeist/templates/post_header.tmpl b/themes/erdgeist/templates/post_header.tmpl new file mode 100644 index 0000000..456c207 --- /dev/null +++ b/themes/erdgeist/templates/post_header.tmpl | |||
| @@ -0,0 +1,53 @@ | |||
| 1 | ## -*- coding: utf-8 -*- | ||
| 2 | <%namespace name="helper" file="post_helper.tmpl"/> | ||
| 3 | <%namespace name="comments" file="comments_helper.tmpl"/> | ||
| 4 | |||
| 5 | <%def name="html_title()"> | ||
| 6 | %if title and not post.meta('hidetitle'): | ||
| 7 | <h1 class="p-name entry-title" itemprop="headline name">${post.title()|h} | ||
| 8 | % if post.meta('subtitle'): | ||
| 9 | – ${post.meta('subtitle')} | ||
| 10 | %endif | ||
| 11 | </h1> | ||
| 12 | %endif | ||
| 13 | </%def> | ||
| 14 | |||
| 15 | <%def name="html_translations(post)"> | ||
| 16 | % if len(post.translated_to) > 1: | ||
| 17 | <div class="metadata posttranslations translations"> | ||
| 18 | <h3 class="posttranslations-intro">${messages("Also available in:")}</h3> | ||
| 19 | % for langname in translations.keys(): | ||
| 20 | % if langname != lang and post.is_translation_available(langname): | ||
| 21 | <p><a href="${post.permalink(langname)}" rel="alternate" hreflang="${langname}">${messages("LANGUAGE", langname)}</a></p> | ||
| 22 | % endif | ||
| 23 | % endfor | ||
| 24 | </div> | ||
| 25 | % endif | ||
| 26 | </%def> | ||
| 27 | |||
| 28 | <%def name="html_sourcelink()"> | ||
| 29 | % if show_sourcelink: | ||
| 30 | <p class="sourceline"><a href="${post.source_link()}" id="sourcelink">${messages("Source")}</a></p> | ||
| 31 | % endif | ||
| 32 | </%def> | ||
| 33 | |||
| 34 | <%def name="html_post_header()"> | ||
| 35 | <header> | ||
| 36 | ${html_title()} | ||
| 37 | <div class="metadata"> | ||
| 38 | <p class="byline author vcard"><span class="byline-name fn">${post.author()}</span></p> | ||
| 39 | <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> | ||
| 40 | % if not post.meta('nocomments') and site_has_comments: | ||
| 41 | <p class="commentline">${comments.comment_link(post.permalink(), post._base_path)} | ||
| 42 | % endif | ||
| 43 | ${html_sourcelink()} | ||
| 44 | % if post.meta('link'): | ||
| 45 | <p><a href='${post.meta('link')}'>${messages("Original site")}</a></p> | ||
| 46 | % endif | ||
| 47 | %if post.description(): | ||
| 48 | <meta name="description" itemprop="description" content="${post.description()}"> | ||
| 49 | %endif | ||
| 50 | </div> | ||
| 51 | ${html_translations(post)} | ||
| 52 | </header> | ||
| 53 | </%def> | ||
