doc: switch to sphinx_rtd_theme

Signed-off-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
Kefu Chai 2021-02-13 11:23:23 +08:00
parent cb7c0b41c5
commit 275c6bd1b7
5 changed files with 18 additions and 337 deletions

View File

@ -8,6 +8,7 @@ pcpp
prettytable
sphinx-autodoc-typehints
sphinx-prompt
sphinx_rtd_theme
Sphinx-Substitution-Extensions
typed-ast
sphinxcontrib-openapi

1
doc/_themes/ceph/static/ceph.css_t vendored Normal file
View File

@ -0,0 +1 @@
@import url("css/theme.css");

View File

@ -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%;
}

View File

@ -1,4 +1,4 @@
[theme]
inherit = basic
stylesheet = nature.css
inherit = sphinx_rtd_theme
stylesheet = ceph.css
pygments_style = tango

View 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'