doc: add admons style to the HTML theme

This commit is contained in:
Lena (zansorgova) 2018-01-05 17:17:08 +01:00
parent b2b9dcfa96
commit 49e3356e77
9 changed files with 81 additions and 2 deletions

View file

@ -93,7 +93,7 @@ pygments_style = 'sphinx'
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'nature'
html_theme = 'theme_html'
# 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
@ -101,7 +101,7 @@ html_theme = 'nature'
#html_theme_options = {}
# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = []
html_theme_path = ['.']
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".

View file

@ -0,0 +1,69 @@
/* === Style for admonitions === */
/* Settings from 'basic' theme (modified only) */
div.admonition {
margin-top: 10px;
margin-bottom: 10px;
padding: 7px;
padding-left: 54px;/* based on icon size */
padding-right: 24px;/* based on icon size */
}
/* Settings from 'classic' theme (modified only) */
div.admonition p {
display: block;
}
p.admonition-title {
padding-bottom: 11px;/* based on icon size */
padding-top: 11px;/* based on icon size */
}
p.admonition-title:after {
content: none; /* do not add colon */
}
/* Icon settings for all admonitions */
div.admonition {
/* background-image: url('abstract_admon_48.png'); */
background-repeat: no-repeat;
background-position: 2px 2px;
}
/* Specific admonitions */
div.admonition-todo {
background-color: #CAE2B6;
border: solid 1px #439427;
}
div.warning {
background-image: url('icons/admon_warning_48.png');
background-color: #FFE4E4;
border: solid 3px #990D1C;
}
div.caution {
background-image: url('icons/admon_caution_48.png');
background-color: #FFE4E4;
border: solid 1px #990D1C;
}
div.important {
background-image: url('icons/admon_important_48.png');
background-color: #FBECC8;
border: solid 1px #D68612;
}
div.note {
background-image: url('icons/admon_note_48.png');
background-color: white;
border: solid 1px #D1D3D4;
}
div.tip {
background-image: url('icons/admon_tip_48.png');
background-color: #F2E4FD;
border: solid 1px #D1C2E6;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -0,0 +1,6 @@
@import url("nature.css");
/* Addendum for admonitions */
@import url("admons.css");
/* Other overrides here */

View file

@ -0,0 +1,4 @@
[theme]
inherit = nature
stylesheet = main.css
pygments_style = sphinx