Skip to content

Instantly share code, notes, and snippets.

@meker12
Created March 12, 2015 02:18
Show Gist options
  • Save meker12/98a90bebf22e937048e9 to your computer and use it in GitHub Desktop.
Save meker12/98a90bebf22e937048e9 to your computer and use it in GitHub Desktop.
Sphinxsidebar header and sidebarheaderwrapper versus DRC sidebar.html
{%- macro sidebar() %}
{%- if not embedded %}{% if not theme_nosidebar|tobool %}
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
{%- block sidebarlogo %}
{%- if logo %}
<p class="brand"><a href="{{ pathto(master_doc) }}">
<img class="brand" src="{{ pathto('_static/' + brand, 1) }}" alt="Logo"/>
</a></p>
{%- endif %}
{%- endblock %}
{%- block sidebartoc %}
{%- if display_toc %}
<h3><a href="{{ pathto(master_doc) }}">{{ _('Table Of Contents') }}</a></h3>
{{ toc }}
{%- endif %}
{%- endblock %}
{%- block sidebarrel %}
{%- if prev %}
<h4>{{ _('Previous topic') }}</h4>
<p class="topless"><a href="{{ prev.link|e }}"
title="{{ _('previous chapter') }}">{{ prev.title }}</a></p>
{%- endif %}
{%- if next %}
<h4>{{ _('Next topic') }}</h4>
<p class="topless"><a href="{{ next.link|e }}"
title="{{ _('next chapter') }}">{{ next.title }}</a></p>
{%- endif %}
{%- endblock %}
{%- block sidebarsourcelink %}
{%- if show_source and has_source and sourcename %}
<h3>{{ _('This Page') }}</h3>
<ul class="this-page-menu">
<li><a href="{{ pathto('_sources/' + sourcename, true)|e }}"
rel="nofollow">{{ _('Show Source') }}</a></li>
</ul>
{%- endif %}
{%- endblock %}
{%- if customsidebar %}
{% include customsidebar %}
{%- endif %}
{%- block sidebarsearch %}
{%- if pagename != "search" %}
<div id="searchbox" style="display: none">
<h3>{{ _('Quick search') }}</h3>
<form class="search" action="{{ pathto('search') }}" method="get">
<input type="text" name="q" size="18" />
<input type="submit" value="{{ _('Go') }}" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
<p class="searchtip" style="font-size: 90%">
{{ _('Enter search terms or a module, class or function name.') }}
</p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
{%- endif %}
{%- endblock %}
</div>
</div>
{%- endif %}{% endif %}
{%- endmacro %}
#DRC sidebar.html
<div class="toctree-wrapper compound">
<ul class="simple">
</ul>
</div>
</div>
<div class="clearer"></div>
</div>
</div>
<div class="col-md-3 col-md-pull-9 sidebar">
<ul>
<li><a href="/" class="back">&laquo; Developer Home</a></li>
</ul>
<ul>
{% if next %}
<a href="{{ prev.link|e }}"><<</a>
{% endif %}
|
{% if prev %}
<a href="{{ next.link|e }}">>></a>
{% endif %}
<li><span class="sidebarheader">Contents</span></li>
</ul>
{{ toctree() }}
<div class="callout">
<span class="sidebarheader">Need Help?</span>
<p>
E-mail <a href="mailto:sdk-support@rackspace.com">sdk-support@rackspace.com</a>,<br>
tweet <a href="https://twitter.com/rackspace">@rackspace</a>,
chat with us in #rackspace on Freenode,
or post in <a href="https://community.rackspace.com/developers/default">our developer forum</a>.
</p>
</div>
<div class="callout">
<span class="sidebarheader">Found a bug? Caught a typo?</span>
<p>File a <a href="https://github.com/rackerlabs/developer.rackspace.com/issues/new">bug report</a> or submit a <a target="blank" href="https://github.com/rackerlabs/developer.rackspace.com">pull request</a> on our developer site Github repo.</p>
</div>
<div class="callout">
<span class="sidebarheader">Want To Stay Up To Date?</span>
<p>Subscribe to our developer blog <a href="/atom.xml">RSS</a> feed.</p>
</div>
</div>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment