base.html 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. <!DOCTYPE html>
  2. <html lang="en-US">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. {% if article and article.author %}
  8. <meta name="author" content="{{ article.author }}" />
  9. <meta name="copyright" content="{{ article.author }}" />
  10. {% elif page and page.author %}
  11. <meta name="author" content="{{ page.author }}" />
  12. <meta name="copyright" content="{{ page.author }}" />
  13. {% else %}
  14. <meta name="author" content="{{ AUTHOR }}" />
  15. <meta name="copyright" content="{{ AUTHOR }}" />
  16. {% endif %}
  17. {% from '_includes/_defaults.html' import SITE_DESCRIPTION with context %}
  18. {% if SITE_DESCRIPTION %}
  19. <meta name="description" content="{% block head_description %}{{ SITE_DESCRIPTION|e }}{% endblock head_description %}" />
  20. {% endif %}
  21. {% block meta_tags_in_head %}
  22. {% from '_includes/_defaults.html' import GOOGLE_PLUS_PROFILE_URL with context %}
  23. {% if GOOGLE_PLUS_PROFILE_URL %}
  24. <link rel="author" href={{GOOGLE_PLUS_PROFILE_URL}} />
  25. {% endif %}
  26. {% from '_includes/_defaults.html' import TWITTER_USERNAME with context %}
  27. {%if TWITTER_USERNAME %}
  28. <meta name="twitter:creator" content="@{{TWITTER_USERNAME}}">
  29. {% endif %}
  30. <meta property="og:type" content="article" />
  31. <meta name="twitter:card" content="summary">
  32. {% endblock meta_tags_in_head %}
  33. <title>{% block title %}{{ SITENAME|striptags|e }}{% endblock title %}</title>
  34. {% block head_links %}
  35. <link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css" rel="stylesheet">
  36. <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
  37. {% if 'assets' in PLUGINS %}
  38. {% include '_includes/minify_css.html' with context %}
  39. {% else %}
  40. <link rel="stylesheet" type="text/css" href="{{ SITEURL }}/theme/css/bootstrap-theme.css" media="screen">
  41. <link rel="stylesheet" type="text/css" href="{{ SITEURL }}/theme/css/pygments.css" media="screen">
  42. <link rel="stylesheet" type="text/css" href="{{ SITEURL }}/theme/tipuesearch/tipuesearch.css" media="screen">
  43. <link rel="stylesheet" type="text/css" href="{{ SITEURL }}/theme/css/elegant.css" media="screen">
  44. <link rel="stylesheet" type="text/css" href="{{ SITEURL }}/theme/css/custom.css" media="screen">
  45. {% endif %}
  46. {% endblock head_links %}
  47. {% include '_includes/favicon_links.html' %}
  48. {% block feed_links %}
  49. {% include '_includes/feeds.html' %}
  50. {% endblock feed_links %}
  51. {% include '_includes/analytics.html' %}
  52. </head>
  53. <body>
  54. <nav class="navbar navbar-default" role="navigation">
  55. <div class="container">
  56. <!-- Brand and toggle get grouped for better mobile display -->
  57. <div class="navbar-header">
  58. <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
  59. <span class="sr-only">Toggle navigation</span>
  60. <span class="icon-bar"></span>
  61. <span class="icon-bar"></span>
  62. <span class="icon-bar"></span>
  63. </button>
  64. <a class="navbar-brand" href="{{ SITEURL }}/"><span class=site-name>{{ SITENAME }}</span></a>
  65. </div>
  66. <!-- Collect the nav links, forms, and other content for toggling -->
  67. <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
  68. <ul class="nav navbar-nav navbar-right">
  69. <li {% if page_name == 'index' %} class="active"{% endif %}><a href="{{ SITEURL }}">Home</a></li>
  70. {% if DISPLAY_PAGES_ON_MENU %}
  71. {% for p in pages %}
  72. <li {% if p == page %} class="active"{% endif %}><a href="{{ SITEURL }}/{{ p.url }}">{{ p.title }}</a></li>
  73. {% endfor %}
  74. {% endif %}
  75. <li {% if page_name == 'categories' %} class="active"{% endif %}><a href="{{ SITEURL }}/categories.html">Categories</a></li>
  76. <li {% if page_name == 'tags' %} class="active"{% endif %}><a href="{{ SITEURL }}/tags.html">Tags</a></li>
  77. <li {% if page_name == 'archives' %} class="active"{% endif %}><a href="{{ SITEURL }}/archives.html">Archives</a></li>
  78. <li>
  79. <form class="navbar-form" role="search" action="{{ SITEURL }}/search.html" onsubmit="return validateForm(this.elements['q'].value);">
  80. <input type="text" class="form-control" placeholder="Search" name="q" id="tipue_search_input">
  81. </form>
  82. </li>
  83. </ul>
  84. </div><!-- /.navbar-collapse -->
  85. </div><!-- /.container -->
  86. </nav>
  87. <div class="container">
  88. <div class="row">
  89. <div class="col-xs-12">
  90. {% block content %}
  91. {% endblock content %}
  92. </div>
  93. </div>
  94. </div>
  95. {% include '_includes/footer.html' %}
  96. {% block script %}
  97. <script src="http://code.jquery.com/jquery.min.js"></script>
  98. <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>
  99. <script>
  100. function validateForm(query)
  101. {
  102. return (query.length > 0);
  103. }
  104. </script>
  105. {% endblock script %}
  106. {% include '_includes/stat_counter.html' %}
  107. </body>
  108. <!-- Theme: Elegant built for Pelican
  109. License : http://oncrashreboot.com/pelican-elegant -->
  110. </html>