summaryrefslogtreecommitdiffstats
path: root/nikola/data/themes/bootstrap/templates/bootstrap_helper.tmpl
diff options
context:
space:
mode:
Diffstat (limited to 'nikola/data/themes/bootstrap/templates/bootstrap_helper.tmpl')
-rw-r--r--nikola/data/themes/bootstrap/templates/bootstrap_helper.tmpl96
1 files changed, 96 insertions, 0 deletions
diff --git a/nikola/data/themes/bootstrap/templates/bootstrap_helper.tmpl b/nikola/data/themes/bootstrap/templates/bootstrap_helper.tmpl
new file mode 100644
index 0000000..763ac20
--- /dev/null
+++ b/nikola/data/themes/bootstrap/templates/bootstrap_helper.tmpl
@@ -0,0 +1,96 @@
+## Override only the functions that differ from base_helper.tmpl
+<%def name="html_head()">
+ <meta charset="utf-8">
+ %if description:
+ <meta name="description" content="${description}">
+ %endif
+ <meta name="author" content="${blog_author}">
+ <title>${title|striphtml} | ${blog_title|striphtml}</title>
+ ${mathjax_config}
+ %if use_bundles:
+ %if use_cdn:
+ <link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.0/css/bootstrap-combined.min.css" rel="stylesheet">
+ <link href="/assets/css/all.css" rel="stylesheet" type="text/css">
+ %else:
+ <link href="/assets/css/all-nocdn.css" rel="stylesheet" type="text/css">
+ %endif
+ %else:
+ %if use_cdn:
+ <link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.0/css/bootstrap-combined.min.css" rel="stylesheet">
+ %else:
+ <link href="/assets/css/bootstrap.min.css" rel="stylesheet" type="text/css">
+ <link href="/assets/css/bootstrap-responsive.min.css" rel="stylesheet" type="text/css">
+ %endif
+ <link href="/assets/css/rst.css" rel="stylesheet" type="text/css">
+ <link href="/assets/css/code.css" rel="stylesheet" type="text/css">
+ <link href="/assets/css/colorbox.css" rel="stylesheet" type="text/css"/>
+ <link href="/assets/css/theme.css" rel="stylesheet" type="text/css"/>
+ %if has_custom_css:
+ <link href="/assets/css/custom.css" rel="stylesheet" type="text/css">
+ %endif
+ %endif
+ <!--[if lt IE 9]>
+ <script src="http://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
+ <![endif]-->
+ %if rss_link:
+ ${rss_link}
+ %else:
+ %if len(translations) > 1:
+ %for language in translations:
+ <link rel="alternate" type="application/rss+xml" title="RSS (${language})" href="${_link('rss', None, language)}">
+ %endfor
+ %else:
+ <link rel="alternate" type="application/rss+xml" title="RSS" href="${_link('rss', None)}">
+ %endif
+ %endif
+ %if favicons:
+ %for name, file, size in favicons:
+ <link rel="${name}" href="${file}" sizes="${size}"/>
+ %endfor
+ %endif
+</%def>
+
+<%def name="late_load_js()">
+ %if use_bundles:
+ %if use_cdn:
+ <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js" type="text/javascript"></script>
+ <script src="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.0/js/bootstrap.min.js"></script>
+ <script src="/assets/js/all.js" type="text/javascript"></script>
+ %else:
+ <script src="/assets/js/all-nocdn.js" type="text/javascript"></script>
+ %endif
+ %else:
+ %if use_cdn:
+ <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js" type="text/javascript"></script>
+ <script src="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.0/js/bootstrap.min.js"></script>
+ %else:
+ <script src="/assets/js/jquery-1.10.2.min.js" type="text/javascript"></script>
+ <script src="/assets/js/bootstrap.min.js" type="text/javascript"></script>
+ %endif
+ <script src="/assets/js/jquery.colorbox-min.js" type="text/javascript"></script>
+ %endif
+</%def>
+
+
+<%def name="html_navigation_links()">
+ %for url, text in navigation_links[lang]:
+ % if isinstance(url, tuple):
+ <li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">${text}<b class="caret"></b></a>
+ <ul class="dropdown-menu">
+ %for suburl, text in url:
+ % if rel_link(permalink, suburl) == "#":
+ <li class="active"><a href="${suburl}">${text}</a>
+ %else:
+ <li><a href="${suburl}">${text}</a>
+ %endif
+ %endfor
+ </ul>
+ % else:
+ % if rel_link(permalink, url) == "#":
+ <li class="active"><a href="${url}">${text}</a>
+ %else:
+ <li><a href="${url}">${text}</a>
+ %endif
+ % endif
+ %endfor
+</%def>