]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
doc: switch to sphinx_rtd_theme
authorKefu Chai <kchai@redhat.com>
Sat, 13 Feb 2021 03:23:23 +0000 (11:23 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 4 Mar 2021 11:00:47 +0000 (19:00 +0800)
Signed-off-by: Kefu Chai <kchai@redhat.com>
admin/doc-requirements.txt
doc/_themes/ceph/static/ceph.css_t [new file with mode: 0644]
doc/_themes/ceph/static/nature.css_t [deleted file]
doc/_themes/ceph/theme.conf
doc/conf.py

index 3ad2f6edbfcce7a2d54b2edeb81b8a27b2e07ddc..1b2d076f57b5d1bec7c1590e2a047aa72641c01f 100644 (file)
@@ -8,6 +8,7 @@ pcpp
 prettytable
 sphinx-autodoc-typehints
 sphinx-prompt
+sphinx_rtd_theme
 Sphinx-Substitution-Extensions
 typed-ast
 sphinxcontrib-openapi
diff --git a/doc/_themes/ceph/static/ceph.css_t b/doc/_themes/ceph/static/ceph.css_t
new file mode 100644 (file)
index 0000000..a9d0da4
--- /dev/null
@@ -0,0 +1 @@
+@import url("css/theme.css");
diff --git a/doc/_themes/ceph/static/nature.css_t b/doc/_themes/ceph/static/nature.css_t
deleted file mode 100644 (file)
index 019f8dc..0000000
+++ /dev/null
@@ -1,335 +0,0 @@
-/*
- * nature.css_t
- * ~~~~~~~~~~~~
- *
- * Sphinx stylesheet -- nature theme.
- *
- * :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS.
- * :license: BSD, see LICENSE for details.
- *
- */
-
-@import url("basic.css");
-
-/* -- page layout ----------------------------------------------------------- */
-
-@import url('https://fonts.googleapis.com/css?family=Titillium+Web:400,300,700');
-
-body {
-    font-family: Helvetica, Arial, sans-serif;
-    font-size: 100%;
-    background-color: #fff;
-    color: #555;
-    margin: 0;
-    padding: 0;
-    border-top: 5px solid #F05C56;
-}
-
-div.documentwrapper {
-    float: left;
-    width: 100%;
-}
-
-div.bodywrapper {
-    margin: 0 0 0 330px;
-}
-
-hr {
-    border: 1px solid #B1B4B6;
-}
-
-div.document {
-    background-color: #eee;
-}
-
-div.body {
-    background-color: #ffffff;
-    color: #3E4349;
-    padding: 0 30px 30px 30px;
-    font-size: 0.9em;
-}
-
-div.footer {
-    color: #555;
-    width: 100%;
-    padding: 13px 0;
-    text-align: center;
-    font-size: 75%;
-}
-
-div.footer a {
-    color: #444;
-    text-decoration: underline;
-}
-
-div.related {
-    background-color: #80D2DC;
-    line-height: 32px;
-    color: #37424A;
-    font-size: 0.9em;
-    border-top: #9C4850 5px solid;
-}
-
-div.related a {
-    color: #37424A;
-    text-decoration: none;
-}
-
-div.related a:hover {
-    color: #fff;
-    // text-decoration: underline;
-}
-
-div.sphinxsidebar {
-    font-size: 0.75em;
-    line-height: 1.5em;
-    width: 330px;
-}
-
-div.sphinxsidebarwrapper{
-    padding: 20px 0;
-}
-
-div.sphinxsidebar h3,
-div.sphinxsidebar h4 {
-    font-family: 'Titillium Web', sans-serif;
-    color: #e6e8e8;
-    font-size: 1.2em;
-    font-weight: normal;
-    margin: 0;
-    padding: 5px 10px;
-    background-color: #5e6a71;
-    // text-shadow: 1px 1px 0 white;
-    text-transform: uppercase;
-}
-
-div.sphinxsidebar h4{
-    font-size: 1.1em;
-}
-
-div.sphinxsidebar h3 a,
-div.sphinxsidebar h4 a {
-    color: #e6e8e8;
-}
-
-div.sphinxsidebar p {
-    color: #888;
-    padding: 5px 20px;
-}
-
-div.sphinxsidebar p.topless {
-}
-
-div.sphinxsidebar ul {
-    margin: 10px 20px;
-    padding: 0;
-    color: #000;
-}
-
-div.sphinxsidebar a {
-    color: #444;
-}
-
-div.sphinxsidebar input {
-    border: 1px solid #ccc;
-    font-family: sans-serif;
-    font-size: 1em;
-}
-
-div.sphinxsidebar input[type=text] {
-    margin-left: 20px;
-    margin-right: 20px;
-}
-
-div.sphinxsidebar input[type=submit] {
-    border-left: 1px solid #ccc !important;
-    margin-left: 20px;
-}
-
-/* -- body styles ----------------------------------------------------------- */
-
-a {
-    color: #F05C56;
-    text-decoration: none;
-}
-
-a:hover {
-    color: #E32E00;
-    text-decoration: underline;
-}
-
-div.body h1,
-div.body h2,
-div.body h3,
-div.body h4,
-div.body h5,
-div.body h6 {
-    background-color: #99DAE3;
-    font-weight: normal;
-    color: #212224;
-    margin: 30px 0px 10px 0px;
-    padding: 5px 0 5px 10px;
-    // text-shadow: 0px 1px 0 white;
-    text-transform: uppercase;
-}
-
-div.body h1 { font-family: Titillium Web; border-top: 20px solid white; margin-top: 0; font-size: 200%; }
-div.body h2 { font-family: Titillium Web; font-size: 150%; background-color: #B2E3EA; }
-div.body h3 { font-family: Titillium Web; font-size: 120%; background-color: #CCECF1; }
-div.body h4 { font-family: Helvetica, Arial, sans-serif; font-size: 110%; background-color: #CCECF1; }
-div.body h5 { font-family: Helvetica, Arial, sans-serif; font-size: 100%; background-color: #CCECF1; }
-div.body h6 { font-family: Helvetica, Arial, sans-serif; font-size: 100%; background-color: #CCECF1; }
-
-a.headerlink {
-    color: #c60f0f;
-    font-size: 0.8em;
-    padding: 0 4px 0 4px;
-    text-decoration: none;
-}
-
-a.headerlink:hover {
-    background-color: #c60f0f;
-    color: white;
-}
-
-div.body p, div.body dd, div.body li {
-    line-height: 1.5em;
-}
-
-div.admonition p.admonition-title + p {
-    display: inline;
-}
-
-div.highlight {
-    background-color: white;
-}
-
-div.note {
-    background-color: #eee;
-    border: 1px solid #ccc;
-}
-
-div.seealso {
-    background-color: #ffc;
-    border: 1px solid #ff6;
-}
-
-div.topic {
-    background-color: #eee;
-}
-
-div.warning {
-    background-color: #ffe4e4;
-    border: 1px solid #f66;
-}
-
-div.warning a {
-    color: black;
-}
-
-p.admonition-title {
-    display: inline;
-}
-
-p.admonition-title:after {
-    content: ":";
-}
-
-pre {
-    padding: 10px;
-    background-color: White;
-    color: #222;
-    line-height: 1.2em;
-    border: 1px solid #C6C9CB;
-    font-size: 1.1em;
-    margin: 1.5em 0 1.5em 0;
-    -webkit-box-shadow: 1px 1px 1px #d8d8d8;
-    -moz-box-shadow: 1px 1px 1px #d8d8d8;
-}
-
-tt {
-    background-color: #ecf0f3;
-    color: #222;
-    /* padding: 1px 2px; */
-    font-size: 1.1em;
-    font-family: monospace;
-}
-
-.viewcode-back {
-    font-family: Arial, sans-serif;
-}
-
-div.viewcode-block:target {
-    background-color: #f4debf;
-    border-top: 1px solid #ac9;
-    border-bottom: 1px solid #ac9;
-}
-
-table.docutils {
-    margin: 1.5em;
-}
-
-div.sidebar {
-    border: 1px solid #5E6A71;
-    background-color: #E6E8E8;
-}
-
-div.admonition.tip {
-    background-color: #80D2DC;
-    border: 1px solid #55AEBA;
-}
-
-div.admonition.important {
-    background-color: #F05C56;
-    border: 1px solid #9C4850;
-    color: #fff;
-}
-
-div.admonition.important a {
-    color: #E6E8E8;
-}
-
-div.tip tt.literal {
-    background-color: #55aeba;
-    color: #fff;
-}
-
-div.important tt.literal {
-    background-color: #9C4850;
-    color: #fff;
-}
-
-h2 .literal {
-    color: #fff;
-    background-color: #37424a;
-}
-
-dl.glossary dt {
-    font-size: 1.0em;
-    padding-top:20px;
-}
-
-p.breathe-sectiondef-title {
-    font-size: 1.3em;
-    font-weight: bold;
-    border-bottom: thin solid #5E6A71;
-}
-
-.columns-2,
-.columns-3 {
-    display: flex;
-}
-
-.columns-2 > div,
-.columns-3 > div {
-    flex: 1;
-    padding: 0 10px 10px 0;
-}
-
-.columns-2 > div {
-    width: 50%;
-}
-
-.columns-3 > div {
-    width: 33.33%;
-}
index 1cc40044646bb73870088ddc88543c58a3ca083e..48fb4140d91f77467fbdfc4db0177177d62fa2e4 100644 (file)
@@ -1,4 +1,4 @@
 [theme]
-inherit = basic
-stylesheet = nature.css
+inherit = sphinx_rtd_theme
+stylesheet = ceph.css
 pygments_style = tango
index 849385a9389229c0b19937e0b83e0e1c204e6780..841e3c3b612121425c6b18d1affc69244ef9acd7 100644 (file)
@@ -44,6 +44,20 @@ pygments_style = 'sphinx'
 
 # HTML output options
 html_theme = 'ceph'
+html_theme_options = {
+    'logo_only': True,
+    'display_version': False,
+    'prev_next_buttons_location': 'bottom',
+    'style_external_links': False,
+    'vcs_pageview_mode': '',
+    'style_nav_header_background': 'white',
+    # Toc options
+    'collapse_navigation': True,
+    'sticky_navigation': True,
+    'navigation_depth': 4,
+    'includehidden': True,
+    'titles_only': False
+}
 html_theme_path = ['_themes']
 html_title = "Ceph Documentation"
 html_logo = 'logo.png'