Add reworked theme values and apply menuselection arrow patch to all handbooks.

This commit is contained in:
Mrt134
2016-08-23 13:52:55 -04:00
parent 38eb34625e
commit 9ed043f0f5
6 changed files with 225 additions and 114 deletions

View File

@@ -86,6 +86,40 @@ pygments_style = 'sphinx'
# A list of ignored prefixes for module index sorting.
#modindex_common_prefix = []
# -- Option to change :menuselection: arrow -----------------------------
from docutils import nodes, utils
from docutils.parsers.rst import roles
from sphinx.roles import _amp_re
def patched_menusel_role(typ, rawtext, text, lineno, inliner, options={}, content=[]):
text = utils.unescape(text)
if typ == 'menuselection':
text = text.replace('-->', u'\N{HEAVY WIDE-HEADED RIGHTWARDS ARROW}') # Here is the patch
spans = _amp_re.split(text)
node = nodes.literal(rawtext=rawtext)
for i, span in enumerate(spans):
span = span.replace('&&', '&')
if i == 0:
if len(span) > 0:
textnode = nodes.Text(span)
node += textnode
continue
accel_node = nodes.inline()
letter_node = nodes.Text(span[0])
accel_node += letter_node
accel_node['classes'].append('accelerator')
node += accel_node
textnode = nodes.Text(span[1:])
node += textnode
node['classes'].append(typ)
return [node], []
# Use 'patched_menusel_role' function for processing the 'menuselection' role
roles.register_local_role("menuselection", patched_menusel_role)
# -- Options for HTML output ---------------------------------------------------

View File

@@ -775,7 +775,7 @@ a .icon {
.rst-content .wy-alert-danger.warning .admonition-title,
.rst-content .wy-alert-danger.seealso .admonition-title,
.rst-content .wy-alert-danger.admonition-todo .admonition-title {
background: #f29f97
background: #f23e35
}
.wy-alert.wy-alert-warning,
.rst-content .wy-alert-warning.note,
@@ -789,7 +789,7 @@ a .icon {
.rst-content .warning,
.rst-content .wy-alert-warning.seealso,
.rst-content .admonition-todo {
background: #b4d8af
background: #ffd386
}
.wy-alert.wy-alert-warning .wy-alert-title,
.rst-content .wy-alert-warning.note .wy-alert-title,
@@ -816,7 +816,7 @@ a .icon {
.rst-content .warning .admonition-title,
.rst-content .wy-alert-warning.seealso .admonition-title,
.rst-content .admonition-todo .admonition-title {
background: #2bc916
background: #ed6c1c
}
.wy-alert.wy-alert-info,
.rst-content .note,
@@ -830,7 +830,7 @@ a .icon {
.rst-content .wy-alert-info.warning,
.rst-content .seealso,
.rst-content .wy-alert-info.admonition-todo {
background: #e7f2fa
background: #e4f5ff
}
.wy-alert.wy-alert-info .wy-alert-title,
.rst-content .note .wy-alert-title,
@@ -857,7 +857,7 @@ a .icon {
.rst-content .wy-alert-info.warning .admonition-title,
.rst-content .seealso .admonition-title,
.rst-content .wy-alert-info.admonition-todo .admonition-title {
background: #86d3f9
background: #69adfa
}
.wy-alert.wy-alert-success,
.rst-content .wy-alert-success.note,
@@ -871,7 +871,7 @@ a .icon {
.rst-content .wy-alert-success.warning,
.rst-content .wy-alert-success.seealso,
.rst-content .wy-alert-success.admonition-todo {
background: #edbeb6;
background: #cfe8c4
}
.wy-alert.wy-alert-success .wy-alert-title,
.rst-content .wy-alert-success.note .wy-alert-title,
@@ -898,7 +898,7 @@ a .icon {
.rst-content .wy-alert-success.warning .admonition-title,
.rst-content .wy-alert-success.seealso .admonition-title,
.rst-content .wy-alert-success.admonition-todo .admonition-title {
background: #f23e35
background: #59c267
}
.wy-alert.wy-alert-neutral,
.rst-content .wy-alert-neutral.note,
@@ -3673,38 +3673,47 @@ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#28343b', end
code.kbd,
code.file,
code.guilabel,
code.menuselection,
.kbd,
.file,
.guilabel{
.guilabel,
.menuselection{
background-color: #D5DDE2; /* saturate from ecf0f3 to be more visible/blue on screen. */
display: inline-block;
font-family:'Inconsolata', monospace;
font-size: 92%;
vertical-align: -.5px;
padding: 2px;
font-size: 95%;
padding-right: 3px;
padding-left: 3px;
padding-top: 3px;
padding-bottom: 2px;
border-radius: 5px;
line-height: 80%;
overflow: hidden;
}
code.kbd, .kbd {
border: thin solid rgb(45, 45,255);
border: thin solid #000;
border-radius: 2px;
font-weight: bold
}
code.file, .file {
border: thin solid #999;
border: hidden/*thin solid #999*/
}
code.guilabel, .guilabel {
border:1px solid #7fbbe3;
border:hidden;
font-weight:bold;
background:#e7f2fa;
font-size:80%;
font-weight:600;
border-radius:4px;
padding:2.4px 3px;
margin:auto 2px;
font-family: 'Inconsolata', monospace;
text-transform: none
}
code.menuselection, .menuselection {
background-color: #e6e6ed;
color: inherit;
font-weight: 600;
border: hidden;
font-size: 98%
}
code.command, .command {
font-family:'Inconsolata', monospace;
}
th {
background-color: #ede;
}
@@ -3727,21 +3736,6 @@ div.viewcode-block:target {
border-top: 1px solid #ac9;
border-bottom: 1px solid #ac9;
}
.menuselection {
background-color: #F0F0F0;
color: inherit;
display: inline-block;
font-family: 'Inconsolata', monospace;
font-size: 88%!important;
font-weight: bold;
padding-right: 3px;
padding-left: 3px;
padding-top: 3px;
padding-bottom: 2px;
border-radius: 5px;
line-height: 80%!important;
border: thin solid #000000;
}
/*"""""""""""""""""""""""""""""""""""""""""""""""*
| spiffy_table adjusted for rst/RtD (BEGIN) |
@@ -3856,17 +3850,26 @@ table.docutils {
| textboxes adjusted for rst/RtD (BEGIN) |
*"""""""""""""""""""""""""""""""""""""""""""*/
.rst-content .danger, .rdangerbox {
border:solid #BA0000;
border:solid #bababa;
background: #edbeb6
}
.rst-content .warning, .rwarningbox {
border:solid #9bd194;
border:solid #bababa;
}
.rst-content .note, .rnotebox {
border:solid #BABABA;
}
.rst-content .important, .rimportantbox{
border:solid #bababa;
}
.rst-content .tip, .rtipbox{
border:solid #bababa;
}
.rversionbox {
border:solid #00E100;
background-color: #d7ffd7!important;

View File

@@ -775,7 +775,7 @@ a .icon {
.rst-content .wy-alert-danger.warning .admonition-title,
.rst-content .wy-alert-danger.seealso .admonition-title,
.rst-content .wy-alert-danger.admonition-todo .admonition-title {
background: #f29f97
background: #f23e35
}
.wy-alert.wy-alert-warning,
.rst-content .wy-alert-warning.note,
@@ -789,7 +789,7 @@ a .icon {
.rst-content .warning,
.rst-content .wy-alert-warning.seealso,
.rst-content .admonition-todo {
background: #b4d8af
background: #ffd386
}
.wy-alert.wy-alert-warning .wy-alert-title,
.rst-content .wy-alert-warning.note .wy-alert-title,
@@ -816,7 +816,7 @@ a .icon {
.rst-content .warning .admonition-title,
.rst-content .wy-alert-warning.seealso .admonition-title,
.rst-content .admonition-todo .admonition-title {
background: #2bc916
background: #ed6c1c
}
.wy-alert.wy-alert-info,
.rst-content .note,
@@ -830,7 +830,7 @@ a .icon {
.rst-content .wy-alert-info.warning,
.rst-content .seealso,
.rst-content .wy-alert-info.admonition-todo {
background: #e7f2fa
background: #e4f5ff
}
.wy-alert.wy-alert-info .wy-alert-title,
.rst-content .note .wy-alert-title,
@@ -857,7 +857,7 @@ a .icon {
.rst-content .wy-alert-info.warning .admonition-title,
.rst-content .seealso .admonition-title,
.rst-content .wy-alert-info.admonition-todo .admonition-title {
background: #86d3f9
background: #69adfa
}
.wy-alert.wy-alert-success,
.rst-content .wy-alert-success.note,
@@ -871,7 +871,7 @@ a .icon {
.rst-content .wy-alert-success.warning,
.rst-content .wy-alert-success.seealso,
.rst-content .wy-alert-success.admonition-todo {
background: #edbeb6;
background: #cfe8c4
}
.wy-alert.wy-alert-success .wy-alert-title,
.rst-content .wy-alert-success.note .wy-alert-title,
@@ -898,7 +898,7 @@ a .icon {
.rst-content .wy-alert-success.warning .admonition-title,
.rst-content .wy-alert-success.seealso .admonition-title,
.rst-content .wy-alert-success.admonition-todo .admonition-title {
background: #f23e35
background: #59c267
}
.wy-alert.wy-alert-neutral,
.rst-content .wy-alert-neutral.note,
@@ -3673,38 +3673,47 @@ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#28343b', end
code.kbd,
code.file,
code.guilabel,
code.menuselection,
.kbd,
.file,
.guilabel{
.guilabel,
.menuselection{
background-color: #D5DDE2; /* saturate from ecf0f3 to be more visible/blue on screen. */
display: inline-block;
font-family:'Inconsolata', monospace;
font-size: 92%;
vertical-align: -.5px;
padding: 2px;
font-size: 95%;
padding-right: 3px;
padding-left: 3px;
padding-top: 3px;
padding-bottom: 2px;
border-radius: 5px;
line-height: 80%;
overflow: hidden;
}
code.kbd, .kbd {
border: thin solid rgb(45, 45,255);
border: thin solid #000;
border-radius: 2px;
font-weight: bold
}
code.file, .file {
border: thin solid #999;
border: hidden/*thin solid #999*/
}
code.guilabel, .guilabel {
border:1px solid #7fbbe3;
border:hidden;
font-weight:bold;
background:#e7f2fa;
font-size:80%;
font-weight:600;
border-radius:4px;
padding:2.4px 3px;
margin:auto 2px;
font-family: 'Inconsolata', monospace;
text-transform: none
}
code.menuselection, .menuselection {
background-color: #e6e6ed;
color: inherit;
font-weight: 600;
border: hidden;
font-size: 98%
}
code.command, .command {
font-family:'Inconsolata', monospace;
}
th {
background-color: #ede;
}
@@ -3727,21 +3736,6 @@ div.viewcode-block:target {
border-top: 1px solid #ac9;
border-bottom: 1px solid #ac9;
}
.menuselection {
background-color: #F0F0F0;
color: inherit;
display: inline-block;
font-family: 'Inconsolata', monospace;
font-size: 88%!important;
font-weight: bold;
padding-right: 3px;
padding-left: 3px;
padding-top: 3px;
padding-bottom: 2px;
border-radius: 5px;
line-height: 80%!important;
border: thin solid #000000;
}
/*"""""""""""""""""""""""""""""""""""""""""""""""*
| spiffy_table adjusted for rst/RtD (BEGIN) |
@@ -3856,17 +3850,26 @@ table.docutils {
| textboxes adjusted for rst/RtD (BEGIN) |
*"""""""""""""""""""""""""""""""""""""""""""*/
.rst-content .danger, .rdangerbox {
border:solid #BA0000;
border:solid #bababa;
background: #edbeb6
}
.rst-content .warning, .rwarningbox {
border:solid #9bd194;
border:solid #bababa;
}
.rst-content .note, .rnotebox {
border:solid #BABABA;
}
.rst-content .important, .rimportantbox{
border:solid #bababa;
}
.rst-content .tip, .rtipbox{
border:solid #bababa;
}
.rversionbox {
border:solid #00E100;
background-color: #d7ffd7!important;

View File

@@ -116,6 +116,40 @@ pygments_style = 'sphinx'
# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = True
# -- Option to change :menuselection: arrow -----------------------------
from docutils import nodes, utils
from docutils.parsers.rst import roles
from sphinx.roles import _amp_re
def patched_menusel_role(typ, rawtext, text, lineno, inliner, options={}, content=[]):
text = utils.unescape(text)
if typ == 'menuselection':
text = text.replace('-->', u'\N{HEAVY WIDE-HEADED RIGHTWARDS ARROW}') # Here is the patch
spans = _amp_re.split(text)
node = nodes.literal(rawtext=rawtext)
for i, span in enumerate(spans):
span = span.replace('&&', '&')
if i == 0:
if len(span) > 0:
textnode = nodes.Text(span)
node += textnode
continue
accel_node = nodes.inline()
letter_node = nodes.Text(span[0])
accel_node += letter_node
accel_node['classes'].append('accelerator')
node += accel_node
textnode = nodes.Text(span[1:])
node += textnode
node['classes'].append(typ)
return [node], []
# Use 'patched_menusel_role' function for processing the 'menuselection' role
roles.register_local_role("menuselection", patched_menusel_role)
# -- Options for HTML output ----------------------------------------------

View File

@@ -86,6 +86,40 @@ pygments_style = 'sphinx'
# A list of ignored prefixes for module index sorting.
#modindex_common_prefix = []
# -- Option to change :menuselection: arrow -----------------------------
from docutils import nodes, utils
from docutils.parsers.rst import roles
from sphinx.roles import _amp_re
def patched_menusel_role(typ, rawtext, text, lineno, inliner, options={}, content=[]):
text = utils.unescape(text)
if typ == 'menuselection':
text = text.replace('-->', u'\N{HEAVY WIDE-HEADED RIGHTWARDS ARROW}') # Here is the patch
spans = _amp_re.split(text)
node = nodes.literal(rawtext=rawtext)
for i, span in enumerate(spans):
span = span.replace('&&', '&')
if i == 0:
if len(span) > 0:
textnode = nodes.Text(span)
node += textnode
continue
accel_node = nodes.inline()
letter_node = nodes.Text(span[0])
accel_node += letter_node
accel_node['classes'].append('accelerator')
node += accel_node
textnode = nodes.Text(span[1:])
node += textnode
node['classes'].append(typ)
return [node], []
# Use 'patched_menusel_role' function for processing the 'menuselection' role
roles.register_local_role("menuselection", patched_menusel_role)
# -- Options for HTML output ---------------------------------------------------

View File

@@ -775,7 +775,7 @@ a .icon {
.rst-content .wy-alert-danger.warning .admonition-title,
.rst-content .wy-alert-danger.seealso .admonition-title,
.rst-content .wy-alert-danger.admonition-todo .admonition-title {
background: #f29f97
background: #f23e35
}
.wy-alert.wy-alert-warning,
.rst-content .wy-alert-warning.note,
@@ -789,7 +789,7 @@ a .icon {
.rst-content .warning,
.rst-content .wy-alert-warning.seealso,
.rst-content .admonition-todo {
background: #b4d8af
background: #ffd386
}
.wy-alert.wy-alert-warning .wy-alert-title,
.rst-content .wy-alert-warning.note .wy-alert-title,
@@ -816,7 +816,7 @@ a .icon {
.rst-content .warning .admonition-title,
.rst-content .wy-alert-warning.seealso .admonition-title,
.rst-content .admonition-todo .admonition-title {
background: #2bc916
background: #ed6c1c
}
.wy-alert.wy-alert-info,
.rst-content .note,
@@ -830,7 +830,7 @@ a .icon {
.rst-content .wy-alert-info.warning,
.rst-content .seealso,
.rst-content .wy-alert-info.admonition-todo {
background: #e7f2fa
background: #e4f5ff
}
.wy-alert.wy-alert-info .wy-alert-title,
.rst-content .note .wy-alert-title,
@@ -857,7 +857,7 @@ a .icon {
.rst-content .wy-alert-info.warning .admonition-title,
.rst-content .seealso .admonition-title,
.rst-content .wy-alert-info.admonition-todo .admonition-title {
background: #86d3f9
background: #69adfa
}
.wy-alert.wy-alert-success,
.rst-content .wy-alert-success.note,
@@ -871,7 +871,7 @@ a .icon {
.rst-content .wy-alert-success.warning,
.rst-content .wy-alert-success.seealso,
.rst-content .wy-alert-success.admonition-todo {
background: #edbeb6;
background: #cfe8c4
}
.wy-alert.wy-alert-success .wy-alert-title,
.rst-content .wy-alert-success.note .wy-alert-title,
@@ -898,7 +898,7 @@ a .icon {
.rst-content .wy-alert-success.warning .admonition-title,
.rst-content .wy-alert-success.seealso .admonition-title,
.rst-content .wy-alert-success.admonition-todo .admonition-title {
background: #f23e35
background: #59c267
}
.wy-alert.wy-alert-neutral,
.rst-content .wy-alert-neutral.note,
@@ -3673,38 +3673,47 @@ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#28343b', end
code.kbd,
code.file,
code.guilabel,
code.menuselection,
.kbd,
.file,
.guilabel{
.guilabel,
.menuselection{
background-color: #D5DDE2; /* saturate from ecf0f3 to be more visible/blue on screen. */
display: inline-block;
font-family:'Inconsolata', monospace;
font-size: 92%;
vertical-align: -.5px;
padding: 2px;
font-size: 95%;
padding-right: 3px;
padding-left: 3px;
padding-top: 3px;
padding-bottom: 2px;
border-radius: 5px;
line-height: 80%;
overflow: hidden;
}
code.kbd, .kbd {
border: thin solid rgb(45, 45,255);
border: thin solid #000;
border-radius: 2px;
font-weight: bold
}
code.file, .file {
border: thin solid #999;
border: hidden/*thin solid #999*/
}
code.guilabel, .guilabel {
border:1px solid #7fbbe3;
border:hidden;
font-weight:bold;
background:#e7f2fa;
font-size:80%;
font-weight:600;
border-radius:4px;
padding:2.4px 3px;
margin:auto 2px;
font-family: 'Inconsolata', monospace;
text-transform: none
}
code.menuselection, .menuselection {
background-color: #e6e6ed;
color: inherit;
font-weight: 600;
border: hidden;
font-size: 98%
}
code.command, .command {
font-family:'Inconsolata', monospace;
}
th {
background-color: #ede;
}
@@ -3727,21 +3736,6 @@ div.viewcode-block:target {
border-top: 1px solid #ac9;
border-bottom: 1px solid #ac9;
}
.menuselection {
background-color: #F0F0F0;
color: inherit;
display: inline-block;
font-family: 'Inconsolata', monospace;
font-size: 88%!important;
font-weight: bold;
padding-right: 3px;
padding-left: 3px;
padding-top: 3px;
padding-bottom: 2px;
border-radius: 5px;
line-height: 80%!important;
border: thin solid #000000;
}
/*"""""""""""""""""""""""""""""""""""""""""""""""*
| spiffy_table adjusted for rst/RtD (BEGIN) |
@@ -3856,17 +3850,26 @@ table.docutils {
| textboxes adjusted for rst/RtD (BEGIN) |
*"""""""""""""""""""""""""""""""""""""""""""*/
.rst-content .danger, .rdangerbox {
border:solid #BA0000;
border:solid #bababa;
background: #edbeb6
}
.rst-content .warning, .rwarningbox {
border:solid #9bd194;
border:solid #bababa;
}
.rst-content .note, .rnotebox {
border:solid #BABABA;
}
.rst-content .important, .rimportantbox{
border:solid #bababa;
}
.rst-content .tip, .rtipbox{
border:solid #bababa;
}
.rversionbox {
border:solid #00E100;
background-color: #d7ffd7!important;