Skip to content

Commit

Permalink
Initial import of astropy.sphinx into astropy_helpers.sphinx--mostly …
Browse files Browse the repository at this point in the history
…the same except for a few small tweaks to get it working under the name 'astropy_helpers'
  • Loading branch information
embray committed Mar 26, 2014
1 parent 7215c10 commit baaec2e
Show file tree
Hide file tree
Showing 10 changed files with 850 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sphinx_astropy_theme/bootstrap-astropy/globaltoc.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<h3>Table of Contents</h3>
{{ toctree(maxdepth=-1, titles_only=true) }}

94 changes: 94 additions & 0 deletions sphinx_astropy_theme/bootstrap-astropy/layout.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
{% extends "basic/layout.html" %}

{# Collapsible sidebar script from default/layout.html in Sphinx #}
{% set script_files = script_files + ['_static/sidebar.js'] %}

{# 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>
<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://sphinx.pocoo.org/">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 %}
3 changes: 3 additions & 0 deletions sphinx_astropy_theme/bootstrap-astropy/localtoc.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<h3>Page Contents</h3>
{{ toc }}

7 changes: 7 additions & 0 deletions sphinx_astropy_theme/bootstrap-astropy/searchbox.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{%- if pagename != "search" %}
<form action="{{ pathto('search') }}" method="get">
<input type="text" name="q" placeholder="Search" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
{%- endif %}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit baaec2e

Please sign in to comment.