base_helper.tmpl 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. ## -*- coding: utf-8 -*-
  2. <%def name="html_head()">
  3. <meta charset="utf-8">
  4. <meta name="description" content="${description}" >
  5. <meta name="author" content="${blog_author}">
  6. <title>${title} | ${blog_title}</title>
  7. ${mathjax_config}
  8. %if use_bundles:
  9. %if use_cdn:
  10. <link href="/assets/css/all.css" rel="stylesheet" type="text/css">
  11. %else:
  12. <link href="/assets/css/all-nocdn.css" rel="stylesheet" type="text/css">
  13. %endif
  14. %else:
  15. <link href="/assets/css/rst.css" rel="stylesheet" type="text/css">
  16. <link href="/assets/css/code.css" rel="stylesheet" type="text/css">
  17. <link href="/assets/css/colorbox.css" rel="stylesheet" type="text/css"/>
  18. <link href="/assets/css/theme.css" rel="stylesheet" type="text/css"/>
  19. ## where is this specified?
  20. ## %if has_custom_css:
  21. ## <link href="/assets/css/custom.css" rel="stylesheet" type="text/css">
  22. ## %endif
  23. %endif
  24. ## sorry about the typekit, thomas. it's pretty!
  25. <script type="text/javascript" src="//use.typekit.net/iwm5axp.js"></script>
  26. <script type="text/javascript">try{Typekit.load();}catch(e){}</script>
  27. <!--[if lt IE 9]>
  28. <script src="http://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
  29. <![endif]-->
  30. %if rss_link:
  31. ${rss_link}
  32. %else:
  33. %for language in translations:
  34. <link rel="alternate" type="application/rss+xml" title="RSS (${language})" href="${_link('rss', None, language)}">
  35. %endfor
  36. %endif
  37. %if favicons:
  38. %for name, file, size in favicons:
  39. <link rel="${name}" href="${file}" sizes="${size}"/>
  40. %endfor
  41. %endif
  42. </%def>
  43. <%def name="html_social()">
  44. %if add_this_buttons:
  45. <!-- Social buttons -->
  46. <div id="addthisbox" class="addthis_toolbox addthis_peekaboo_style addthis_default_style addthis_label_style addthis_32x32_style">
  47. <a class="addthis_button_more">Share</a>
  48. <ul><li><a class="addthis_button_facebook"></a>
  49. <li><a class="addthis_button_google_plusone_share"></a>
  50. <li><a class="addthis_button_linkedin"></a>
  51. <li><a class="addthis_button_twitter"></a>
  52. </ul>
  53. </div>
  54. <script type="text/javascript" src="http://s7.addthis.com/js/300/addthis_widget.js#pubid=ra-4f7088a56bb93798"></script>
  55. <!-- End of social buttons -->
  56. %endif
  57. </%def>
  58. <%def name="html_sidebar_links()">
  59. %for url, text in sidebar_links[lang]:
  60. % if rel_link(permalink, url) == "#":
  61. <li class="active"><a href="${url}">${text}</a>
  62. %else:
  63. <li><a href="${url}">${text}</a>
  64. %endif
  65. %endfor
  66. </%def>
  67. <%def name="html_translations()">
  68. %for langname in translations.keys():
  69. %if langname != lang:
  70. <a href="${_link("index", None, langname)}">${messages("LANGUAGE", langname)}</a>
  71. %endif
  72. %endfor
  73. </%def>