{%- extends "!layout.html" %}

{%- if not theme_relbar %}
{%-   block relbar1 %}{# Do not want bar across the top #}{% endblock %}
{%- endif %}

{#- Classic header with Snakey on the left, page links on the right.
 #}
{%- macro header() %}
  <div class="header">
    <table>
      <tr>
	<td class="logo">
	  <a href="{{ theme_home_uri }}">
{%-         set logo_path = '_static/' + logo %}
	    <img src="{{ pathto(logo_path, 1) }}"/>
	  </a>
	  <h5>pygame documentation</h5>
	</td>
	<td class="pagelinks">
	  <div class="top">
	    <a href="{{ theme_home_uri }}">Pygame Home</a> ||
	    <a href="{{ pathto(master_doc) }}">Help Contents</a> ||
	    <a href="{{ pathto('genindex') }}">Reference Index</a>

        <form action="{{ pathto('search') }}" method="get" style="display:inline;float:right;">
          <input name="q" value="" type="text">
          <input value="search" type="submit">
        </form>
	  </div>
	  <hr style="color:black;border-bottom:none;border-style: dotted;border-bottom-style:none;">
{#-

We render three sets of items based on how useful to most apps.

#}
{%- set basic = ['Color', 'display', 'draw', 'event', 'font', 'image', 'key', 'locals', 'mixer', 'mouse', 'music', 'pygame', 'Rect', 'Surface', 'time'] %}
{%- set advanced = ['BufferProxy', 'freetype', 'gfxdraw', 'midi', 'PixelArray', 'pixelcopy', 'sndarray', 'surfarray', 'cursors', 'joystick', 'mask', 'math', 'sprite', 'transform'] %}
{%- set hidden = ['Overlay', 'cdrom', 'sdl2_video', 'sdl2_controller'] %}
{%-   if pyg_sections %}
	  <p class="bottom"><b>Most useful stuff</b>:
{%      set sep = joiner(" | \n") %}
{%-     for section in pyg_sections %}
{%-       set docname = section['docname'] %}
{%-       set simpledocname = docname.split('/')[-1] %}
{%-       set name = section['fullname'].split('.')[-1] %}
{%-       set uri = pathto(docname, 1) + file_suffix -%}
{%-       if name|lower != simpledocname %}
{%-         set uri = uri + '#' + section['refid'] %}
{%-       endif %}
{%-       if name in basic %}
{{- sep() }}	    <a href="{{ uri }}">{{ name }}</a>
{%-       endif %}
{%-     endfor %}
	  </p>

	  <p class="bottom"><b>Advanced stuff</b>:
{%      set sep = joiner(" | \n") %}
{%-     for section in pyg_sections %}
{%-       set docname = section['docname'] %}
{%-       set simpledocname = docname.split('/')[-1] %}
{%-       set name = section['fullname'].split('.')[-1] %}
{%-       set uri = pathto(docname, 1) + file_suffix -%}
{%-       if name|lower != simpledocname %}
{%-         set uri = uri + '#' + section['refid'] %}
{%-       endif %}
{%-       if name in advanced %}
{{- sep() }}	    <a href="{{ uri }}">{{ name }}</a>
{%-       endif %}
{%-     endfor %}
	  </p>

	  <p class="bottom"><b>Other</b>:
{%      set sep = joiner(" | \n") %}
{%-     for section in pyg_sections %}
{%-       set docname = section['docname'] %}
{%-       set simpledocname = docname.split('/')[-1] %}
{%-       set name = section['fullname'].split('.')[-1] %}
{%-       set uri = pathto(docname, 1) + file_suffix -%}
{%-       if name|lower != simpledocname %}
{%-         set uri = uri + '#' + section['refid'] %}
{%-       endif %}
{%-       if name not in basic and name not in advanced and name not in hidden %}
{{- sep() }}	    <a href="{{ uri }}">{{ name }}</a>
{%-       endif %}
{%-     endfor %}
	  </p>


{%-   endif  %}
	</td>
      </tr>
    </table>
  </div>
{%- endmacro %}

{%- block body %}
{%-   block section %}{% endblock %}

<br /><br />
<hr />
<a href="{{ edit_on_github_url }}" rel="nofollow">{{ _('Edit on GitHub') }}</a>
{%- endblock %}


{%- block relbaritems %}
    <script type="text/javascript" src="https://www.pygame.org/comment/jquery.plugin.docscomments.js"></script>
{% endblock %}
