diff options
| author | erdgeist <erdgeist@bauklotz.local> | 2015-08-16 16:38:25 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@bauklotz.local> | 2015-08-16 16:38:25 +0200 |
| commit | 23f0e1561767dd8a396188e317bae5920d171ea8 (patch) | |
| tree | a67f44e39ad8a45e42d60634488a65c37f3ad432 /themes/erdgeist/templates | |
Initial import of my nikola website
Diffstat (limited to 'themes/erdgeist/templates')
| -rw-r--r-- | themes/erdgeist/templates/base.tmpl | 58 | ||||
| -rw-r--r-- | themes/erdgeist/templates/base_helper.tmpl | 168 | ||||
| -rw-r--r-- | themes/erdgeist/templates/index.tmpl | 35 | ||||
| -rw-r--r-- | themes/erdgeist/templates/index_helper.tmpl | 27 | ||||
| -rw-r--r-- | themes/erdgeist/templates/list_blogposts.tmpl | 41 | ||||
| -rw-r--r-- | themes/erdgeist/templates/list_poetry.tmpl | 16 | ||||
| -rw-r--r-- | themes/erdgeist/templates/list_projectnews.tmpl | 16 | ||||
| -rw-r--r-- | themes/erdgeist/templates/list_projects.tmpl | 16 | ||||
| -rw-r--r-- | themes/erdgeist/templates/post.tmpl | 51 | ||||
| -rw-r--r-- | themes/erdgeist/templates/post_header.tmpl | 53 |
10 files changed, 481 insertions, 0 deletions
diff --git a/themes/erdgeist/templates/base.tmpl b/themes/erdgeist/templates/base.tmpl new file mode 100644 index 0000000..3bdf48d --- /dev/null +++ b/themes/erdgeist/templates/base.tmpl | |||
| @@ -0,0 +1,58 @@ | |||
| 1 | ## -*- coding: utf-8 -*- | ||
| 2 | <%namespace name="base" file="base_helper.tmpl" import="*" /> | ||
| 3 | <%namespace name="notes" file="annotation_helper.tmpl" import="*" /> | ||
| 4 | ${set_locale(lang)} | ||
| 5 | ${base.html_headstart()} | ||
| 6 | <%block name="extra_head"> | ||
| 7 | ### Leave this block alone. | ||
| 8 | </%block> | ||
| 9 | ${template_hooks['extra_head']()} | ||
| 10 | </head> | ||
| 11 | <body> | ||
| 12 | <a href="#content" class="sr-only sr-only-focusable">${messages("Skip to main content")}</a> | ||
| 13 | |||
| 14 | <!-- Menubar --> | ||
| 15 | |||
| 16 | <nav class="navbar navbar-fixed-top" role="navigation"> | ||
| 17 | <div class="container"><!-- This keeps the margins nice --> | ||
| 18 | <ul class="nav navbar-nav"> | ||
| 19 | ${base.html_navigation_links()} | ||
| 20 | ${template_hooks['menu']()} | ||
| 21 | </ul> | ||
| 22 | %if search_form: | ||
| 23 | ${search_form} | ||
| 24 | %endif | ||
| 25 | |||
| 26 | </div><!-- /.container --> | ||
| 27 | </nav> | ||
| 28 | |||
| 29 | <!-- End of Menubar --> | ||
| 30 | |||
| 31 | <div class="container" id="content" role="main"> | ||
| 32 | <div class="body-content"> | ||
| 33 | <!--Body content--> | ||
| 34 | <div class="row"> | ||
| 35 | ${template_hooks['page_header']()} | ||
| 36 | <%block name="content"></%block> | ||
| 37 | </div> | ||
| 38 | <!--End of body content--> | ||
| 39 | |||
| 40 | <footer> | ||
| 41 | ${content_footer} | ||
| 42 | ${template_hooks['page_footer']()} | ||
| 43 | </footer> | ||
| 44 | </div> | ||
| 45 | </div> | ||
| 46 | |||
| 47 | ${base.late_load_js()} | ||
| 48 | <!--script>$('a.image-reference:not(.islink)').colorbox({rel:"gal",maxWidth:"100%",maxHeight:"100%",scalePhotos:true});</script --> | ||
| 49 | <%block name="extra_js"></%block> | ||
| 50 | % if annotations and post and not post.meta('noannotations'): | ||
| 51 | ${notes.code()} | ||
| 52 | % elif not annotations and post and post.meta('annotations'): | ||
| 53 | ${notes.code()} | ||
| 54 | % endif | ||
| 55 | ${body_end} | ||
| 56 | ${template_hooks['body_end']()} | ||
| 57 | </body> | ||
| 58 | </html> | ||
diff --git a/themes/erdgeist/templates/base_helper.tmpl b/themes/erdgeist/templates/base_helper.tmpl new file mode 100644 index 0000000..bec4b78 --- /dev/null +++ b/themes/erdgeist/templates/base_helper.tmpl | |||
| @@ -0,0 +1,168 @@ | |||
| 1 | ## -*- coding: utf-8 -*- | ||
| 2 | |||
| 3 | <%namespace name="notes" file="annotation_helper.tmpl" import="*" /> | ||
| 4 | <%def name="html_headstart()"> | ||
| 5 | <!DOCTYPE html> | ||
| 6 | <html | ||
| 7 | \ | ||
| 8 | % if use_open_graph or (twitter_card and twitter_card['use_twitter_cards']) or (comment_system == 'facebook'): | ||
| 9 | prefix='\ | ||
| 10 | %if use_open_graph or (twitter_card and twitter_card['use_twitter_cards']): | ||
| 11 | og: http://ogp.me/ns# \ | ||
| 12 | %endif | ||
| 13 | %if use_open_graph: | ||
| 14 | article: http://ogp.me/ns/article# \ | ||
| 15 | %endif | ||
| 16 | %if comment_system == 'facebook': | ||
| 17 | fb: http://ogp.me/ns/fb# \ | ||
| 18 | %endif | ||
| 19 | '\ | ||
| 20 | %endif | ||
| 21 | \ | ||
| 22 | % if is_rtl: | ||
| 23 | dir="rtl" \ | ||
| 24 | % endif | ||
| 25 | \ | ||
| 26 | lang="${lang}"> | ||
| 27 | <head> | ||
| 28 | <meta charset="utf-8"> | ||
| 29 | %if description: | ||
| 30 | <meta name="description" content="${description}"> | ||
| 31 | %endif | ||
| 32 | <meta name="viewport" content="width=device-width, initial-scale=1"> | ||
| 33 | <title>${title|striphtml} | ${blog_title|striphtml}</title> | ||
| 34 | |||
| 35 | ${html_stylesheets()} | ||
| 36 | ${html_feedlinks()} | ||
| 37 | %if permalink: | ||
| 38 | <link rel="canonical" href="${abs_link(permalink)}"> | ||
| 39 | %endif | ||
| 40 | |||
| 41 | %if favicons: | ||
| 42 | %for name, file, size in favicons: | ||
| 43 | <link rel="${name}" href="${file}" sizes="${size}"/> | ||
| 44 | %endfor | ||
| 45 | %endif | ||
| 46 | |||
| 47 | % if comment_system == 'facebook': | ||
| 48 | <meta property="fb:app_id" content="${comment_system_id}"> | ||
| 49 | % endif | ||
| 50 | |||
| 51 | %if prevlink: | ||
| 52 | <link rel="prev" href="${prevlink}" type="text/html"> | ||
| 53 | %endif | ||
| 54 | %if nextlink: | ||
| 55 | <link rel="next" href="${nextlink}" type="text/html"> | ||
| 56 | %endif | ||
| 57 | |||
| 58 | ${mathjax_config} | ||
| 59 | %if use_cdn: | ||
| 60 | <!--[if lt IE 9]><script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]--> | ||
| 61 | %else: | ||
| 62 | <!--[if lt IE 9]><script src="${url_replacer(permalink, '/assets/js/html5.js', lang)}"></script><![endif]--> | ||
| 63 | %endif | ||
| 64 | |||
| 65 | ${extra_head_data} | ||
| 66 | </%def> | ||
| 67 | |||
| 68 | <%def name="late_load_js()"> | ||
| 69 | %if use_bundles: | ||
| 70 | %if use_cdn: | ||
| 71 | <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> | ||
| 72 | <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script> | ||
| 73 | <script src="/assets/js/all.js"></script> | ||
| 74 | %else: | ||
| 75 | <!--script src="/assets/js/all-nocdn.js"></script--> | ||
| 76 | %endif | ||
| 77 | %else: | ||
| 78 | %if use_cdn: | ||
| 79 | <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> | ||
| 80 | <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script> | ||
| 81 | %else: | ||
| 82 | <script src="/assets/js/jquery.min.js"></script> | ||
| 83 | <script src="/assets/js/bootstrap.min.js"></script> | ||
| 84 | <script src="/assets/js/moment-with-locales.min.js"></script> | ||
| 85 | <script src="/assets/js/fancydates.js"></script> | ||
| 86 | %endif | ||
| 87 | <script src="/assets/js/jquery.colorbox-min.js"></script> | ||
| 88 | %endif | ||
| 89 | %if colorbox_locales[lang]: | ||
| 90 | <script src="/assets/js/colorbox-i18n/jquery.colorbox-${colorbox_locales[lang]}.js"></script> | ||
| 91 | %endif | ||
| 92 | ${social_buttons_code} | ||
| 93 | </%def> | ||
| 94 | |||
| 95 | |||
| 96 | <%def name="html_stylesheets()"> | ||
| 97 | %if use_bundles: | ||
| 98 | %if use_cdn: | ||
| 99 | <link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css" rel="stylesheet"> | ||
| 100 | <link href="/assets/css/all.css" rel="stylesheet" type="text/css"> | ||
| 101 | %else: | ||
| 102 | <link href="/assets/css/all-nocdn.css" rel="stylesheet" type="text/css"> | ||
| 103 | %endif | ||
| 104 | %else: | ||
| 105 | %if use_cdn: | ||
| 106 | <link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css" rel="stylesheet"> | ||
| 107 | %else: | ||
| 108 | <link href="/assets/css/bootstrap.min.css" rel="stylesheet" type="text/css"> | ||
| 109 | %endif | ||
| 110 | <link href="/assets/css/rst.css" rel="stylesheet" type="text/css"> | ||
| 111 | <link href="/assets/css/code.css" rel="stylesheet" type="text/css"> | ||
| 112 | <link href="/assets/css/colorbox.css" rel="stylesheet" type="text/css"> | ||
| 113 | <link href="/assets/css/theme.css" rel="stylesheet" type="text/css"> | ||
| 114 | %if has_custom_css: | ||
| 115 | <link href="/assets/css/custom.css" rel="stylesheet" type="text/css"> | ||
| 116 | %endif | ||
| 117 | %endif | ||
| 118 | % if annotations and post and not post.meta('noannotations'): | ||
| 119 | ${notes.css()} | ||
| 120 | % elif not annotations and post and post.meta('annotations'): | ||
| 121 | ${notes.css()} | ||
| 122 | % endif | ||
| 123 | </%def> | ||
| 124 | |||
| 125 | <%def name="html_navigation_links()"> | ||
| 126 | %for url, text, icon in navigation_links[lang]: | ||
| 127 | % if isinstance(url, tuple): | ||
| 128 | <li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">${text}<b class="caret"></b></a> | ||
| 129 | <ul class="dropdown-menu"> | ||
| 130 | %for suburl, text in url: | ||
| 131 | % if rel_link(permalink, suburl) == "#": | ||
| 132 | <li class="active"><a href="${permalink}" title="${text}"><i class="${icon}"></i></a> | ||
| 133 | %else: | ||
| 134 | <li><a href="${suburl}" title="${text}"><i class="${icon}"></i></a> | ||
| 135 | %endif | ||
| 136 | %endfor | ||
| 137 | </ul> | ||
| 138 | % else: | ||
| 139 | % if rel_link(permalink, url) == "#": | ||
| 140 | <li class="active"><a href="${permalink}" title="${text}"><i class="${icon}"></i></a> | ||
| 141 | %else: | ||
| 142 | <li><a href="${url}" title="${text}"><i class="${icon}"></i></a> | ||
| 143 | %endif | ||
| 144 | % endif | ||
| 145 | %endfor | ||
| 146 | </%def> | ||
| 147 | |||
| 148 | <%def name="html_feedlinks()"> | ||
| 149 | %if rss_link: | ||
| 150 | ${rss_link} | ||
| 151 | %elif generate_rss: | ||
| 152 | %if len(translations) > 1: | ||
| 153 | %for language in translations: | ||
| 154 | <link rel="alternate" type="application/rss+xml" title="RSS (${language})" href="${_link('rss', None, language)}"> | ||
| 155 | %endfor | ||
| 156 | %else: | ||
| 157 | <link rel="alternate" type="application/rss+xml" title="RSS" href="${_link('rss', None)}"> | ||
| 158 | %endif | ||
| 159 | %endif | ||
| 160 | </%def> | ||
| 161 | |||
| 162 | <%def name="html_translations()"> | ||
| 163 | %for langname in translations.keys(): | ||
| 164 | %if langname != lang: | ||
| 165 | <li><a href="${abs_link(_link("root", None, langname))}" rel="alternate" hreflang="${langname}">${messages("LANGUAGE", langname)}</a></li> | ||
| 166 | %endif | ||
| 167 | %endfor | ||
| 168 | </%def> | ||
diff --git a/themes/erdgeist/templates/index.tmpl b/themes/erdgeist/templates/index.tmpl new file mode 100644 index 0000000..81340dd --- /dev/null +++ b/themes/erdgeist/templates/index.tmpl | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | ## -*- coding: utf-8 -*- | ||
| 2 | <%namespace name="helper" file="index_helper.tmpl"/> | ||
| 3 | <%namespace name="comments" file="comments_helper.tmpl"/> | ||
| 4 | <%inherit file="base.tmpl"/> | ||
| 5 | |||
| 6 | <%block name="content"> | ||
| 7 | ${helper.html_pager()} | ||
| 8 | <div class="col-md-9 col-lg-7 col-sm-12 postindex"> | ||
| 9 | % for post in posts: | ||
| 10 | <article class="h-entry post-${post.meta('type')}"> | ||
| 11 | <header> | ||
| 12 | <h1 class="p-name entry-title"><a href="${post.permalink()}" class="u-url">${post.title()|h}</a></h1> | ||
| 13 | <div class="metadata"> | ||
| 14 | <p class="byline author vcard"><span class="byline-name fn">${post.author()}</span></p> | ||
| 15 | <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> | ||
| 16 | % if not post.meta('nocomments') and site_has_comments: | ||
| 17 | <p class="commentline">${comments.comment_link(post.permalink(), post._base_path)} | ||
| 18 | % endif | ||
| 19 | </div> | ||
| 20 | </header> | ||
| 21 | %if index_teasers: | ||
| 22 | <div class="p-summary entry-summary"> | ||
| 23 | ${post.text(teaser_only=True)} | ||
| 24 | %else: | ||
| 25 | <div class="e-content entry-content"> | ||
| 26 | ${post.text(teaser_only=False)} | ||
| 27 | %endif | ||
| 28 | </div> | ||
| 29 | </article> | ||
| 30 | % endfor | ||
| 31 | </div> | ||
| 32 | ${helper.html_pager()} | ||
| 33 | ${comments.comment_link_script()} | ||
| 34 | ${helper.mathjax_script(posts)} | ||
| 35 | </%block> | ||
diff --git a/themes/erdgeist/templates/index_helper.tmpl b/themes/erdgeist/templates/index_helper.tmpl new file mode 100644 index 0000000..9331b93 --- /dev/null +++ b/themes/erdgeist/templates/index_helper.tmpl | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | ## -*- coding: utf-8 -*- | ||
| 2 | <%def name="html_pager()"> | ||
| 3 | %if prevlink or nextlink: | ||
| 4 | <nav class="postindexpager"> | ||
| 5 | <ul class="pager"> | ||
| 6 | %if prevlink: | ||
| 7 | <li class="previous"> | ||
| 8 | <a href="${prevlink}" rel="prev">${messages("Newer posts")}</a> | ||
| 9 | </li> | ||
| 10 | %endif | ||
| 11 | %if nextlink: | ||
| 12 | <li class="next"> | ||
| 13 | <a href="${nextlink}" rel="next">${messages("Older posts")}</a> | ||
| 14 | </li> | ||
| 15 | %endif | ||
| 16 | </ul> | ||
| 17 | </nav> | ||
| 18 | %endif | ||
| 19 | </%def> | ||
| 20 | |||
| 21 | <%def name="mathjax_script(posts)"> | ||
| 22 | %if any(post.is_mathjax for post in posts): | ||
| 23 | <script type="text/x-mathjax-config"> | ||
| 24 | MathJax.Hub.Config({tex2jax: {inlineMath: [['$latex ','$'], ['\\(','\\)']]}});</script> | ||
| 25 | <script src="/assets/js/mathjax.js"></script> | ||
| 26 | %endif | ||
| 27 | </%def> | ||
diff --git a/themes/erdgeist/templates/list_blogposts.tmpl b/themes/erdgeist/templates/list_blogposts.tmpl new file mode 100644 index 0000000..093d520 --- /dev/null +++ b/themes/erdgeist/templates/list_blogposts.tmpl | |||
| @@ -0,0 +1,41 @@ | |||
| 1 | ## -*- coding: utf-8 -*- | ||
| 2 | <%block name="content"> | ||
| 3 | <!-- Begin post-list ${post_list_id} --> | ||
| 4 | |||
| 5 | <script> | ||
| 6 | function toggleClass(id) { | ||
| 7 | var node = document.getElementById("post-body-"+id); | ||
| 8 | var node2 = document.getElementById("showfull-"+id); | ||
| 9 | var nc = node.className.replace(/ full$/, ''); | ||
| 10 | if( node.className != nc ) { | ||
| 11 | node.className = nc; | ||
| 12 | node2.className="glyphicon glyphicon-chevron-up"; | ||
| 13 | } else { | ||
| 14 | node.className += ' full'; | ||
| 15 | node2.className="glyphicon glyphicon-chevron-down"; | ||
| 16 | } | ||
| 17 | } | ||
| 18 | </script> | ||
| 19 | |||
| 20 | |||
| 21 | <div id="${post_list_id}" class="post-list"> | ||
| 22 | %if posts: | ||
| 23 | <ul class="post-list list-unstyled"> | ||
| 24 | % for post in posts: | ||
| 25 | <li class="post-list-item"> | ||
| 26 | <div class="post-list-headline"> | ||
| 27 | <a href="${post.permalink()}"><div class="post-date">${post.formatted_date(date_format)}</div></a> | ||
| 28 | <div style="cursor: pointer" onclick="toggleClass(${loop.index})"> | ||
| 29 | <span class="glyphicon glyphicon-chevron-up" id="showfull-${loop.index}"></span><span>${post.title(lang)}</span> | ||
| 30 | </div> | ||
| 31 | </div> | ||
| 32 | <div class="post-body" id="post-body-${loop.index}"> | ||
| 33 | ${post.text( teaser_only = true, show_read_more_link = true) } | ||
| 34 | </div> | ||
| 35 | </li> | ||
| 36 | % endfor | ||
| 37 | </ul> | ||
| 38 | %endif | ||
| 39 | </div> | ||
| 40 | <!-- End post-list ${post_list_id} --> | ||
| 41 | </%block> | ||
diff --git a/themes/erdgeist/templates/list_poetry.tmpl b/themes/erdgeist/templates/list_poetry.tmpl new file mode 100644 index 0000000..3bde503 --- /dev/null +++ b/themes/erdgeist/templates/list_poetry.tmpl | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | ## -*- coding: utf-8 -*- | ||
| 2 | <%block name="content"> | ||
| 3 | <!-- Begin post-list ${post_list_id} --> | ||
| 4 | <div id="${post_list_id}" class="post-list"> | ||
| 5 | %if posts: | ||
| 6 | <ul class="poetry-list multi-columns post-list list-unstyled"> | ||
| 7 | % for post in posts: | ||
| 8 | <li class="post-list-item"> | ||
| 9 | <a href="${post.permalink()}">${post.title(lang)}</a><div class="post-date">(${post.formatted_date('%b %Y')})</div> | ||
| 10 | </li> | ||
| 11 | % endfor | ||
| 12 | </ul> | ||
| 13 | %endif | ||
| 14 | </div> | ||
| 15 | <!-- End post-list ${post_list_id} --> | ||
| 16 | </%block> | ||
diff --git a/themes/erdgeist/templates/list_projectnews.tmpl b/themes/erdgeist/templates/list_projectnews.tmpl new file mode 100644 index 0000000..abb515b --- /dev/null +++ b/themes/erdgeist/templates/list_projectnews.tmpl | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | ## -*- coding: utf-8 -*- | ||
| 2 | <%block name="content"> | ||
| 3 | <!-- Begin post-list ${post_list_id} --> | ||
| 4 | <div id="${post_list_id}" class="post-list"> | ||
| 5 | %if posts: | ||
| 6 | <ul class="poetry-list post-list list-unstyled"> | ||
| 7 | % for post in posts: | ||
| 8 | <li class="post-list-item"> | ||
| 9 | <div style="float:left; margin-right: .6em"><a href="${post.permalink()}">(${post.formatted_date('%Y-%m-%d')})</a></div> ${post.text(lang)} | ||
| 10 | </li> | ||
| 11 | % endfor | ||
| 12 | </ul> | ||
| 13 | %endif | ||
| 14 | </div> | ||
| 15 | <!-- End post-list ${post_list_id} --> | ||
| 16 | </%block> | ||
diff --git a/themes/erdgeist/templates/list_projects.tmpl b/themes/erdgeist/templates/list_projects.tmpl new file mode 100644 index 0000000..b8d67b5 --- /dev/null +++ b/themes/erdgeist/templates/list_projects.tmpl | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | ## -*- coding: utf-8 -*- | ||
| 2 | <%block name="content"> | ||
| 3 | <!-- Begin post-list ${post_list_id} --> | ||
| 4 | <div id="${post_list_id}" class="post-list"> | ||
| 5 | %if posts: | ||
| 6 | <div class="post-list list-unstyled"> | ||
| 7 | % for post in posts: | ||
| 8 | <p class="post-list-item"> | ||
| 9 | <a href="${post.permalink()}">${post.title(lang)}</a> ${post.description()} | ||
| 10 | </p> | ||
| 11 | % endfor | ||
| 12 | </div> | ||
| 13 | %endif | ||
| 14 | </div> | ||
| 15 | <!-- End post-list ${post_list_id} --> | ||
| 16 | </%block> | ||
diff --git a/themes/erdgeist/templates/post.tmpl b/themes/erdgeist/templates/post.tmpl new file mode 100644 index 0000000..c1a0ad7 --- /dev/null +++ b/themes/erdgeist/templates/post.tmpl | |||
| @@ -0,0 +1,51 @@ | |||
| 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 | <%inherit file="base.tmpl"/> | ||
| 6 | |||
| 7 | <%block name="extra_head"> | ||
| 8 | ${parent.extra_head()} | ||
| 9 | % if post.meta('keywords'): | ||
| 10 | <meta name="keywords" content="${post.meta('keywords')|h}"> | ||
| 11 | % endif | ||
| 12 | %if post.description(): | ||
| 13 | <meta name="description" content="${post.description()}"> | ||
| 14 | %endif | ||
| 15 | <meta name="author" content="${post.author()}"> | ||
| 16 | %if post.prev_post: | ||
| 17 | <link rel="prev" href="${post.prev_post.permalink()}" title="${post.prev_post.title()|h}" type="text/html"> | ||
| 18 | %endif | ||
| 19 | %if post.next_post: | ||
| 20 | <link rel="next" href="${post.next_post.permalink()}" title="${post.next_post.title()|h}" type="text/html"> | ||
| 21 | %endif | ||
| 22 | % if post.is_draft: | ||
| 23 | <meta name="robots" content="noindex"> | ||
| 24 | % endif | ||
| 25 | ${helper.open_graph_metadata(post)} | ||
| 26 | ${helper.twitter_card_information(post)} | ||
| 27 | ${helper.meta_translations(post)} | ||
| 28 | </%block> | ||
| 29 | |||
| 30 | <%block name="content"> | ||
| 31 | <article class="col-md-9 col-lg-7 col-sm-12 post-${post.meta('type')} h-entry hentry postpage" itemscope="itemscope" itemtype="http://schema.org/Article"> | ||
| 32 | ${pheader.html_post_header()} | ||
| 33 | <div class="e-content entry-content" itemprop="articleBody text"> | ||
| 34 | ${post.text()} | ||
| 35 | </div> | ||
| 36 | <aside class="postpromonav"> | ||
| 37 | <nav> | ||
| 38 | ${helper.html_tags(post)} | ||
| 39 | ${helper.html_pager(post)} | ||
| 40 | </nav> | ||
| 41 | </aside> | ||
| 42 | % if not post.meta('nocomments') and site_has_comments: | ||
| 43 | <section class="comments"> | ||
| 44 | <h2>${messages("Comments")}</h2> | ||
| 45 | ${comments.comment_form(post.permalink(absolute=True), post.title(), post._base_path)} | ||
| 46 | </section> | ||
| 47 | % endif | ||
| 48 | ${helper.mathjax_script(post)} | ||
| 49 | </article> | ||
| 50 | ${comments.comment_link_script()} | ||
| 51 | </%block> | ||
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> | ||
