diff options
Diffstat (limited to 'nikola/data/themes/base-jinja/templates/base_header.tmpl')
| -rw-r--r-- | nikola/data/themes/base-jinja/templates/base_header.tmpl | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/nikola/data/themes/base-jinja/templates/base_header.tmpl b/nikola/data/themes/base-jinja/templates/base_header.tmpl new file mode 100644 index 0000000..1001db3 --- /dev/null +++ b/nikola/data/themes/base-jinja/templates/base_header.tmpl @@ -0,0 +1,66 @@ +{# -*- coding: utf-8 -*- #} +{% import 'base_helper.tmpl' as base with context %} + +{% macro html_header() %} + <header id="header" role="banner"> + {{ html_site_title() }} + {{ html_translation_header() }} + {{ html_navigation_links() }} + {% if search_form %} + <div class="searchform" role="search"> + {{ search_form }} + </div> + {% endif %} + </header> + {{ template_hooks['page_header']() }} +{% endmacro %} + +{% macro html_site_title() %} + <h1 id="brand"><a href="{{ abs_link('/') }}" title="{{ blog_title }}" rel="home"> + {% if logo_url %} + <img src="{{ logo_url }}" alt="{{ blog_title }}" id="logo"> + {% endif %} + + {% if show_blog_title %} + <span id="blog-title">{{ blog_title }}</span> + {% endif %} + </a></h1> +{% endmacro %} + +{% macro html_navigation_links() %} + <nav id="menu" role="navigation"> + <ul> + {% for url, text in navigation_links[lang] %} + {% if url is mapping %} + <li> {{ text }} + <ul> + {% for suburl, text in url %} + {% if rel_link(permalink, suburl) == "#" %} + <li class="active"><a href="{{ permalink }}">{{ text }}</a></li> + {% else %} + <li><a href="{{ suburl }}">{{ text }}</a></li> + {% endif %} + {% endfor %} + </ul> + {% else %} + {% if rel_link(permalink, url) == "#" %} + <li class="active"><a href="{{ permalink }}">{{ text }}</a></li> + {% else %} + <li><a href="{{ url }}">{{ text }}</a></li> + {% endif %} + {% endif %} + {% endfor %} + {{ template_hooks['menu']() }} + {{ template_hooks['menu_alt']() }} + </ul> + </nav> +{% endmacro %} + +{% macro html_translation_header() %} + {% if translations|length > 1 %} + <div id="toptranslations"> + <h2>{{ messages("Languages:") }}</h2> + {{ base.html_translations() }} + </div> + {% endif %} +{% endmacro %} |
