From c18d76ae5529e4a032f118c7d203c80df388c4e7 Mon Sep 17 00:00:00 2001 From: Chris Johns Date: Tue, 26 Jan 2016 12:26:11 +1100 Subject: Add my-style.css support and add RTEMS to that CSS. --- common/_static/my-styles.css | 110 +++++++++++++++++++++++++++++- common/conf.py | 2 +- common/sphinx_rtd_theme_rtems/layout.html | 3 + common/sphinx_rtd_theme_rtems/theme.conf | 4 +- 4 files changed, 116 insertions(+), 3 deletions(-) diff --git a/common/_static/my-styles.css b/common/_static/my-styles.css index 5ba0215..c82b59b 100644 --- a/common/_static/my-styles.css +++ b/common/_static/my-styles.css @@ -15,7 +15,6 @@ } .rtemsdefine dd { - margin: 3; color: #408090; } @@ -29,3 +28,112 @@ .rtemsoption dt { color: #a87892; } + +/* + * Special table. We do not use this because the format is only for HTML + * not PDF. Left here as a record. + */ +table.rtems-items-table.docutils:not(.field-list) tr:nth-child(2n-1) td, +table.rtems-items-table.docutils:not(.field-list) tr:nth-child(2n) td { + background-color: #fcfcfc; + white-space: normal; + vertical-align: top; + border-width: 0; + padding-right: 5px; + padding-left: 5px; +} +table.rtems-items-table.docutils:not(.field-list) tr td:nth-child(2n-1) { + text-align: right; + margin-right: 0; +} +table.rtems-items-table.docutils:not(.field-list) tr td:nth-child(2n) { + text-align: left; +} + +/* + * Nav side-bar in RTEMS colours. + */ +.wy-nav-top, .wy-nav-top a { + background-color: #38532F; + color: #fdfdfd; +} + +.wy-side-nav-search { + background-color: #38532F; +} + +.wy-nav-side { + background-color: #dbe5c6; + color: #424242; +} + +.wy-menu-vertical { + background-color: #dbe5c6; + color: #333333; +} +.wy-menu-vertical a { + background-color: #dbe5c6; + color: #333333; +} +.wy-menu-vertical a:hover { + background-color: #38532F; + color: #fdfdfd; +} + +.wy-menu-vertical li.toctree-l1.current>a{ + background:#dbe5c6; + color: #333333; +} + +.wy-menu-vertical li.toctree-l1.current>a:hover{ + background-color: #38532F; + color: #fdfdfd; +} + +.wy-menu-vertical li.toctree-l1.current li.toctree-l2>a{ + background:#dbe5c6; + color: #333333; +} + +.wy-menu-vertical li.toctree-l1.current li.toctree-l2>a:hover{ + background-color: #38532F; + color: #fdfdfd; +} + +.wy-menu-vertical li.toctree-l1.current li.toctree-l2.current>a{ + background:#dbe5c6; + color: #333333; +} + +.wy-menu-vertical li.toctree-l1.current li.toctree-l2.current>a:hover{ + background-color: #38532F; + color: #fdfdfd; +} + +.wy-menu-vertical li.toctree-l1.current li.toctree-l2.current li.toctree-l3>a{ + background: #dbe5c6; + color: #333333; +} + +.wy-menu-vertical li.toctree-l1.current li.toctree-l2.current li.toctree-l3>a:hover{ + background-color: #38532F; + color: #fdfdfd; +} + +.wy-menu-vertical li.toctree-l1.current li.toctree-l2.current li.toctree-l3 li.toctree-l4>a{ + background: #dbe5c6; + color: #333333; +} + +.wy-menu-vertical li.toctree-l1.current li.toctree-l2.current li.toctree-l3 li.toctree-l4>a:hover{ + background-color: #38532F; + color: #fdfdfd; +} + +.wy-nav-content a { + color: #77AD4A; +} + +.wy-nav-content a:hover { + color: #4B6D2F; +} diff --git a/common/conf.py b/common/conf.py index f136779..24db70f 100644 --- a/common/conf.py +++ b/common/conf.py @@ -144,7 +144,7 @@ html_sidebars = { #html_split_index = False # If true, links to the reST sources are added to the pages. -#html_show_sourcelink = True +html_show_sourcelink = False # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. #html_show_sphinx = True diff --git a/common/sphinx_rtd_theme_rtems/layout.html b/common/sphinx_rtd_theme_rtems/layout.html index 44978c9..86927c6 100644 --- a/common/sphinx_rtd_theme_rtems/layout.html +++ b/common/sphinx_rtd_theme_rtems/layout.html @@ -7,6 +7,9 @@ {%- set titlesuffix = "" %} {%- endif %} +{# Custom CSS overrides #} +{% set extra_css_files = ['_static/my-styles.css'] %} + diff --git a/common/sphinx_rtd_theme_rtems/theme.conf b/common/sphinx_rtd_theme_rtems/theme.conf index 3896d4d..bc70a79 100644 --- a/common/sphinx_rtd_theme_rtems/theme.conf +++ b/common/sphinx_rtd_theme_rtems/theme.conf @@ -4,8 +4,10 @@ stylesheet = css/theme.css [options] typekit_id = hiw1hhg -analytics_id = +analytics_id = sticky_navigation = False logo_only = collapse_navigation = False display_version = True +search = True +genindex = True -- cgit v1.2.3