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

{%- block scripts %}
    {{ super() }}
    <script type="text/javascript" src="{{ pathto('_static/sidebar.js', 1) }}"></script>
    {% if not embedded %}<script type="text/javascript" src="{{ pathto('_static/copybutton.js', 1) }}"></script>{% endif %}
{%- endblock %}

{# Add the google webfonts needed for the logo #}
{% block extrahead %}
    <link href='https://fonts.googleapis.com/css?family=Source+Sans+Pro:200,600' rel='stylesheet' type='text/css'/>
{% endblock %}

{% block header %}
<div class="topbar">
  <a class="brand" title="{{ _('Documentation Home') }}" href="{{ pathto(master_doc) }}"><span id="logotext1">{{ theme_logotext1 }}</span><span id="logotext2">{{ theme_logotext2 }}</span><span id="logotext3">{{ theme_logotext3 }}</span></a>
  <ul>
    {% if theme_astropy_project_menubar == true %}
    <li>
        <div class="dropdown">
            <a href = "#">About</a>
            <div class="dropdown-content">
                 <ul>
                    <li><a href="http://www.astropy.org/about.html">About Astropy</a></li>
                    <li><a href="http://www.astropy.org/code_of_conduct.html">Code of Conduct</a></li>
                    <li><a href="http://www.astropy.org/acknowledging.html">Acknowledging & Citing</a></li>
                  </ul>
            </div>
        </div>
    </li>
    <li><a href="http://www.astropy.org/help.html">Get Help</a></li>
    <li><a href="http://www.astropy.org/contribute.html">Contribute</a></li>
    <li><a href="http://www.astropy.org/affiliated/index.html">Affiliated Packages</a></li>
    <li><a href="http://www.astropy.org/team.html">Team</a></li>
    {% endif %}
    <li><a class="homelink" title="Astropy Homepage" href="http://www.astropy.org"></a></li>
    <li><a title="{{ _('General Index') }}" href="{{ pathto('genindex') }}">Index</a></li>
    <li><a title="{{ _('Module Index') }}" href="{{ pathto('py-modindex') }}">Modules</a></li>
    <li>
      {% block sidebarsearch %}
      {% include "searchbox.html" %}
      {% endblock %}
    </li>
  </ul>
</div>
{% endblock %}

{% block relbar1 %}
<div class="related">
    <h3>{{ _('Navigation') }}</h3>
    <ul>
      {%- if next %}
      <li class="right">
	<a href="{{ next.link|e }}" title="{{ next.title|striptags|e }}">
	  next {{ "&raquo;"|safe }}
	</a>
      </li>
      {%- endif %}
      {%- if prev %}
      <li class="right">
	<a href="{{ prev.link|e }}" title="{{ prev.title|striptags|e }}">
	  {{ "&laquo;"|safe }} previous
	</a>
	{% if next %}{{ reldelim2 }}{% endif %}
      </li>
      {%- endif %}
      {%- block rootrellink %}
      <li>
	<a href="{{ pathto(master_doc) }}">{{ shorttitle|e }}</a>
	{{ reldelim1 }}
      </li>
      {%- endblock %}
      {%- for parent in parents %}
      <li><a href="{{ parent.link|e }}" {% if loop.last %}{{ accesskey("U") }}{% endif %}>{{ parent.title }}</a>{{ reldelim1 }}</li>
      {%- endfor %}
      {# Don't put the title in the relbar for the first (index) page. #}
      {% if prev %}<li>{{ title }}</li>{% endif %}
      {%- block relbaritems %} {% endblock %}
    </ul>
</div>
{% endblock %}

{# Silence the bottom relbar. #}
{% block relbar2 %}{% endblock %}


{%- block footer %}
<footer class="footer">
  <p class="pull-right">
    {%- if edit_on_github %}
    <a href="{{ edit_on_github }}">{{ edit_on_github_page_message }}</a> &nbsp;
    {%- endif %}
    {%- if show_source and has_source and sourcename %}
    <a href="{{ pathto('_sources/' + sourcename, true)|e }}"
       rel="nofollow">{{ _('Page Source') }}</a>
    {%- endif %} &nbsp;
    <a href="#">Back to Top</a></p>
  <p>
    {%- if show_copyright %}
    {%- if hasdoc('copyright') %}
    {% trans path=pathto('copyright'), copyright=copyright|e %}&copy; <a href="{{ path }}">Copyright</a> {{ copyright }}.{% endtrans %}<br/>
    {%- else %}
    {% trans copyright=copyright|e %}&copy; Copyright {{ copyright }}.{% endtrans %}<br/>
    {%- endif %}
    {%- endif %}
    {%- if show_sphinx %}
    {% trans sphinx_version=sphinx_version|e %}Created using <a href="http://www.sphinx-doc.org/en/stable/">Sphinx</a> {{ sphinx_version }}.{% endtrans %} &nbsp;
    {%- endif %}
    {%- if last_updated %}
    {% trans last_updated=last_updated|e %}Last built {{ last_updated }}.{% endtrans %} <br/>
    {%- endif %}
  </p>
</footer>
{%- endblock %}
