diff options
author | Trevor Bramwell <tbramwell@linuxfoundation.org> | 2018-02-02 12:16:52 -0800 |
---|---|---|
committer | Ryota MIBU <r-mibu@cq.jp.nec.com> | 2018-02-06 10:42:15 +0900 |
commit | c1cbdfaf687437baba73fbbe5551907b6913f0a4 (patch) | |
tree | f95736a6c6af21304ed1dc7677c845559fd87bbe /opnfv-theme/sphinx_opnfv_theme | |
parent | fb7da06424c1a12ca0f2e1a2c4f1dd99f0adbb51 (diff) |
OPNFV Sphinx Theme
This is a standalone theme for OPNFV docs based on the Sphinx Bootstrap
Theme used in opnfvdocs.
Change-Id: Ie145c0dc9c1e4c1ed0d8d72d687524b4ef5883de
Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
Diffstat (limited to 'opnfv-theme/sphinx_opnfv_theme')
-rw-r--r-- | opnfv-theme/sphinx_opnfv_theme/__init__.py | 15 | ||||
-rw-r--r-- | opnfv-theme/sphinx_opnfv_theme/opnfv/layout.html | 5 | ||||
-rw-r--r-- | opnfv-theme/sphinx_opnfv_theme/opnfv/my_custom_sidebar.html | 3 | ||||
-rw-r--r-- | opnfv-theme/sphinx_opnfv_theme/opnfv/relations.html | 15 | ||||
-rwxr-xr-x | opnfv-theme/sphinx_opnfv_theme/opnfv/static/favicon.ico | bin | 0 -> 15086 bytes | |||
-rw-r--r-- | opnfv-theme/sphinx_opnfv_theme/opnfv/static/logo.png | bin | 0 -> 2829 bytes | |||
-rw-r--r-- | opnfv-theme/sphinx_opnfv_theme/opnfv/static/my-styles.css | 33 | ||||
-rw-r--r-- | opnfv-theme/sphinx_opnfv_theme/opnfv/theme.conf | 7 |
8 files changed, 78 insertions, 0 deletions
diff --git a/opnfv-theme/sphinx_opnfv_theme/__init__.py b/opnfv-theme/sphinx_opnfv_theme/__init__.py new file mode 100644 index 000000000..007927521 --- /dev/null +++ b/opnfv-theme/sphinx_opnfv_theme/__init__.py @@ -0,0 +1,15 @@ +"""OPNFV Sphinx Theme""" + +from os import path + +__version__='0.1.1' + + +def get_html_theme_path(): + """Return list of HTML theme paths.""" + local_path = path.abspath(path.dirname(__file__)) + return [local_path] + +def setup(app): + """Required by Sphinx to create the theme.""" + app.add_html_theme('opnfv', path.abspath(path.dirname(__file__))) diff --git a/opnfv-theme/sphinx_opnfv_theme/opnfv/layout.html b/opnfv-theme/sphinx_opnfv_theme/opnfv/layout.html new file mode 100644 index 000000000..ddd674cf1 --- /dev/null +++ b/opnfv-theme/sphinx_opnfv_theme/opnfv/layout.html @@ -0,0 +1,5 @@ +{# Import the theme's layout. #} +{% extends "bootstrap/layout.html" %} + +{# Custom CSS overrides #} +{% set css_files = css_files + ['_static/my-styles.css'] %} diff --git a/opnfv-theme/sphinx_opnfv_theme/opnfv/my_custom_sidebar.html b/opnfv-theme/sphinx_opnfv_theme/opnfv/my_custom_sidebar.html new file mode 100644 index 000000000..6b259bc93 --- /dev/null +++ b/opnfv-theme/sphinx_opnfv_theme/opnfv/my_custom_sidebar.html @@ -0,0 +1,3 @@ +<ul class="globaltoc"> +{{ toctree(maxdepth=theme_globaltoc_depth|toint, collapse=False,includehidden=theme_globaltoc_includehidden|tobool) }} +</ul>
\ No newline at end of file diff --git a/opnfv-theme/sphinx_opnfv_theme/opnfv/relations.html b/opnfv-theme/sphinx_opnfv_theme/opnfv/relations.html new file mode 100644 index 000000000..5bad0b562 --- /dev/null +++ b/opnfv-theme/sphinx_opnfv_theme/opnfv/relations.html @@ -0,0 +1,15 @@ +<center> +<div class="btn-group" role="group" aria-label="..."> + {% if prev %} + <a class="btn btn-default" href="{{ prev.link|e }}">Prev Page</a> + {% else %} + <button type="button" class="btn btn-default disabled">Prev Page</button> + {% endif %} + + {% if next %} + <a class="btn btn-default" href="{{ next.link|e }}">Next Page</a> + {% else %} + <button type="button" class="btn btn-default disabled">Next Page</button> + {% endif %} +</div> +</center>
\ No newline at end of file diff --git a/opnfv-theme/sphinx_opnfv_theme/opnfv/static/favicon.ico b/opnfv-theme/sphinx_opnfv_theme/opnfv/static/favicon.ico Binary files differnew file mode 100755 index 000000000..bbe55ab40 --- /dev/null +++ b/opnfv-theme/sphinx_opnfv_theme/opnfv/static/favicon.ico diff --git a/opnfv-theme/sphinx_opnfv_theme/opnfv/static/logo.png b/opnfv-theme/sphinx_opnfv_theme/opnfv/static/logo.png Binary files differnew file mode 100644 index 000000000..1519503eb --- /dev/null +++ b/opnfv-theme/sphinx_opnfv_theme/opnfv/static/logo.png diff --git a/opnfv-theme/sphinx_opnfv_theme/opnfv/static/my-styles.css b/opnfv-theme/sphinx_opnfv_theme/opnfv/static/my-styles.css new file mode 100644 index 000000000..8feb45bfd --- /dev/null +++ b/opnfv-theme/sphinx_opnfv_theme/opnfv/static/my-styles.css @@ -0,0 +1,33 @@ +body { + font-family: Helvetica, sans-serif; + font-size: 16px; +} + +body a { + color: #27CCC0; +} + +body a:hover { + color: #676767; +} + +.navbar-brand img { + height: 200%; + margin-top: -5%; +} + +.navbar, h1, h2, h3, h4, h5, h6 { + font-family: Helvetica, sans-serif; +} + +.navbar-text{ + color: #676767; +} + +.navbar-form.navbar-right{ + padding: 0; +} + +.navbar-form .form-control{ + width: 150px; +} diff --git a/opnfv-theme/sphinx_opnfv_theme/opnfv/theme.conf b/opnfv-theme/sphinx_opnfv_theme/opnfv/theme.conf new file mode 100644 index 000000000..66424aa1f --- /dev/null +++ b/opnfv-theme/sphinx_opnfv_theme/opnfv/theme.conf @@ -0,0 +1,7 @@ +[theme] +inherit = bootstrap +stylesheet = bootstrap-sphinx.css +pygments_style = tango + +# Theme Options exposed by html_theme_options +[options] |