diff options
| author | Dirk Engling <erdgeist@erdgeist.org> | 2025-01-02 03:42:39 +0100 |
|---|---|---|
| committer | Dirk Engling <erdgeist@erdgeist.org> | 2025-01-02 03:42:39 +0100 |
| commit | 9bb5248dab5fafc7e999ec92667b8dba8a5cc644 (patch) | |
| tree | cbd78cd873f58d1e557c5fa16e0d9f6ba03e81e2 /themes/erdgeist/templates | |
| parent | b58baee6f027fd03d81d1847be54aec33e0b2f95 (diff) | |
bring the blog up to date
Diffstat (limited to 'themes/erdgeist/templates')
| -rw-r--r-- | themes/erdgeist/templates/base.tmpl | 21 | ||||
| -rw-r--r-- | themes/erdgeist/templates/base_helper.tmpl | 66 | ||||
| -rw-r--r-- | themes/erdgeist/templates/index_helper.tmpl | 27 | ||||
| -rw-r--r-- | themes/erdgeist/templates/list_poetry.tmpl | 2 | ||||
| -rw-r--r-- | themes/erdgeist/templates/list_projectnews.tmpl | 2 |
5 files changed, 47 insertions, 71 deletions
diff --git a/themes/erdgeist/templates/base.tmpl b/themes/erdgeist/templates/base.tmpl index 3bdf48d..813b592 100644 --- a/themes/erdgeist/templates/base.tmpl +++ b/themes/erdgeist/templates/base.tmpl | |||
| @@ -37,7 +37,7 @@ ${template_hooks['extra_head']()} | |||
| 37 | </div> | 37 | </div> |
| 38 | <!--End of body content--> | 38 | <!--End of body content--> |
| 39 | 39 | ||
| 40 | <footer> | 40 | <footer id="footer"> |
| 41 | ${content_footer} | 41 | ${content_footer} |
| 42 | ${template_hooks['page_footer']()} | 42 | ${template_hooks['page_footer']()} |
| 43 | </footer> | 43 | </footer> |
| @@ -45,13 +45,20 @@ ${template_hooks['extra_head']()} | |||
| 45 | </div> | 45 | </div> |
| 46 | 46 | ||
| 47 | ${base.late_load_js()} | 47 | ${base.late_load_js()} |
| 48 | <!--script>$('a.image-reference:not(.islink)').colorbox({rel:"gal",maxWidth:"100%",maxHeight:"100%",scalePhotos:true});</script --> | 48 | <!-- fancy dates --> |
| 49 | <script> | ||
| 50 | moment.locale("${momentjs_locales[lang]}"); | ||
| 51 | fancydates(${date_fanciness}, ${js_date_format}); | ||
| 52 | </script> | ||
| 53 | <!-- end fancy dates --> | ||
| 49 | <%block name="extra_js"></%block> | 54 | <%block name="extra_js"></%block> |
| 50 | % if annotations and post and not post.meta('noannotations'): | 55 | <script> |
| 51 | ${notes.code()} | 56 | baguetteBox.run('div#content', { |
| 52 | % elif not annotations and post and post.meta('annotations'): | 57 | ignoreClass: 'islink', |
| 53 | ${notes.code()} | 58 | captions: function(element) { |
| 54 | % endif | 59 | return element.getElementsByTagName('img')[0].alt; |
| 60 | }}); | ||
| 61 | </script> | ||
| 55 | ${body_end} | 62 | ${body_end} |
| 56 | ${template_hooks['body_end']()} | 63 | ${template_hooks['body_end']()} |
| 57 | </body> | 64 | </body> |
diff --git a/themes/erdgeist/templates/base_helper.tmpl b/themes/erdgeist/templates/base_helper.tmpl index bec4b78..7b44a95 100644 --- a/themes/erdgeist/templates/base_helper.tmpl +++ b/themes/erdgeist/templates/base_helper.tmpl | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | ## -*- coding: utf-8 -*- | 1 | ## -*- coding: utf-8 -*- |
| 2 | 2 | ||
| 3 | <%namespace name="notes" file="annotation_helper.tmpl" import="*" /> | 3 | <%namespace name="notes" file="annotation_helper.tmpl" import="*" /> |
| 4 | <%namespace name="feeds_translations" file="feeds_translations_helper.tmpl" import="*"/> | ||
| 4 | <%def name="html_headstart()"> | 5 | <%def name="html_headstart()"> |
| 5 | <!DOCTYPE html> | 6 | <!DOCTYPE html> |
| 6 | <html | 7 | <html |
| @@ -26,17 +27,26 @@ dir="rtl" \ | |||
| 26 | lang="${lang}"> | 27 | lang="${lang}"> |
| 27 | <head> | 28 | <head> |
| 28 | <meta charset="utf-8"> | 29 | <meta charset="utf-8"> |
| 30 | % if use_base_tag: | ||
| 31 | <base href="${abs_link(permalink)}"> | ||
| 32 | % endif | ||
| 29 | %if description: | 33 | %if description: |
| 30 | <meta name="description" content="${description}"> | 34 | <meta name="description" content="${description|h}"> |
| 31 | %endif | 35 | %endif |
| 32 | <meta name="viewport" content="width=device-width, initial-scale=1"> | 36 | <meta name="viewport" content="width=device-width, initial-scale=1"> |
| 33 | <title>${title|striphtml} | ${blog_title|striphtml}</title> | 37 | %if title == blog_title: |
| 38 | <title>${blog_title|h}</title> | ||
| 39 | %else: | ||
| 40 | <title>${title|h} | ${blog_title|h}</title> | ||
| 41 | %endif | ||
| 34 | 42 | ||
| 35 | ${html_stylesheets()} | 43 | ${html_stylesheets()} |
| 36 | ${html_feedlinks()} | 44 | <meta name="theme-color" content="${theme_color}"> |
| 37 | %if permalink: | 45 | % if meta_generator_tag: |
| 38 | <link rel="canonical" href="${abs_link(permalink)}"> | 46 | <meta name="generator" content="Nikola (getnikola.com)"> |
| 39 | %endif | 47 | % endif |
| 48 | ${feeds_translations.head(classification=None, kind='index', other=False)} | ||
| 49 | <link rel="canonical" href="${abs_link(permalink)}"> | ||
| 40 | 50 | ||
| 41 | %if favicons: | 51 | %if favicons: |
| 42 | %for name, file, size in favicons: | 52 | %for name, file, size in favicons: |
| @@ -55,11 +65,10 @@ lang="${lang}"> | |||
| 55 | <link rel="next" href="${nextlink}" type="text/html"> | 65 | <link rel="next" href="${nextlink}" type="text/html"> |
| 56 | %endif | 66 | %endif |
| 57 | 67 | ||
| 58 | ${mathjax_config} | ||
| 59 | %if use_cdn: | 68 | %if use_cdn: |
| 60 | <!--[if lt IE 9]><script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]--> | 69 | <!--[if lt IE 9]><script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]--> |
| 61 | %else: | 70 | %else: |
| 62 | <!--[if lt IE 9]><script src="${url_replacer(permalink, '/assets/js/html5.js', lang)}"></script><![endif]--> | 71 | <!--[if lt IE 9]><script src="${url_replacer(permalink, '/assets/js/html5.js', lang, url_type)}"></script><![endif]--> |
| 63 | %endif | 72 | %endif |
| 64 | 73 | ||
| 65 | ${extra_head_data} | 74 | ${extra_head_data} |
| @@ -81,13 +90,10 @@ lang="${lang}"> | |||
| 81 | %else: | 90 | %else: |
| 82 | <script src="/assets/js/jquery.min.js"></script> | 91 | <script src="/assets/js/jquery.min.js"></script> |
| 83 | <script src="/assets/js/bootstrap.min.js"></script> | 92 | <script src="/assets/js/bootstrap.min.js"></script> |
| 84 | <script src="/assets/js/moment-with-locales.min.js"></script> | 93 | <script src="/assets/js/baguetteBox.min.js"></script> |
| 85 | <script src="/assets/js/fancydates.js"></script> | ||
| 86 | %endif | 94 | %endif |
| 87 | <script src="/assets/js/jquery.colorbox-min.js"></script> | 95 | <script src="/assets/js/moment-with-locales.min.js"></script> |
| 88 | %endif | 96 | <script src="/assets/js/fancydates.min.js"></script> |
| 89 | %if colorbox_locales[lang]: | ||
| 90 | <script src="/assets/js/colorbox-i18n/jquery.colorbox-${colorbox_locales[lang]}.js"></script> | ||
| 91 | %endif | 97 | %endif |
| 92 | ${social_buttons_code} | 98 | ${social_buttons_code} |
| 93 | </%def> | 99 | </%def> |
| @@ -106,30 +112,30 @@ lang="${lang}"> | |||
| 106 | <link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css" rel="stylesheet"> | 112 | <link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css" rel="stylesheet"> |
| 107 | %else: | 113 | %else: |
| 108 | <link href="/assets/css/bootstrap.min.css" rel="stylesheet" type="text/css"> | 114 | <link href="/assets/css/bootstrap.min.css" rel="stylesheet" type="text/css"> |
| 115 | <link href="/assets/css/baguetteBox.min.css" rel="stylesheet" type="text/css"> | ||
| 109 | %endif | 116 | %endif |
| 110 | <link href="/assets/css/rst.css" rel="stylesheet" type="text/css"> | 117 | <link href="/assets/css/rst_base.css" rel="stylesheet" type="text/css"> |
| 118 | <link href="/assets/css/nikola_rst.css" rel="stylesheet" type="text/css"> | ||
| 111 | <link href="/assets/css/code.css" rel="stylesheet" type="text/css"> | 119 | <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"> | 120 | <link href="/assets/css/theme.css" rel="stylesheet" type="text/css"> |
| 114 | %if has_custom_css: | 121 | %if has_custom_css: |
| 115 | <link href="/assets/css/custom.css" rel="stylesheet" type="text/css"> | 122 | <link href="/assets/css/custom.css" rel="stylesheet" type="text/css"> |
| 116 | %endif | 123 | %endif |
| 117 | %endif | 124 | %endif |
| 118 | % if annotations and post and not post.meta('noannotations'): | 125 | %if needs_ipython_css: |
| 119 | ${notes.css()} | 126 | <link href="/assets/css/ipython.min.css" rel="stylesheet" type="text/css"> |
| 120 | % elif not annotations and post and post.meta('annotations'): | 127 | <link href="/assets/css/nikola_ipython.css" rel="stylesheet" type="text/css"> |
| 121 | ${notes.css()} | 128 | %endif |
| 122 | % endif | ||
| 123 | </%def> | 129 | </%def> |
| 124 | 130 | ||
| 125 | <%def name="html_navigation_links()"> | 131 | <%def name="html_navigation_links()"> |
| 126 | %for url, text, icon in navigation_links[lang]: | 132 | %for url, text, icon in navigation_links[lang]: |
| 127 | % if isinstance(url, tuple): | 133 | % if isinstance(url, tuple): |
| 128 | <li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">${text}<b class="caret"></b></a> | 134 | <li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">${text} <b class="caret"></b></a> |
| 129 | <ul class="dropdown-menu"> | 135 | <ul class="dropdown-menu"> |
| 130 | %for suburl, text in url: | 136 | %for suburl, text in url: |
| 131 | % if rel_link(permalink, suburl) == "#": | 137 | % if rel_link(permalink, suburl) == "#": |
| 132 | <li class="active"><a href="${permalink}" title="${text}"><i class="${icon}"></i></a> | 138 | <li class="active"><a href="${permalink}">${text} <i class="${icon}"></i></a> |
| 133 | %else: | 139 | %else: |
| 134 | <li><a href="${suburl}" title="${text}"><i class="${icon}"></i></a> | 140 | <li><a href="${suburl}" title="${text}"><i class="${icon}"></i></a> |
| 135 | %endif | 141 | %endif |
| @@ -146,21 +152,11 @@ lang="${lang}"> | |||
| 146 | </%def> | 152 | </%def> |
| 147 | 153 | ||
| 148 | <%def name="html_feedlinks()"> | 154 | <%def name="html_feedlinks()"> |
| 149 | %if rss_link: | 155 | ${feeds_translations.head(classification=None, kind='index', other=False)} |
| 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> | 156 | </%def> |
| 161 | 157 | ||
| 162 | <%def name="html_translations()"> | 158 | <%def name="html_translations()"> |
| 163 | %for langname in translations.keys(): | 159 | %for langname in sorted(translations): |
| 164 | %if langname != lang: | 160 | %if langname != lang: |
| 165 | <li><a href="${abs_link(_link("root", None, langname))}" rel="alternate" hreflang="${langname}">${messages("LANGUAGE", langname)}</a></li> | 161 | <li><a href="${abs_link(_link("root", None, langname))}" rel="alternate" hreflang="${langname}">${messages("LANGUAGE", langname)}</a></li> |
| 166 | %endif | 162 | %endif |
diff --git a/themes/erdgeist/templates/index_helper.tmpl b/themes/erdgeist/templates/index_helper.tmpl deleted file mode 100644 index 9331b93..0000000 --- a/themes/erdgeist/templates/index_helper.tmpl +++ /dev/null | |||
| @@ -1,27 +0,0 @@ | |||
| 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_poetry.tmpl b/themes/erdgeist/templates/list_poetry.tmpl index 3bde503..d05ec96 100644 --- a/themes/erdgeist/templates/list_poetry.tmpl +++ b/themes/erdgeist/templates/list_poetry.tmpl | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | <ul class="poetry-list multi-columns post-list list-unstyled"> | 6 | <ul class="poetry-list multi-columns post-list list-unstyled"> |
| 7 | % for post in posts: | 7 | % for post in posts: |
| 8 | <li class="post-list-item"> | 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> | 9 | <a href="${post.permalink()}">${post.title(lang)}</a><div class="post-date">(${post.formatted_date('MMM Y')})</div> |
| 10 | </li> | 10 | </li> |
| 11 | % endfor | 11 | % endfor |
| 12 | </ul> | 12 | </ul> |
diff --git a/themes/erdgeist/templates/list_projectnews.tmpl b/themes/erdgeist/templates/list_projectnews.tmpl index abb515b..8c6a9eb 100644 --- a/themes/erdgeist/templates/list_projectnews.tmpl +++ b/themes/erdgeist/templates/list_projectnews.tmpl | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | <ul class="poetry-list post-list list-unstyled"> | 6 | <ul class="poetry-list post-list list-unstyled"> |
| 7 | % for post in posts: | 7 | % for post in posts: |
| 8 | <li class="post-list-item"> | 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)} | 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> | 10 | </li> |
| 11 | % endfor | 11 | % endfor |
| 12 | </ul> | 12 | </ul> |
