summaryrefslogtreecommitdiff
path: root/themes/ccc/templates/post_header.tmpl
diff options
context:
space:
mode:
Diffstat (limited to 'themes/ccc/templates/post_header.tmpl')
-rw-r--r--themes/ccc/templates/post_header.tmpl59
1 files changed, 59 insertions, 0 deletions
diff --git a/themes/ccc/templates/post_header.tmpl b/themes/ccc/templates/post_header.tmpl
new file mode 100644
index 00000000..f13ec488
--- /dev/null
+++ b/themes/ccc/templates/post_header.tmpl
@@ -0,0 +1,59 @@
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"><a href="${post.permalink()}" class="u-url">${post.title()|h}</a></h1>
8%endif
9</%def>
10
11<%def name="html_translations(post)">
12 % if len(post.translated_to) > 1:
13 % for langname in sorted(translations):
14 % if langname != lang and post.is_translation_available(langname):
15 <div class="posttranslation d-lg-none">
16 <a href="${post.permalink(langname)}" hreflang="${langname}" rel="alternate">${messages("Also available in:", langname)} ${messages("LANGUAGE", langname)}</a>
17 </div>
18 % endif
19 % endfor
20 % endif
21</%def>
22
23<%def name="html_sourcelink()">
24 % if show_sourcelink:
25 <p class="sourceline"><a href="${post.source_link()}" class="sourcelink">${messages("Source")}</a></p>
26 % endif
27</%def>
28
29<%def name="html_post_header()">
30 <header>
31 ${html_title()}
32 <div class="metadata">
33 <p class="byline author vcard p-author h-card"><span class="byline-name fn p-name" itemprop="author">
34 % if author_pages_generated:
35 <a class="u-url" href="${_link('author', post.author())}">${post.author()|h}</a>
36 % else:
37 ${post.author()|h}
38 % endif
39 </span></p>
40 <p class="dateline">
41 <a href="${post.permalink()}" rel="bookmark">
42 <time class="published dt-published" datetime="${post.formatted_date('webiso')}" itemprop="datePublished" title="${post.formatted_date(date_format)|h}">${post.formatted_date(date_format)|h}</time>
43 % if post.updated and post.updated != post.date:
44 <span class="updated"> (${messages("updated")}
45 <time class="updated dt-updated" datetime="${post.formatted_updated('webiso')}" itemprop="dateUpdated" title="${post.formatted_updated(date_format)|h}">${post.formatted_updated(date_format)|h}</time>)</span>
46 % endif
47 </a>
48 </p>
49 % if not post.meta('nocomments') and site_has_comments:
50 <p class="commentline">${comments.comment_link(post.permalink(), post._base_path)}
51 % endif
52 ${html_sourcelink()}
53 % if post.meta('link'):
54 <p class="linkline"><a href="${post.meta('link')}">${messages("Original site")}</a></p>
55 % endif
56 </div>
57 ${html_translations(post)}
58 </header>
59</%def>