{#- boilerplate/layout.html ~~~~~~~~~~~~~~~~~~~~~~~ Master layout template for Tinkerer blog themes. :copyright: Copyright 2011-2013 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) -%} {#- link to root url (like: '#', '../../') #} {%- 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 -%} {%- 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 "jquery" not in scriptfile.lower() -%} {%- 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) -%} {%- if date -%}
{{ date }}
{%- endif -%} {%- endmacro -%} {#- Author -#} {%- macro author(author_name) -%} {%- if author_name -%}
{{ text_posted_by }} {{ author_name }}
{%- endif -%} {%- endmacro -%} {#- Categories -#} {%- macro category_list(post_categories) -%} {%- if post_categories -%}
{{ text_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 -%}
{{ text_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) }} {%- block post_meta_extra -%}{%- endblock -%}
{%- endmacro -%} {%- macro html_tag() -%} xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://ogp.me/ns#" xmlns:fb="https://www.facebook.com/2008/fbml" {%- endmacro -%} {{ metatags }} {%- block htmltitle -%} {{ title|striptags|e }}{{ titlesuffix }} {%- endblock %} {%- block css %} {%- if style not in ['none', 'main.css'] %} {%- endif %} {%- endblock %} {{ css() }} {%- if not embedded -%} {%- if favicon -%} {%- endif -%} {%- block headjs -%} {% endblock -%} {%- if use_opensearch -%} {%- endif -%} {%- endif -%} {%- block linktags -%} {%- if hasdoc('about') -%} {%- endif -%} {%- if hasdoc('genindex') -%} {%- endif -%} {%- if hasdoc('search') -%} {%- 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 -%}
{#- Comment plug-in initialization -#} {%- if comment_enabler -%}{{ comment_enabler }}{%- endif -%}