summaryrefslogtreecommitdiff
path: root/themes/ccc/templates
diff options
context:
space:
mode:
Diffstat (limited to 'themes/ccc/templates')
-rw-r--r--themes/ccc/templates/base.tmpl74
-rw-r--r--themes/ccc/templates/front-featured-large.tmpl33
-rw-r--r--themes/ccc/templates/front-featured-nav-small.tmpl15
-rw-r--r--themes/ccc/templates/front-featured-small.tmpl19
-rw-r--r--themes/ccc/templates/front.tmpl15
-rw-r--r--themes/ccc/templates/post-list-front-erfas.tmpl28
-rw-r--r--themes/ccc/templates/post-list-front-updates.tmpl25
-rw-r--r--themes/ccc/templates/post.tmpl58
-rw-r--r--themes/ccc/templates/post_header.tmpl59
-rw-r--r--themes/ccc/templates/static_footer.tmpl16
-rw-r--r--themes/ccc/templates/static_navigation.tmpl21
11 files changed, 363 insertions, 0 deletions
diff --git a/themes/ccc/templates/base.tmpl b/themes/ccc/templates/base.tmpl
new file mode 100644
index 00000000..1a98780b
--- /dev/null
+++ b/themes/ccc/templates/base.tmpl
@@ -0,0 +1,74 @@
1## -*- coding: utf-8 -*-
2<%namespace name="base" file="base_helper.tmpl" import="*" />
3<%namespace name="notes" file="annotation_helper.tmpl" import="*" />
4<%namespace name="static_footer" file="static_footer.tmpl" import="*" />
5${set_locale(lang)}
6${base.html_headstart()}
7<%block name="extra_head">
8### Leave this block alone.
9</%block>
10${template_hooks['extra_head']()}
11</head>
12<body>
13<a href="#content" class="sr-only sr-only-focusable">${messages("Skip to main content")}</a>
14
15<!-- Menubar -->
16
17<nav class="navbar navbar-expand-md static-top mb-4
18% if theme_config.get('navbar_light'):
19navbar-light bg-light
20% else:
21navbar-dark bg-dark
22% endif
23">
24 <div class="container"><!-- This keeps the margins nice -->
25 <a class="navbar-brand" href="${abs_link(_link("root", None, lang))}">
26 %if logo_url:
27 <img src="${logo_url}" alt="${blog_title|h}" id="logo" class="d-inline-block align-top">
28 %endif
29
30 % if show_blog_title:
31 <span id="blog-title">${blog_title|h}</span>
32 % endif
33 </a>
34 %if search_form:
35 ${search_form}
36 %endif
37 </div><!-- /.container -->
38</nav>
39
40<!-- End of Menubar -->
41
42<div class="container" id="content" role="main">
43 <div class="body-content">
44 <!--Body content-->
45 ${template_hooks['page_header']()}
46 <%block name="extra_header"></%block>
47 <%block name="content"></%block>
48 <!--End of body content-->
49
50 ${static_footer.static_footer()}
51 </div>
52</div>
53
54${base.late_load_js()}
55 %if date_fanciness != 0:
56 <!-- fancy dates -->
57 <script>
58 moment.locale("${momentjs_locales[lang]}");
59 fancydates(${date_fanciness}, ${js_date_format});
60 </script>
61 <!-- end fancy dates -->
62 %endif
63 <%block name="extra_js"></%block>
64 <script>
65 baguetteBox.run('div#content', {
66 ignoreClass: 'islink',
67 captions: function(element) {
68 return element.getElementsByTagName('img')[0].alt;
69 }});
70 </script>
71${body_end}
72${template_hooks['body_end']()}
73</body>
74</html>
diff --git a/themes/ccc/templates/front-featured-large.tmpl b/themes/ccc/templates/front-featured-large.tmpl
new file mode 100644
index 00000000..320f2e31
--- /dev/null
+++ b/themes/ccc/templates/front-featured-large.tmpl
@@ -0,0 +1,33 @@
1## -*- coding: utf-8 -*-
2<%block name="content">
3
4<div class="carousel slide d-lg-none" style="height: 10rem;" data-ride="carousel" data-interval="3000">
5 <div class="carousel-inner">
6 % for post in posts:
7 <div class="carousel-item ${'active' if loop.index == 0 else ''}">
8 <a href="${post.permalink()}">
9 <img class="d-block img-fluid w-100" src="${post.meta('previewimage')}" alt="large carousel slide" style="height: 160px; object-fit: cover;">
10 <div class="carousel-caption d-sm-block">
11 <h1 style="background: rgba(0, 0, 0, 0.75); display: inline; padding: 0.1em; margin: 0;">${post.meta('previewtext', lang) or post.title(lang)}</h1>
12 </div>
13 </a>
14 </div>
15 % endfor
16 </div>
17</div>
18<div class="row d-none d-lg-flex">
19 % for post in posts:
20 <div class="col-6 col-sm-4">
21 <div class="card text-white bg-light shadow-sm">
22 <div class="card-body">
23 <img class="card-img-top" style="width: 100%; height: 160px; object-fit: cover;" src="${post.meta('previewimage')}" alt="CCC logo">
24 <div class="card-img-overlay d-flex flex-column justify-content-end">
25 <h1 style="background: rgba(0, 0, 0, 0.75); display: inline; padding: 0.1em; margin: 0;" class="card-title">${post.meta('previewtext', lang) or post.title(lang)}</h1>
26 </div>
27 </div>
28 <a href="${post.permalink()}" class="stretched-link"></a>
29 </div>
30 </div>
31 % endfor
32</div>
33</%block>
diff --git a/themes/ccc/templates/front-featured-nav-small.tmpl b/themes/ccc/templates/front-featured-nav-small.tmpl
new file mode 100644
index 00000000..cb25fd73
--- /dev/null
+++ b/themes/ccc/templates/front-featured-nav-small.tmpl
@@ -0,0 +1,15 @@
1## -*- coding: utf-8 -*-
2<%block name="content">
3
4<div class="nav bg-light p-2 my-3 text-white shadow-sm d-none d-lg-block">
5 % for post in posts:
6 <div class="card mb-3">
7 <img class="card-img-top" style="width: 100%; height: 120px; object-fit: cover;" src=${post.meta('previewimage')}"/>
8 <div class="card-img-overlay d-flex flex-column justify-content-end">
9 <h2 style="background: rgba(0, 0, 0, 0.75); display: inline; padding: 0.1em; margin: 0;" class="card-title">${post.title(lang)}</h2>
10 </div>
11 <a href="${post.permalink()}" class="stretched-link"></a>
12 </div>
13 % endfor
14</div>
15</%block>
diff --git a/themes/ccc/templates/front-featured-small.tmpl b/themes/ccc/templates/front-featured-small.tmpl
new file mode 100644
index 00000000..e75b9146
--- /dev/null
+++ b/themes/ccc/templates/front-featured-small.tmpl
@@ -0,0 +1,19 @@
1## -*- coding: utf-8 -*-
2<%block name="content">
3
4<div class="row my-3 bg-light text-white shadow-sm d-lg-none">
5
6 % for post in posts:
7 <div class="col-12 col-md-4 col-lg-3 my-3">
8 <div class="card">
9 <img class="card-img-top" style="width: 100%; height: 120px; object-fit: cover;" src=${post.meta('previewimage')}"/>
10 <div class="card-img-overlay d-flex flex-column justify-content-end">
11 <h3 style="background: rgba(0, 0, 0, 0.75); display: inline; padding: 0.1em; margin: 0;" class="card-title">${post.title(lang)}</h3>
12 </div>
13 <a href="${post.permalink()}" class="stretched-link"></a>
14 </div>
15 </div>
16% endfor
17
18</div>
19</%block>
diff --git a/themes/ccc/templates/front.tmpl b/themes/ccc/templates/front.tmpl
new file mode 100644
index 00000000..cb5b219e
--- /dev/null
+++ b/themes/ccc/templates/front.tmpl
@@ -0,0 +1,15 @@
1## -*- coding: utf-8 -*-
2<%namespace name="helper" file="post_helper.tmpl"/>
3<%namespace name="pheader" file="post_header.tmpl"/>
4<%namespace name="comments" file="comments_helper.tmpl"/>
5<%namespace name="math" file="math_helper.tmpl"/>
6<%inherit file="post.tmpl"/>
7
8<%block name="content">
9<article class="post-${post.meta('type')} storypage" itemscope="itemscope" itemtype="http://schema.org/Article">
10 <div class="e-content entry-content" itemprop="articleBody text">
11 ${post.text()}
12 </div>
13 ${math.math_scripts_ifpost(post)}
14</article>
15</%block>
diff --git a/themes/ccc/templates/post-list-front-erfas.tmpl b/themes/ccc/templates/post-list-front-erfas.tmpl
new file mode 100644
index 00000000..56690ff0
--- /dev/null
+++ b/themes/ccc/templates/post-list-front-erfas.tmpl
@@ -0,0 +1,28 @@
1## -*- coding: utf-8 -*-
2<%block name="content">
3<!-- Begin post-list ${post_list_id} -->
4
5<div id="${post_list_id}" class="post-list bg-light p-8 my-3 col-12 border border-light rounded shadow-sm">
6 <h1 class="section-heading">Aus den Erfas</h1>
7 % for post in posts:
8 <div class="post-list-item row">
9 <div class="col-12 p-0">
10 <a class="stretched-link" href="${post.permalink()}">
11 %if post.meta('previewimage'):
12 <img class="col-12 col-md-4 mb-3 img-responsive float-left post-list-preview" alt="preview" src="${post.meta('previewimage')}" style="object-position: ${post.meta('previewimage-position') or '50% 50%'}"/>
13 %endif
14 <div class="post-list-headline col-12">
15 <div class="post-title">${post.title(lang)}</div>
16 <div class="post-date">${post.formatted_date(date_format)}</div>
17 </div>
18 </a>
19 <div class="post-body col-12" id="post-body-${loop.index}">
20 ${ post.text( teaser_only = True, show_read_more_link = False, strip_html = True) }
21 </div>
22 </div>
23 </div>
24 % endfor
25 <div class="more-erfa-content"><a href="${_link('category', 'cpu', lang)}">Mehr aus den Erfas</a></div>
26</div>
27<!-- End post-list ${post_list_id} -->
28</%block>
diff --git a/themes/ccc/templates/post-list-front-updates.tmpl b/themes/ccc/templates/post-list-front-updates.tmpl
new file mode 100644
index 00000000..0c529dac
--- /dev/null
+++ b/themes/ccc/templates/post-list-front-updates.tmpl
@@ -0,0 +1,25 @@
1## -*- coding: utf-8 -*-
2<%block name="content">
3<!-- Begin post-list ${post_list_id} -->
4
5% for post in posts:
6<div class="post-list-item row">
7 <div class="col-12 p-0">
8 <a class="stretched-link" href="${post.permalink()}">
9 %if post.meta('previewimage'):
10 <img class="col-12 col-md-4 mb-3 img-responsive float-left post-list-preview" alt="preview" src="${post.meta('previewimage')}" style="object-position: ${post.meta('previewimage-position') or '50% 50%'}"/>
11
12 %endif
13 <div class="post-list-headline col-12">
14 <div class="post-title">${post.title(lang)}</div>
15 <div class="post-date">${post.formatted_date(date_format)} – ${post.author()|h}</div>
16 </div>
17 </a>
18 <div class="post-body col-12" id="post-body-${loop.index}">
19 ${ post.text( teaser_only = True, show_read_more_link = False) }
20 </div>
21 </div>
22</div>
23% endfor
24<!-- End post-list ${post_list_id} -->
25</%block>
diff --git a/themes/ccc/templates/post.tmpl b/themes/ccc/templates/post.tmpl
new file mode 100644
index 00000000..7abffb9d
--- /dev/null
+++ b/themes/ccc/templates/post.tmpl
@@ -0,0 +1,58 @@
1## -*- coding: utf-8 -*-
2<%namespace name="helper" file="post_helper.tmpl"/>
3<%namespace name="pheader" file="post_header.tmpl"/>
4<%namespace name="comments" file="comments_helper.tmpl"/>
5<%namespace name="math" file="math_helper.tmpl"/>
6<%namespace name="statnav" file="static_navigation.tmpl"/>
7<%inherit file="base.tmpl"/>
8
9<%block name="extra_head">
10 ${parent.extra_head()}
11 % if post.meta('keywords'):
12 <meta name="keywords" content="${smartjoin(', ', post.meta('keywords'))|h}">
13 % endif
14 <meta name="author" content="${post.author()|h}">
15 %if post.prev_post:
16 <link rel="prev" href="${post.prev_post.permalink()}" title="${post.prev_post.title()|h}" type="text/html">
17 %endif
18 %if post.next_post:
19 <link rel="next" href="${post.next_post.permalink()}" title="${post.next_post.title()|h}" type="text/html">
20 %endif
21 % if post.is_draft:
22 <meta name="robots" content="noindex">
23 % endif
24 ${helper.open_graph_metadata(post)}
25 ${helper.twitter_card_information(post)}
26 ${helper.meta_translations(post)}
27 ${math.math_styles_ifpost(post)}
28</%block>
29
30<%block name="content">
31<div class="row frontend-content mt-3">
32 <div class="col-lg-9 blog-main">
33 % if post.meta('previewimage'):
34 <img class="col-12 p-0 mb-3 post-preview img-responsive" src="${post.meta('previewimage')}" alt="preview-img" style="object-fit: cover; object-position: ${post.meta('previewimage-position') or '50% 50%' }" />
35 % endif
36 <article class="post-${post.meta('type')} h-entry hentry postpage" itemscope="itemscope" itemtype="http://schema.org/Article">
37 ${pheader.html_post_header()}
38 <div class="e-content entry-content" itemprop="articleBody text">
39 ${post.text()}
40 </div>
41 ${math.math_scripts_ifpost(post)}
42 </article>
43 </div>
44 <aside class="col-12 col-lg-3 sidebar">
45 ${statnav.static_navigation()}
46 %if post.tags:
47 <ul itemprop="keywords" class="nav flex-column bg-light mt-4 shadow-sm">
48 <h4 class="pull-left">Tagged as:</h4>
49 %for tag in post.tags:
50 % if tag not in hidden_tags:
51 <li class="nav-item"><a class="nav-link" href="${_link('tag', tag)}" rel="tag">${tag|h}</a></li>
52 % endif
53 %endfor
54 </ul>
55 %endif
56 </aside>
57</div>
58</%block>
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>
diff --git a/themes/ccc/templates/static_footer.tmpl b/themes/ccc/templates/static_footer.tmpl
new file mode 100644
index 00000000..b99dfae1
--- /dev/null
+++ b/themes/ccc/templates/static_footer.tmpl
@@ -0,0 +1,16 @@
1## -*- coding: utf-8 -*-
2
3<%block name="static_footer">
4% if global_data.get('footer'):
5<footer id="footer" class="container-fluid text-muted bg-light shadow-sm mt-3 py-2">
6 <div class="row justify-content-center text-center">
7 % for item in global_data['footer']:
8 <div class="col">
9 <a href="${item.get('url','#')}">${item.get('title',u'error')}</a>
10 </div>
11 % endfor
12 </div>
13 ${template_hooks['page_footer']()}
14</footer>
15% endif
16</%block>
diff --git a/themes/ccc/templates/static_navigation.tmpl b/themes/ccc/templates/static_navigation.tmpl
new file mode 100644
index 00000000..e0bb4945
--- /dev/null
+++ b/themes/ccc/templates/static_navigation.tmpl
@@ -0,0 +1,21 @@
1## -*- coding: utf-8 -*-
2
3<%block name="static_navigation">
4% if global_data.get('navigation'):
5<ul class="nav flex-column bg-light mt-4 shadow-sm">
6 % for langname in sorted(translations):
7 % if langname != lang and post.is_translation_available(langname):
8 <li class="nav-item">
9 <a class ="nav-link" href="${post.permalink(langname)}" rel="alternate" hreflang="${langname}">${messages("LANGUAGE", langname)}</a>
10 </li>
11 % endif
12 % endfor
13
14 % for nav in global_data['navigation']:
15 <li class="nav-item">
16 <a class="nav-link" href="${nav.get('url','#')}">${nav.get('title',u'error')}</a>
17 </li>
18 % endfor
19</ul>
20% endif
21</%block>