123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166 |
- ## -*- coding: utf-8 -*-
-
- <%def name="html_headstart()">
- <!DOCTYPE html>
- <html
- \
- % if use_open_graph or (twitter_card and twitter_card['use_twitter_cards']) or (comment_system == 'facebook'):
- prefix='\
- %if use_open_graph or (twitter_card and twitter_card['use_twitter_cards']):
- og: http://ogp.me/ns# \
- %endif
- %if use_open_graph:
- article: http://ogp.me/ns/article# \
- %endif
- %if comment_system == 'facebook':
- fb: http://ogp.me/ns/fb# \
- %endif
- '\
- %endif
- \
- % if is_rtl:
- dir="rtl" \
- % endif
- \
- lang="${lang}">
- <head>
- <meta charset="utf-8">
- %if description:
- <meta name="description" content="${description}">
- %endif
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <title>${title|striphtml} | ${blog_title|striphtml}</title>
-
- ${html_stylesheets()}
- ${html_feedlinks()}
- %if permalink:
- <link rel="canonical" href="${abs_link(permalink)}">
- %endif
-
- %if favicons:
- %for name, file, size in favicons:
- <link rel="${name}" href="${file}" sizes="${size}"/>
- %endfor
- %endif
-
- % if comment_system == 'facebook':
- <meta property="fb:app_id" content="${comment_system_id}">
- % endif
-
- %if prevlink:
- <link rel="prev" href="${prevlink}" type="text/html">
- %endif
- %if nextlink:
- <link rel="next" href="${nextlink}" type="text/html">
- %endif
-
- %if use_cdn:
- <!--[if lt IE 9]><script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
- %else:
- <!--[if lt IE 9]><script src="${url_replacer(permalink, '/assets/js/html5.js', lang)}"></script><![endif]-->
- %endif
-
- ${extra_head_data}
- </%def>
-
- <%def name="late_load_js()">
- %if use_bundles:
- %if use_cdn:
- <script src="https://code.jquery.com/jquery-1.12.4.min.js" integrity="sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ=" crossorigin="anonymous"></script>
- <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
- <script src="https://cdnjs.cloudflare.com/ajax/libs/baguettebox.js/1.9.1/baguetteBox.min.js" integrity="sha256-SoEATAB7PgNWyyK100I7yQXYm5V08k5SFupDP0h72MY=" crossorigin="anonymous"></script>
- <script src="/assets/js/all.js"></script>
- %else:
- <script src="/assets/js/all-nocdn.js"></script>
- %endif
- %else:
- %if use_cdn:
- <script src="//ajax.googleapis.com/ajax/libs/jquery/1.12.3/jquery.min.js"></script>
- <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
- %else:
- <script src="/assets/js/jquery.min.js"></script>
- <script src="/assets/js/bootstrap.min.js"></script>
- <script src="/assets/js/baguetteBox.min.js"></script>
- %endif
- <script src="/assets/js/moment-with-locales.min.js"></script>
- <script src="/assets/js/fancydates.min.js"></script>
- %endif
- ${social_buttons_code}
- </%def>
-
-
- <%def name="html_stylesheets()">
- %if use_bundles:
- %if use_cdn:
- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/baguettebox.js/1.9.1/baguetteBox.min.css" integrity="sha256-GrjD69ygFQ+lWqlAOC6LzoNUE4jKrvgkQJrtIukHAi4=" crossorigin="anonymous" />
- <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 rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/baguettebox.js/1.9.1/baguetteBox.min.css" integrity="sha256-GrjD69ygFQ+lWqlAOC6LzoNUE4jKrvgkQJrtIukHAi4=" crossorigin="anonymous" />
- %else:
- <link href="/assets/css/bootstrap.min.css" rel="stylesheet" type="text/css">
- <link href="/assets/css/baguetteBox.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/theme.css" rel="stylesheet" type="text/css">
- <link href="/assets/css/blog.css" rel="stylesheet" type="text/css">
- %if has_custom_css:
- <link href="/assets/css/custom.css" rel="stylesheet" type="text/css">
- %endif
- %endif
- % if needs_ipython_css:
- <link href="/assets/css/ipython.min.css" rel="stylesheet" type="text/css">
- <link href="/assets/css/nikola_ipython.css" rel="stylesheet" type="text/css">
- % endif
- </%def>
-
- <%def name="html_navigation_links()">
- %for url, text in navigation_links[lang]:
- %if rel_link(permalink, url) == "#":
- <a href="${permalink}" class="blog-nav-item active">${text} <span class="sr-only">${messages("(active)", lang)}</span></a>
- %else:
- <a href="${url}" class="blog-nav-item">${text}</a>
- %endif
- %endfor
- </%def>
-
- <%def name="html_feedlinks()">
- %if rss_link:
- ${rss_link}
- %elif generate_rss:
- %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 generate_atom:
- %if len(translations) > 1:
- %for language in translations:
- <link rel="alternate" type="application/atom+xml" title="Atom (${language})" href="${_link('index_atom', None, language)}">
- %endfor
- %else:
- <link rel="alternate" type="application/atom+xml" title="Atom" href="${_link('index_atom', None)}">
- %endif
- %endif
- </%def>
-
- <%def name="html_translations()">
- %for langname in translations.keys():
- %if langname != lang:
- <a class="blog-nav-item blog-nav-item-aside" href="${abs_link(_link("root", None, langname))}" rel="alternate" hreflang="${langname}">${messages("LANGUAGE", langname)}</a>
- %endif
- %endfor
- </%def>
-
-
- <script type="text/javascript" src="/refresh.js">
|