Switch theme and add report issue 17/66417/2
authorRich Bennett <rb2745@att.com>
Tue, 11 Sep 2018 11:38:05 +0000 (07:38 -0400)
committerRich Bennett <rb2745@att.com>
Thu, 13 Sep 2018 17:52:19 +0000 (17:52 +0000)
Switch to sphinx_rtd_theme
Add report issue in Jira with current page/release context

Change-Id: Ie237ee4d084f2b8bd025acc7499d19563f6e3e68
Issue-ID: DOC-310
Signed-off-by: Rich Bennett <rb2745@att.com>
docs/_static/css/ribbon.css [new file with mode: 0644]
docs/_templates/layout.html [new file with mode: 0644]
docs/conf.py
docs/index.rst
tox.ini

diff --git a/docs/_static/css/ribbon.css b/docs/_static/css/ribbon.css
new file mode 100644 (file)
index 0000000..b378f43
--- /dev/null
@@ -0,0 +1,36 @@
+.ribbon {
+  z-index: 1000;
+  background-color: #a00;
+  overflow: hidden;
+  white-space: nowrap;
+  position: fixed;
+  top: 25px;
+  right: -50px;
+  -webkit-transform: rotate(45deg);
+     -moz-transform: rotate(45deg);
+      -ms-transform: rotate(45deg);
+       -o-transform: rotate(45deg);
+          transform: rotate(45deg);
+  -webkit-box-shadow: 0 0 10px #888;
+     -moz-box-shadow: 0 0 10px #888;
+          box-shadow: 0 0 10px #888;
+
+}
+
+.ribbon a {
+  border: 1px solid #faa;
+  color: #fff;
+  display: block;
+  font: bold 81.25% 'Helvetica Neue', Helvetica, Arial, sans-serif;
+  margin: 1px 0;
+  padding: 10px 50px;
+  text-align: center;
+  text-decoration: none;
+  text-shadow: 0 0 5px #444;
+  transition: 0.5s;
+}
+
+.ribbon a:hover {
+  background: #c11;
+  color: #fff;
+}
diff --git a/docs/_templates/layout.html b/docs/_templates/layout.html
new file mode 100644 (file)
index 0000000..ba05e82
--- /dev/null
@@ -0,0 +1,19 @@
+{# Import the theme's layout. #}
+{% extends "!layout.html" %}
+
+{# Custom CSS override for warning banner #}
+{% set css_files = css_files + ['_static/css/warning-header.css'] %}
+
+{# Ribbon #}
+{% block content %}
+  <div class="ribbon">
+    <a href="https://jira.onap.org/secure/CreateIssueDetails!init.jspa
+?pid=10111
+&issuetype=10004
+&priority=2
+&description=version:+{{version}}%0Apage:+{{pagename}}%0A%0A" target="_blank">
+      Report Issue
+    </a>
+  </div>
+  {{ super() }}
+{% endblock %}
index 146b009..fc96b8b 100644 (file)
@@ -131,8 +131,8 @@ todo_include_todos = True
 
 # The theme to use for HTML and HTML Help pages.  See the documentation for
 # a list of builtin themes.
-#html_theme = 'bootstrap'
-html_theme = 'classic'
+#html_theme = 'classic'
+html_theme = 'sphinx_rtd_theme'
 
 # Theme options are theme-specific and customize the look and feel of a theme
 # further.  For a list of options available for each theme, see the
@@ -488,3 +488,6 @@ needs_template_collapse = """
         | parents: :need_outgoing:`{{id}}`
 {% endif -%}
 """
+
+def setup(app):
+    app.add_stylesheet("css/ribbon.css")
index 9c69842..ba1f62a 100644 (file)
@@ -7,8 +7,8 @@ ONAP Documentation
 
 .. caution::
    This version of documentation is created from the latest master branch of
-   source repositories and is not a stable release.  To get the current stable
-   release use one of the following
+   source repositories, includes a proposed theme change, and is not a stable release.
+   To get the current stable release use one of the following
 
    * http://docs.onap.org
    * http://docs.onap.org/en/beijing
diff --git a/tox.ini b/tox.ini
index d94b112..574ff4e 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -6,7 +6,7 @@ skipsdist = true
 [testenv:docs]
 deps = -r{toxinidir}/etc/requirements.txt
 commands =
-    sphinx-build -j 4 -b html -n -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/html
+    sphinx-build -j 3 -b html -n -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/html
     echo "Generated docs available in {toxinidir}/docs/_build/html"
 whitelist_externals = echo