diff options
author | Graham Hayes <graham.hayes@hp.com> | 2014-07-01 17:10:33 +0100 |
---|---|---|
committer | Anne Gentle <anne@openstack.org> | 2014-07-02 13:28:28 -0500 |
commit | c144be899391901c34d8ad5a87e457325d8774fb (patch) | |
tree | 89f653c9acd813d7aaa5d8e869ab80bb36290566 | |
parent | b5a3060528d7c014f8d886f11c9de53a41675549 (diff) | |
download | oslosphinx-c144be899391901c34d8ad5a87e457325d8774fb.tar.gz |
Added a incubating project config option2.2.0.0a2
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
-rw-r--r-- | README.rst | 4 | ||||
-rw-r--r-- | oslosphinx/theme/openstack/layout.html | 17 | ||||
-rw-r--r-- | oslosphinx/theme/openstack/static/tweaks.css | 8 | ||||
-rw-r--r-- | oslosphinx/theme/openstack/theme.conf | 3 |
4 files changed, 24 insertions, 8 deletions
@@ -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. diff --git a/oslosphinx/theme/openstack/layout.html b/oslosphinx/theme/openstack/layout.html index 36bdbdb..1523bd0 100644 --- a/oslosphinx/theme/openstack/layout.html +++ b/oslosphinx/theme/openstack/layout.html @@ -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 %} diff --git a/oslosphinx/theme/openstack/static/tweaks.css b/oslosphinx/theme/openstack/static/tweaks.css index 3f3fb3f..9d5c103 100644 --- a/oslosphinx/theme/openstack/static/tweaks.css +++ b/oslosphinx/theme/openstack/static/tweaks.css @@ -91,4 +91,10 @@ div.body { div.document { width: 960px; margin: 0 auto; -}
\ No newline at end of file +} + +div.sphinxsidebar h3.highlighted { + background-color: #cf2f19; + color: #EEE; + text-shadow: 1px 1px 0 #740101; +} diff --git a/oslosphinx/theme/openstack/theme.conf b/oslosphinx/theme/openstack/theme.conf index 1cc4004..e2b8bfe 100644 --- a/oslosphinx/theme/openstack/theme.conf +++ b/oslosphinx/theme/openstack/theme.conf @@ -2,3 +2,6 @@ inherit = basic stylesheet = nature.css pygments_style = tango + +[options] +incubating = false |