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:

committed by
Anne Gentle

parent
b5a3060528
commit
c144be8993
@@ -6,3 +6,7 @@ OpenStack project.
|
|||||||
|
|
||||||
To use the theme, add ``'oslosphinx'`` to the ``extensions`` list in
|
To use the theme, add ``'oslosphinx'`` to the ``extensions`` list in
|
||||||
the ``conf.py`` file in your Sphinx project.
|
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.
|
||||||
|
@@ -1,10 +1,10 @@
|
|||||||
{% extends "basic/layout.html" %}
|
{% extends "basic/layout.html" %}
|
||||||
{% set css_files = css_files + ['_static/tweaks.css'] %}
|
{% set css_files = css_files + ['_static/tweaks.css'] %}
|
||||||
|
|
||||||
{%- macro sidebar() %}
|
{% block sidebar2 %}
|
||||||
{%- if not embedded %}{% if not theme_nosidebar|tobool %}
|
<div class="sphinxsidebar">
|
||||||
<div class="sphinxsidebar">
|
<div class="sphinxsidebarwrapper">
|
||||||
<div class="sphinxsidebarwrapper">
|
{%- if not embedded %}{% if not theme_nosidebar|tobool %}
|
||||||
{%- block sidebarlogo %}
|
{%- block sidebarlogo %}
|
||||||
{%- if logo %}
|
{%- if logo %}
|
||||||
<p class="logo"><a href="{{ pathto(master_doc) }}">
|
<p class="logo"><a href="{{ pathto(master_doc) }}">
|
||||||
@@ -12,6 +12,9 @@
|
|||||||
</a></p>
|
</a></p>
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- endblock %}
|
{%- endblock %}
|
||||||
|
{%- if theme_incubating|tobool %}
|
||||||
|
<h3 class="highlighted"><a href="https://wiki.openstack.org/wiki/Governance/NewProjects">{{ _('Incubated Project') }}</a></h3>
|
||||||
|
{%- endif %}
|
||||||
{%- block sidebartoc %}
|
{%- block sidebartoc %}
|
||||||
{%- if display_toc %}
|
{%- if display_toc %}
|
||||||
<h3><a href="{{ pathto(master_doc) }}">{{ _('Table Of Contents') }}</a></h3>
|
<h3><a href="{{ pathto(master_doc) }}">{{ _('Table Of Contents') }}</a></h3>
|
||||||
@@ -59,10 +62,10 @@
|
|||||||
<script type="text/javascript">$('#searchbox').show(0);</script>
|
<script type="text/javascript">$('#searchbox').show(0);</script>
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- endblock %}
|
{%- endblock %}
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{%- endif %}{% endif %}
|
{%- endif %}{% endif %}
|
||||||
{%- endmacro %}
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
{% block relbar1 %}{% endblock relbar1 %}
|
{% block relbar1 %}{% endblock relbar1 %}
|
||||||
|
|
||||||
|
@@ -91,4 +91,10 @@ div.body {
|
|||||||
div.document {
|
div.document {
|
||||||
width: 960px;
|
width: 960px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
div.sphinxsidebar h3.highlighted {
|
||||||
|
background-color: #cf2f19;
|
||||||
|
color: #EEE;
|
||||||
|
text-shadow: 1px 1px 0 #740101;
|
||||||
|
}
|
||||||
|
@@ -2,3 +2,6 @@
|
|||||||
inherit = basic
|
inherit = basic
|
||||||
stylesheet = nature.css
|
stylesheet = nature.css
|
||||||
pygments_style = tango
|
pygments_style = tango
|
||||||
|
|
||||||
|
[options]
|
||||||
|
incubating = false
|
||||||
|
Reference in New Issue
Block a user