{% extends "basic/layout.html" %}

{%- macro secondnav() %}
  {%- if prev %}
    &laquo; <a href="{{ prev.link|e }}" title="{{ prev.title|e }}">previous</a> 
    {{ reldelim2 }}
  {%- endif %}
  {%- if parents %}
    <a href="{{ parents.0.link|e }}" title="{{ parents.0.title|e }}" accesskey="U">up</a> 
  {%- else %}
    <a title="{{ docstitle }}" href="{{ pathto('index') }}" accesskey="U">up</a> 
  {%- endif %}
  {%- if next %}
  {{ reldelim2 }}
    <a href="{{ next.link|e }}" title="{{ next.title|e }}">next</a> &raquo;
  {%- endif %}
{%- endmacro %}

{%- macro createheader() %}
<div id="custom-doc" class="{% block bodyclass %}{{ 'yui-t6' if pagename not in
    ['screenshots', 'index', 'about', 'download', 'docs', 'news'] else '' }}{% endblock %}">
    <div id="hd">
        <div id='oldheader'>
            <div id="headercontent">
            <a href="{{ pathto('docs') }}" style='color:white;'><h1>puddletag</h1>
            <h2 style="margin-top: -50px; margin-left: 220px; font-size: 16px; font-weight: bold;"> - A tag editor for GNU/Linux (Documentation).</h2></a>
            </div>
        </div>
      <div id="global-nav">

        <a title='Docs' href="{{ pathto('docs') }}" style='{{ "color:yellow;" if pagename not in ["about", "download", "index", "screenshots", "news"] else ""}}'><b>Documentation</b></a> {{ reldelim2 }}
        <a title='About' href="{{ pathto('about') }}" style='{{ "color:yellow;" if pagename=="about" else ""}}'><b>About</b></a> {{ reldelim2 }}
        <a title='Website' href="http://puddletag.sourceforge.net"><b>Website</b></a>
      </div>
    </div>
{%- endmacro -%}

{%- macro createsidebar() %}
{% block sidebarwrapper %}
    <div class="yui-b" id="sidebar">
    <h3>You are here:</h3>
    <ul>
        <li>
            <a href="{{ pathto('index') }}">{{ docstitle }}</a>
            {% for p in parents %}
            <ul><li><a href="{{ p.link }}">{{ p.title }}</a>
            {% endfor %}
            <ul><li>{{ title }}</li></ul>
            {% for p in parents %}</li></ul>{% endfor %}
        </li>
    </ul>
    {%- block sidebartoc %}
    <h3>{{ _('Table Of Contents') }}</h3>
    {{ toctree(maxdepth=2) }}
    {%- endblock %}
    {%- if last_updated %}
        <h3>Last update:</h3>
        <p class="topless">{{ last_updated }}</p>
    {%- endif %}
    {% block sidebarrel %}
    <h3>Browse</h3>
    <ul>
        {% if prev %}
        <li>Prev: <a href="{{ prev.link }}">{{ prev.title }}</a></li>
        {% endif %}
        {% if next %}
        <li>Next: <a href="{{ next.link }}">{{ next.title }}</a></li>
        {% endif %}
    </ul>
    {% endblock %}
    {%- block sidebarsearch %}
    {{ super() }}
    {%- endblock %}
          </div>
{% endblock %}

{%- endmacro -%}

{% block extrahead %}
{{ super() }}
<script type="text/javascript">
(function($) {
    if (!django_template_builtins) {
       // templatebuiltins.js missing, do nothing.
       return;
    }
    $(document).ready(function() {
        // Hyperlink Django template tags and filters
        var base = "{{ pathto('ref/templates/builtins') }}";
        if (base == "#") {
            // Special case for builtins.html itself
            base = "";
        }
        // Tags are keywords, class '.k'
        $("div.highlight\\-html\\+django span.k").each(function(i, elem) {
             var tagname = $(elem).text();
             if ($.inArray(tagname, django_template_builtins.ttags) != -1) {
                 var fragment = tagname.replace(/_/, '-');
                 $(elem).html("<a href='" + base + "#" + fragment + "'>" + tagname + "</a>");
             }
        });
        // Filters are functions, class '.nf'
        $("div.highlight\\-html\\+django span.nf").each(function(i, elem) {
             var filtername = $(elem).text();
             if ($.inArray(filtername, django_template_builtins.tfilters) != -1) {
                 var fragment = filtername.replace(/_/, '-');
                 $(elem).html("<a href='" + base + "#" + fragment + "'>" + filtername + "</a>");
             }
        });
    });
})(jQuery);
</script>
{% endblock %}

{% block document %}
    {% if pagename != 'rss' %}
    {{ createheader() }}
    <div id="bd">
      <div id="yui-main">
        <div class="yui-b">
          <div class="yui-g" id="{{ pagename|replace('/', '-') }}">
            {% if pagename == 'screenshots' %}
                <div class='yui-s'>
            {% endif %}
    {% endif %}

    {% block body %}{% endblock %}

    {% if pagename != 'rss' %}
            {% if pagename == 'screenshots' %}
                </div>
            {% endif %}
          </div>

        </div>
      </div>
    
    
    {% if pagename not in ['about', 'download', 'index', 'screenshots', 'news', 'docs', 'rss'] %}
    {{ createsidebar() }}
    {% endif %}
    </div>

    <div id="ft">
      <div class="nav"><div style="text-align: left;">&copy; concentricpuddle 2008-2011. Template derived from the <a href="http://djangoproject.com">Django Docs</a>. Created using <a href="http://sphinx.pocoo.org">Sphinx</a>.</div></div>
      
    </div>
    
  </div>
{% endif %}
{% endblock %}

{# Empty some default blocks out #}
{% block relbar1 %}{% endblock %}
{% block relbar2 %}{% endblock %}
{% block sidebar1 %}{% endblock %}
{% block sidebar2 %}{% endblock %}
{% block footer %}{% endblock %}