From 317d81a4037edb5cc11f03de92e330d0b05a4435 Mon Sep 17 00:00:00 2001 From: Rich Bennett Date: Tue, 11 Sep 2018 07:38:05 -0400 Subject: Switch theme and add report issue 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 --- docs/_static/css/ribbon.css | 36 ++++++++++++++++++++++++++++++++++++ docs/_templates/layout.html | 19 +++++++++++++++++++ docs/conf.py | 7 +++++-- docs/index.rst | 4 ++-- 4 files changed, 62 insertions(+), 4 deletions(-) create mode 100644 docs/_static/css/ribbon.css create mode 100644 docs/_templates/layout.html (limited to 'docs') diff --git a/docs/_static/css/ribbon.css b/docs/_static/css/ribbon.css new file mode 100644 index 000000000..b378f432d --- /dev/null +++ b/docs/_static/css/ribbon.css @@ -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 index 000000000..ba05e829f --- /dev/null +++ b/docs/_templates/layout.html @@ -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 %} + + {{ super() }} +{% endblock %} diff --git a/docs/conf.py b/docs/conf.py index 146b009eb..fc96b8b4e 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -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") diff --git a/docs/index.rst b/docs/index.rst index 9c69842f7..ba1f62aab 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -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 -- cgit 1.2.3-korg