{#
    sphinxdoc/layout.html
    ~~~~~~~~~~~~~~~~~~~~~

    Sphinx layout template for the sphinxdoc theme.

    :copyright: Copyright 2007-2013 by the Sphinx team, see AUTHORS.
    :license: BSD, see LICENSE for details.
#}
{%- extends "basic/layout.html" %}



{% block extrahead %}
    <link href='http://fonts.googleapis.com/css?family=Open+Sans:300,400,700'
          rel='stylesheet' type='text/css'>
{{ super() }}

{%- if not embedded %}
    <style type="text/css">
      table.right { float: right; margin-left: 20px; }
      table.right td { border: 1px solid #ccc; }
      {% if pagename == 'index' %}
      .related { display: none; }
      {% endif %}
    </style>
    <script type="text/javascript">
      // intelligent scrolling of the sidebar content
      $(window).scroll(function() {
        var sb = $('.sphinxsidebarwrapper');
        var win = $(window);
        var sbh = sb.height();
        var offset = $('.sphinxsidebar').position()['top'];
        var wintop = win.scrollTop();
        var winbot = wintop + win.innerHeight();
        var curtop = sb.position()['top'];
        var curbot = curtop + sbh;
        // does sidebar fit in window?
        if (sbh < win.innerHeight()) {
          // yes: easy case -- always keep at the top
          sb.css('top', $u.min([$u.max([0, wintop - offset - 10]),
                                $(document).height() - sbh - 200]));
        } else {
          // no: only scroll if top/bottom edge of sidebar is at
          // top/bottom edge of window
          if (curtop > wintop && curbot > winbot) {
            sb.css('top', $u.max([wintop - offset - 10, 0]));
          } else if (curtop < wintop && curbot < winbot) {
            sb.css('top', $u.min([winbot - sbh - offset - 20,
                                  $(document).height() - sbh - 200]));
          }
        }
      });
    </script>
{%- endif %}

{% endblock %}


{% block rootrellink %}
        <li><a href="{{ pathto('index') }}">Home</a>&nbsp;|</li>
       <!-- <li><a href="{{ pathto('contents') }}">Documentation</a> &raquo;</li>-->
{% endblock %}

{% block header %}
<div class="pageheader">
  <ul class="menu">
    <li class="index"><a href="{{ pathto('index') }}"><span></span></a></li>
    <li class="maintitle">{{ project }} - {{ version }}</li>
    <li class="current"><a href="{{ pathto('index') }}"><span>python docs</span></a></li>
    <li><a href="http://enlightenment.org/p.php?p=docs"><span>other docs</span></a></li>
    <li><a href="http://enlightenment.org/p.php?p=about"><span>EFL</span></a></li>
  </ul>
</div>
{% endblock %}

{%- block content %}
    <div class="document">
  {%- block document %}
      {{ sidebar() }}
      <div class="documentwrapper">
      {%- if render_sidebar %}
        <div class="bodywrapper">
      {%- endif %}
          <div class="body">
            {% block body %} {% endblock %}
          </div>
      {%- if render_sidebar %}
        </div>
      {%- endif %}
      </div>
  {%- endblock %}
      <div class="clearer"></div>
    </div>
{%- endblock %}

{%- block footer %}
<div class="footer">
  {% trans copyright=copyright|e %}&copy; Copyright {{ copyright }}.{% endtrans %}
  <br>
  {% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %}
  {% trans sphinx_version=sphinx_version|e %}Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> {{ sphinx_version }}.{% endtrans %}
</div>
{%- endblock %}
