Added a incubating project config option

This allows projects that are currently incubated to use oslosphinx

To use a project needs to set

'html_theme_options = {'incubating': True}'

in their sphinx conf.py

This is option reflected by changing the side bar to have a bar
at the top that shows 'Incubated Project'

Change-Id: Ib5a06ac1749fec475d326afe19f16fffb8c7d4a7
This commit is contained in:
Graham Hayes 2014-07-01 17:10:33 +01:00 committed by Anne Gentle
parent b5a3060528
commit c144be8993
4 changed files with 24 additions and 8 deletions

View File

@ -6,3 +6,7 @@ OpenStack project.
To use the theme, add ``'oslosphinx'`` to the ``extensions`` list in
the ``conf.py`` file in your Sphinx project.
If you are an incubating project, set:
``html_theme_options = {'incubating': True}`` in your conf.py as well, to enable the Incubation theme.

View File

@ -1,10 +1,10 @@
{% extends "basic/layout.html" %}
{% set css_files = css_files + ['_static/tweaks.css'] %}
{%- macro sidebar() %}
{%- if not embedded %}{% if not theme_nosidebar|tobool %}
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
{% block sidebar2 %}
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
{%- if not embedded %}{% if not theme_nosidebar|tobool %}
{%- block sidebarlogo %}
{%- if logo %}
<p class="logo"><a href="{{ pathto(master_doc) }}">
@ -12,6 +12,9 @@
</a></p>
{%- endif %}
{%- endblock %}
{%- if theme_incubating|tobool %}
<h3 class="highlighted"><a href="https://wiki.openstack.org/wiki/Governance/NewProjects">{{ _('Incubated Project') }}</a></h3>
{%- endif %}
{%- block sidebartoc %}
{%- if display_toc %}
<h3><a href="{{ pathto(master_doc) }}">{{ _('Table Of Contents') }}</a></h3>
@ -59,10 +62,10 @@
<script type="text/javascript">$('#searchbox').show(0);</script>
{%- endif %}
{%- endblock %}
</div>
</div>
{%- endif %}{% endif %}
{%- endmacro %}
</div>
</div>
{% endblock %}
{% block relbar1 %}{% endblock relbar1 %}

View File

@ -91,4 +91,10 @@ div.body {
div.document {
width: 960px;
margin: 0 auto;
}
}
div.sphinxsidebar h3.highlighted {
background-color: #cf2f19;
color: #EEE;
text-shadow: 1px 1px 0 #740101;
}

View File

@ -2,3 +2,6 @@
inherit = basic
stylesheet = nature.css
pygments_style = tango
[options]
incubating = false