mirror of
https://github.com/outbackdingo/sysadm.git
synced 2026-01-27 10:20:26 +00:00
Add reworked theme values and apply menuselection arrow patch to all handbooks.
This commit is contained in:
@@ -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 ---------------------------------------------------
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user