site_opytex/theme/templates/base.html

144 lines
4.7 KiB
HTML
Raw Normal View History

2019-07-18 10:43:36 +00:00
{% if 'jinja2.ext.i18n' not in JINJA_ENVIRONMENT.extensions and 'jinja2.ext.i18n' not in JINJA_EXTENSIONS %}
{% macro _(msg) %}
{{ msg % kwargs }}
{% endmacro %}
{% endif %}
<!DOCTYPE html>
<html lang="{{ DEFAULT_LANG }}">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="HandheldFriendly" content="True" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
{% if page in hidden_pages %}
<meta name="robots" content="noindex, nofollow" />
{% else %}
<meta name="robots" content="{{ ROBOTS }}" />
{% endif %}
{% if USE_GOOGLE_FONTS != False %}
<link href="https://fonts.googleapis.com/css?family=Source+Code+Pro|Source+Sans+Pro:300,400,400i,700" rel="stylesheet">
{% endif %}
{% if USE_LESS %}
<link rel="stylesheet/less" type="text/css" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/stylesheet/style.less">
<script src="//cdnjs.cloudflare.com/ajax/libs/less.js/2.5.1/less.min.js" type="text/javascript"></script>
{% else %}
<link rel="stylesheet" type="text/css" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/stylesheet/style.min.css">
{% endif %}
<link rel="stylesheet" type="text/css" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/pygments/{{ PYGMENTS_STYLE|default('github') }}.min.css">
<link rel="stylesheet" type="text/css" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/font-awesome/css/font-awesome.min.css">
{% if CUSTOM_CSS %}
<link href="{{ SITEURL }}/{{ CUSTOM_CSS }}" rel="stylesheet">
{% endif %}
{% if FEED_ALL_ATOM %}
<link href="{{ FEED_DOMAIN }}/{{ FEED_ALL_ATOM }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} Atom">
{% endif %}
{% if FEED_ALL_RSS %}
<link href="{{ FEED_DOMAIN }}/{{ FEED_ALL_RSS }}" type="application/rss+xml" rel="alternate" title="{{ SITENAME }} RSS">
{% endif %}
{% if FAVICON %}
<link rel="shortcut icon" href="{{ FAVICON }}" type="image/x-icon">
<link rel="icon" href="{{ FAVICON }}" type="image/x-icon">
{% endif %}
{% if BROWSER_COLOR %}
<!-- Chrome, Firefox OS and Opera -->
<meta name="theme-color" content="{{ BROWSER_COLOR }}">
<!-- Windows Phone -->
<meta name="msapplication-navbutton-color" content="{{ BROWSER_COLOR }}">
<!-- iOS Safari -->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<!-- Microsoft EDGE -->
<meta name="msapplication-TileColor" content="{{ BROWSER_COLOR }}">
{% endif %}
{% block meta %}
<meta name="author" content="{{ AUTHOR }}" />
<meta name="description" content="{{ SITEDESCRIPTION }}" />
{% include "partial/og.html" %}
{% endblock %}
<title>{{ SITENAME }}{% block title %}{% endblock %}</title>
</head>
<body>
<aside>
<div>
<!--
<a href="{{ SITEURL }}">
2019-07-18 10:43:36 +00:00
{% if SITELOGO %}
<img src="{{ SITELOGO }}" alt="{{ SITETITLE }}" title="{{ SITETITLE }}">
{% else %}
<img src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/img/profile.png" alt="{{ SITETITLE }}" title="{{ SITETITLE }}">
{% endif %}
</a>
-->
<h1><a href="/">{{ SITETITLE }}</a></h1>
2019-07-18 10:43:36 +00:00
{% if SITESUBTITLE %}<p><a href="{{ SITEURL }}">{{ SITESUBTITLE }}</a></p>{% endif %}
</div>
2019-07-18 10:43:36 +00:00
<nav>
2020-06-25 14:10:24 +00:00
{% if TOCTREE %}
{% include "partial/toctree.html" %}
2020-06-25 14:10:24 +00:00
{% endif %}
{% if pages or LINKS%}
2019-07-18 10:43:36 +00:00
<ul class="list">
{% if not PAGES_SORT_ATTRIBUTE -%}
{% set PAGES_SORT_ATTRIBUTE = 'title' %}
{% endif %}
{% if DISPLAY_PAGES_ON_SIDE %}
{% for page in pages|sort(attribute=PAGES_SORT_ATTRIBUTE) %}
<li><a href="{{ SITEURL }}/{{ page.url }}{% if not DISABLE_URL_HASH %}#{{ page.slug }}{% endif %}">{{ page.title }}</a></li>
{% endfor %}
{% endif %}
2019-07-18 10:43:36 +00:00
{% for name, link in LINKS %}
<li><a href="{{ link }}" target="_blank">{{ name }}</a></li>
2019-07-18 10:43:36 +00:00
{% endfor %}
</ul>
{% endif %}
2020-06-25 14:10:24 +00:00
2019-07-18 10:43:36 +00:00
</nav>
</aside>
<main>
{% if MAIN_MENU %}
<nav>
{% for title, link in MENUITEMS %}
<a href="{{ link }}">{{ title }}</a>
{% endfor %}
{% if FEED_ALL_ATOM %}
<a href="{{ FEED_DOMAIN }}/{{ FEED_ALL_ATOM }}">{{ _('Atom') }}</a>
{% endif %}
{% if FEED_ALL_RSS %}
<a href="{{ FEED_DOMAIN }}/{{ FEED_ALL_RSS }}">{{ _('RSS') }}</a>
{% endif %}
</nav>
{% endif %}
{% block content %}
{% endblock %}
<footer>
{% if CC_LICENSE %}
{% include "partial/cc_license.html" %}
{% else %}
{% include "partial/copyright.html" %}
{% endif %}
</footer>
</main>
{% block additional_js %}{% endblock %}
</body>
</html>