base.html 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  1. <!DOCTYPE html>
  2. {% if USE_OPEN_GRAPH is not defined %}
  3. {% set USE_OPEN_GRAPH = True %}
  4. {% endif %}
  5. <html lang="{% block html_lang %}{{ DEFAULT_LANG }}{% endblock %}"{% if USE_OPEN_GRAPH %} prefix="og: http://ogp.me/ns# fb: https://www.facebook.com/2008/fbml"{% endif %}>
  6. <head>
  7. <title>{% block title %}{{ SITENAME }}{% endblock %}</title>
  8. <link rel="stylesheet" media="screen" href={{ FONT_URL }} type="text/css" />
  9. <link rel="icon" href="{{ EXTRA_PATH_METADATA['extra/favicon.png']['path'] }}" type="image/png" />
  10. <!-- Using the latest rendering mode for IE -->
  11. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  12. <meta charset="utf-8">
  13. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  14. {% if 'liquid_tags.notebook' in PLUGINS %}
  15. {% include 'includes/liquid_tags_nb_header.html' %}
  16. {% endif %}
  17. {# Favicons are a touchy subject. For reasoning for the following code, see: http://stackoverflow.com/a/23851464/872397 #}
  18. {% if FAVICON %}
  19. <link href="{{ SITEURL }}/{{ FAVICON }}" rel="icon">
  20. {% endif %}
  21. {% if FAVICON_IE %}
  22. <!--[if IE]><link rel="shortcut icon" href="{{ SITEURL }}/{{ FAVICON_IE }}"><![endif]-->
  23. {% endif %}
  24. {% if TOUCHICON %}
  25. <link rel="apple-touch-icon" href="{{ SITEURL }}/{{ TOUCHICON }}">
  26. {% endif %}
  27. {% block canonical_rel %}{% endblock %}
  28. {% block meta %}
  29. <meta name="author" content="{{ AUTHOR }}" />
  30. {% endblock %}
  31. {# Open Graph tags #}
  32. {% if USE_OPEN_GRAPH %}
  33. {% block opengraph %}
  34. <!-- Open Graph tags -->
  35. {% if OPEN_GRAPH_FB_APP_ID %}
  36. <meta property="fb:app_id" content="{{ OPEN_GRAPH_FB_APP_ID }}"/>
  37. {% endif %}
  38. <meta property="og:site_name" content="{{ SITENAME }}" />
  39. <meta property="og:type" content="website"/>
  40. <meta property="og:title" content="{{ SITENAME }}"/>
  41. <meta property="og:url" content="{{ SITEURL }}"/>
  42. <meta property="og:description" content="{{ SITENAME }}"/>
  43. {% if OPEN_GRAPH_IMAGE %}
  44. <meta property="og:image"
  45. content="{{ SITEURL }}/{{ OPEN_GRAPH_IMAGE }}"/>
  46. {% endif %}
  47. {% endblock %}
  48. {% endif %}
  49. <!-- Bootstrap -->
  50. {% if BOOTSTRAP_THEME %}
  51. <link rel="stylesheet" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/css/bootstrap.{{ BOOTSTRAP_THEME }}.min.css" type="text/css"/>
  52. {% else %}
  53. <link rel="stylesheet" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/css/bootstrap.min.css" type="text/css"/>
  54. {% endif %}
  55. <link href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/css/font-awesome.min.css" rel="stylesheet">
  56. {% if 'tipue_search' in PLUGINS %}
  57. <link href="{{ SITEURL}}/{{ THEME_STATIC_DIR }}/tipuesearch/tipuesearch.css" rel="stylesheet">
  58. {% endif %}
  59. {% if DOCUTIL_CSS %}
  60. <link href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/css/html4css1.css" rel="stylesheet">
  61. {% endif %}
  62. {% if TYPOGRIFY %}
  63. <link href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/css/typogrify.css" rel="stylesheet">
  64. {% endif %}
  65. <link rel="stylesheet" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/css/style.css" type="text/css"/>
  66. {% if CUSTOM_CSS %}
  67. <link href="{{ SITEURL }}/{{ CUSTOM_CSS }}" rel="stylesheet">
  68. {% endif %}
  69. {% if SHARIFF %}
  70. <link href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/css/shariff/shariff.min.css" rel="stylesheet">
  71. {% endif %}
  72. {% if FEED_ALL_ATOM %}
  73. <link href="{{ SITEURL }}/{{ FEED_ALL_ATOM }}" type="application/atom+xml" rel="alternate"
  74. title="{{ SITENAME }} ATOM Feed"/>
  75. {% endif %}
  76. {% if FEED_ALL_RSS %}
  77. <link href="{{ SITEURL }}/{{ FEED_ALL_RSS }}" type="application/rss+xml" rel="alternate"
  78. title="{{ SITENAME }} RSS Feed"/>
  79. {% endif %}
  80. {% if tag and TAG_FEED_ATOM %}
  81. <link href="{{ SITEURL }}/{{ TAG_FEED_ATOM|format(tag.slug) }}" type="application/atom+xml" rel="alternate"
  82. title="{{ SITENAME }} {{ tag }} ATOM Feed"/>
  83. {% endif %}
  84. {% if category and CATEGORY_FEED_ATOM %}
  85. <link href="{{ SITEURL }}/{{ CATEGORY_FEED_ATOM|format(category.slug) }}" type="application/atom+xml" rel="alternate"
  86. title="{{ SITENAME }} {{ category }} ATOM Feed"/>
  87. {% endif %}
  88. </head>
  89. <body>
  90. <!-- Banner -->
  91. {% if BANNER and BANNER_ALL_PAGES %}
  92. {% include 'includes/banner.html' %}
  93. {% elif BANNER and not BANNER_ALL_PAGES %}
  94. {% block banner %}{% endblock %}
  95. {% endif %}
  96. <!-- End Banner -->
  97. <div class="navbar {% if BOOTSTRAP_NAVBAR_INVERSE %}navbar-inverse{% else %}navbar-default{% endif %} navbar-static-top" role="navigation">
  98. <div class="container{% if BOOTSTRAP_FLUID %}-fluid{% endif %}">
  99. <div class="navbar-header">
  100. <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
  101. <span class="sr-only">Toggle navigation</span>
  102. <span class="icon-bar"></span>
  103. <span class="icon-bar"></span>
  104. <span class="icon-bar"></span>
  105. </button>
  106. <a href="{{ SITEURL }}/" class="navbar-brand">
  107. {% if not HIDE_SITENAME %}{{ SITENAME }}{% endif %}
  108. </a>
  109. </div>
  110. <div class="collapse navbar-collapse navbar-ex1-collapse">
  111. <ul class="nav navbar-nav">
  112. {% if page %}
  113. {% set menu = LOCALMENUITEMS[page.lang] %}
  114. {% else %}
  115. {% set menu = MENUITEMS %}
  116. {% endif %}
  117. {% for title, link in menu %}
  118. <li class="{% if page.url == link %}active{% endif %}"><a href="{{ link }}" >{{ title }}</a></li>
  119. {% endfor %}
  120. {% if DISPLAY_CATEGORIES_ON_MENU %}
  121. {% for cat, null in categories %}
  122. <li {% if cat == category %}class="active"{% endif %}>
  123. <a href="{{ SITEURL }}/{{ cat.url }}">{{ cat | capitalize }}</a>
  124. </li>
  125. {% endfor %}
  126. {% endif %}
  127. </ul>
  128. <ul class="nav navbar-nav navbar-right">
  129. {% if 'tipue_search' in PLUGINS %}
  130. <li><span>
  131. <form class="navbar-search" action="{{ SEARCH_URL | default(SITEURL ~ '/search.html') }}">
  132. <input type="text" class="search-query" placeholder="Search" name="q" id="tipue_search_input" required>
  133. </form></span>
  134. </li>
  135. {% endif %}
  136. </ul>
  137. </div>
  138. <!-- /.navbar-collapse -->
  139. </div>
  140. </div> <!-- /.navbar -->
  141. <div class="container{% if BOOTSTRAP_FLUID %}-fluid{% endif %}">
  142. <div class="row">
  143. {% if not HIDE_SIDEBAR or ABOUT_ME %}
  144. <div class="col-sm-9">
  145. {% else %}
  146. <div class="col-lg-12">
  147. {% endif %}
  148. {% block breadcrumbs %}
  149. {% endblock %}
  150. {% block content %}
  151. {% endblock %}
  152. </div>
  153. {% if not HIDE_SIDEBAR or ABOUT_ME %}
  154. <div class="col-sm-3" id="sidebar">
  155. <aside>
  156. {% if ABOUT_ME %}
  157. {% include 'includes/aboutme.html' %}
  158. {% endif %}
  159. {% if not HIDE_SIDEBAR %}
  160. {% include 'includes/sidebar.html' %}
  161. {% endif %}
  162. </aside>
  163. </div>
  164. {% endif %}
  165. </div>
  166. </div>
  167. {% include 'includes/footer.html' %}
  168. <script src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/js/jquery.min.js"></script>
  169. <!-- Include all compiled plugins (below), or include individual files as needed -->
  170. <script src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/js/bootstrap.min.js"></script>
  171. <!-- Enable responsive features in IE8 with Respond.js (https://github.com/scottjehl/Respond) -->
  172. <script src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/js/respond.min.js"></script>
  173. {% if BANNER %}
  174. <script src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/js/bodypadding.js"></script>
  175. {% endif %}
  176. {% block scripts %}
  177. <!-- base scripts -->
  178. {% endblock %}
  179. </body>
  180. </html>