{%- 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">
	<div class="flex-container">
	<div class="logo">
	  <a href="{{ theme_home_uri }}">
	    <img src="{{logo_url}}"/>
	  </a>
	  <h5>pygame documentation</h5>
	</div>
	<div 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  %}
</div>
</div>
  </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 %}
