{#- boilerplate/layout.html ~~~~~~~~~~~~~~~~~~~~~~~ Master layout template for Tinkerer blog themes. :copyright: Copyright 2011-2012 by Vlad Riscutia and contributors (see CONTRIBUTORS file). :license: FreeBSD. Parts of this file are licensed under BSD license. See LICENSE file. -#} {#- Doctype -#} {%- block doctype -%} {%- endblock -%} {%- set render_sidebar = (not embedded) and (not theme_nosidebar|tobool) and (sidebars != []) -%} {%- set url_root = pathto('', 1) -%} {%- if not embedded and docstitle -%} {%- set titlesuffix = " — "|safe + docstitle|e -%} {%- else -%} {%- set titlesuffix = "" -%} {%- endif -%} {%- set prevchar = prevchar is not defined and ' « ' or prevchar -%} {%- set nextchar = nextchar is not defined and ' » ' or nextchar -%} {%- set archivechar = archivechar is not defined and ' — ' or archivechar -%} {%- if rss_service -%} {%- set rss_feed_link = rss_service -%} {%- else -%} {%- set rss_feed_link = pathto('rss') -%} {%- endif -%} {%- set rss_in_page_nav = rss_in_page_nav is not defined or rss_in_page_nav -%} {%- set rss_link_text = rss_link_text is not defined and None or rss_link_text -%} {%- set rss_symbol = rss_symbol is not defined or rss_symbol -%} {%- set timestamp_format = timestamp_format is not defined and '%B %d, %Y' or timestamp_format -%} {%- set timestamp_short_format = timestamp_short_format is not defined and '%b %d' or timestamp_short_format -%} {%- macro script() -%} {%- for scriptfile in script_files -%} {#- Hack to filter out jquery.js auto-included by Sphinx since jquery is already included in head. -#} {%- if scriptfile != "_static/jquery.js" -%} {%- endif -%} {%- endfor -%} {%- endmacro -%} {%- macro css() -%} {%- for cssfile in css_files -%} {%- endfor -%} {%- endmacro -%} {#- RSS link -#} {%- macro rss_link() -%}
{%- if rss_symbol -%}B{%- endif -%} {% if rss_link_text -%}{{ rss_link_text }}{% endif -%}
{%- endmacro -%} {#- prev/next -#} {%- macro relbar() -%} {%- if prev or next -%} {%- endif -%} {%- endmacro -%} {#- Timestamp -#} {%- macro timestamp(date, fmt) -%} {%- if date -%}
{{ date.strftime(fmt) }}
{%- endif -%} {%- endmacro -%} {#- Author -#} {%- macro author(author_name) -%} {%- if author_name -%}
Posted by {{ author_name }}
{%- endif -%} {%- endmacro -%} {#- Categories -#} {%- macro category_list(post_categories) -%} {%- if post_categories -%}
Filed under: {% for link, category in post_categories -%} {{ category }} {%- if not loop.last -%}, {% endif -%} {% endfor -%}
{%- endif -%} {%- endmacro -%} {#- Tags -#} {%- macro tag_list(post_tags) -%} {%- if post_tags -%}
Tags: {% for link, tag in post_tags -%} {{ tag }} {%- if not loop.last -%}, {% endif -%} {% endfor -%}
{%- endif -%} {%- endmacro -%} {#- Comment count -#} {%- macro comment_count(code) -%} {%- if code -%}
{{ code }}
{%- endif -%} {%- endmacro -%} {#- Post metadata -#} {%- macro post_meta(metadata, comment_count_code=None) -%}
{{ author(metadata.author) }} {{ category_list(metadata.filing["categories"]) }} {{ tag_list(metadata.filing["tags"]) }} {{ comment_count(comment_count_code) }}
{%- endmacro -%} {{ metatags }} {%- block htmltitle -%} {{ title|striptags|e }}{{ titlesuffix }} {%- endblock -%} {{ css() }} {%- if not embedded -%} {%- if favicon -%} {%- endif -%} {%- if use_opensearch -%} {%- endif -%} {%- endif -%} {%- block linktags -%} {%- if hasdoc('about') -%} {%- endif -%} {%- if hasdoc('genindex') -%} {%- endif -%} {%- if hasdoc('search') -%} {%- endif -%} {%- if hasdoc('copyright') -%} {%- endif -%} {%- if parents -%} {%- endif -%} {%- if next -%} {%- endif -%} {%- if prev -%} {%- endif -%} {%- endblock -%} {%- if not embedded -%} {{ script() }} {%- endif -%} {%- block extrahead -%} {% endblock -%}
{%- block header -%}

{{ shorttitle|e }}

{{ tagline|e }}

{% endblock -%} {%- block navigation -%} {%- endblock -%}
{%- block content -%}
{%- block document -%}
{%- block relbar1 -%}{{ relbar() }}{% endblock -%}
{% block body -%} {% endblock -%}
{%- block relbar2 -%}{{ relbar() }}{% endblock -%}
{%- endblock -%} {%- if render_sidebar -%} {%- endif -%}
{%- endblock -%}
{%- block footer -%}
{%- if show_copyright -%} {% trans copyright=copyright|e -%}© Copyright {{ copyright }}. {% endtrans -%} {%- endif -%} {%- if show_sphinx -%} Powered by Tinkerer and Sphinx. {%- endif -%}
{%- endblock -%}
{#- Comment plug-in initialization -#} {%- if comment_enabler -%}{{ comment_enabler }}{%- endif -%}