base.html 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. <!DOCTYPE html>
  2. <html lang="{{ DEFAULT_LANG }}">
  3. <head>
  4. {% block head %}
  5. <meta name="author" content="{% block meta_author %}{% endblock %}" />
  6. <meta name="description" content="{% block meta_description %}{% endblock %}" />
  7. <meta name="keywords" content="{% block meta_keywords %}{% endblock %}" />
  8. <title>{% block title %}{{ SITENAME }}{% endblock title %}</title>
  9. <meta charset="utf-8" />
  10. <meta name="generator" content="Pelican {{ PELICAN_VERSION }}">
  11. <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0">
  12. <link rel="stylesheet" id="responsive-style-css" href="{{ SITE_URL }}/theme/css/main.css" type="text/css" media="all" />
  13. <link rel="shortcut icon" type="image/x-icon" href='{{ SITE_URL }}/favicon.ico' />
  14. {% if FEED_ALL_ATOM %}
  15. <link href="{{ FEED_DOMAIN }}/{{ FEED_ALL_ATOM }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} Full Atom Feed" />
  16. {% endif %}
  17. {% if FEED_ALL_RSS %}
  18. <link href="{{ FEED_DOMAIN }}/{{ FEED_ALL_RSS }}" type="application/rss+xml" rel="alternate" title="{{ SITENAME }} Full RSS Feed" />
  19. {% endif %}
  20. {% if FEED_ATOM %}
  21. <link href="{{ FEED_DOMAIN }}/{{ FEED_ATOM }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} Atom Feed" />
  22. {% endif %}
  23. {% if FEED_RSS %}
  24. <link href="{{ FEED_DOMAIN }}/{{ FEED_RSS }}" type="application/rss+xml" rel="alternate" title="{{ SITENAME }} RSS Feed" />
  25. {% endif %}
  26. {% if CATEGORY_FEED_ATOM and category %}
  27. <link href="{{ FEED_DOMAIN }}/{{ CATEGORY_FEED_ATOM|format(category.slug) }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} Categories Atom Feed" />
  28. {% endif %}
  29. {% if CATEGORY_FEED_RSS and category %}
  30. <link href="{{ FEED_DOMAIN }}/{{ CATEGORY_FEED_RSS|format(category.slug) }}" type="application/rss+xml" rel="alternate" title="{{ SITENAME }} Categories RSS Feed" />
  31. {% endif %}
  32. {% if TAG_FEED_ATOM and tag %}
  33. <link href="{{ FEED_DOMAIN }}/{{ TAG_FEED_ATOM|format(tag.slug) }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} Tags Atom Feed" />
  34. {% endif %}
  35. {% if TAG_FEED_RSS and tag %}
  36. <link href="{{ FEED_DOMAIN }}/{{ TAG_FEED_RSS|format(tag.slug) }}" type="application/rss+xml" rel="alternate" title="{{ SITENAME }} Tags RSS Feed" />
  37. {% endif %}
  38. {% endblock head %}
  39. </head>
  40. <body>
  41. <header title="First view with nav and either a big picture or a bar.">
  42. <nav>
  43. <ul>
  44. {% for title, link in MENUITEMS %}
  45. <li {% if p == page %} class="active"{% endif %}><a href="{{ link }}">{{ title }}</a></li>
  46. {% endfor %}
  47. {% if DISPLAY_PAGES_ON_MENU %}
  48. {% for p in PAGES %}
  49. {% if p.title == "Home" %}
  50. <!--TODO: Change this to the offset to the root instead of the absolute root. -->
  51. <li>
  52. <a href="/">
  53. <img src="/logo.svg" alt="{{SITENAME}} Logo" class="logo">
  54. </a>
  55. </li>
  56. {% else %}
  57. <li{% if p == page %} class="active"{% endif %}><a href="{{ SITEURL }}/{{ p.url }}">{{ p.title }}</a></li>
  58. {% endif %}
  59. {% endfor %}
  60. {% else %}
  61. {% if DISPLAY_CATEGORIES_ON_MENU %}
  62. {% for cat, null in categories %}
  63. <li{% if cat == category %} class="active"{% endif %}><a href="{{ SITEURL }}/{{ cat.url }}">{{ cat }}</a></li>
  64. {% endfor %}
  65. {% endif %}
  66. {% endif %}
  67. </ul>
  68. <ul>
  69. <li><a href="#sitemap">Sitemap</a></li>
  70. </ul>
  71. </nav>
  72. </header>
  73. {% block content %}
  74. {% endblock %}
  75. {% block widgets %}
  76. <section title="Widgets and Sitemap" class="widgets">
  77. <!--NOTE: Some templates put a block searchform here.-->
  78. <a id="sitemap" name="sitemap"></a>
  79. <div class="widget">
  80. <h1>Pages</h1>
  81. <ul>
  82. {% for p in PAGES %}
  83. <li><a href="{{ SITEURL }}/{{ p.url }}">{{ p.title }}</a></li>
  84. {% endfor %}
  85. </ul>
  86. </div>
  87. {% block categories %}
  88. {% if categories %}
  89. <div class="widget">
  90. <h1>Category</h1>
  91. <ul>
  92. {% for category, article in categories%}
  93. <li><a href="{{ SITEURL }}/{{ category.url }}" >{{ category.name }} </a></li>
  94. {% endfor %}
  95. </ul>
  96. </div>
  97. {% endif %}
  98. {% endblock %}
  99. {% block tagcloud %}
  100. {% if tags %}
  101. <div class="widget">
  102. <h1>Tags</h1>
  103. <div style="max-width: 100px;">
  104. {% for tag, articles in tags %}
  105. <span><a href="{{ SITEURL }}/{{ tag.url }}">{{ tag.name }}</a></span>
  106. {% endfor %}
  107. </div>
  108. </div>
  109. {% endif %}
  110. {% endblock %}
  111. {% block links %}
  112. {% if LINKS %}
  113. <div class="widget">
  114. <h1>Links</h1>
  115. <ul>
  116. {% for name, link in LINKS %}
  117. <li><a href="{{ link }}">{{ name }}</a></li>
  118. {% endfor %}
  119. {% for name, link in SOCIAL %}
  120. <li><a href="{{ link }}">{{ name }}</a></li>
  121. {% endfor %}
  122. </ul>
  123. </div>
  124. {% endif %}
  125. {% endblock %}
  126. </section>
  127. {% endblock widgets %}
  128. <!--NOTE: Some templates put a block footer here.-->
  129. </body>
  130. </html>