mirror of
https://github.com/clearlinux/clear-linux-documentation.git
synced 2026-09-05 05:12:03 +00:00
Adds labels for code blocks used in Clear Linux docs (#852)
* Added support for labeling code blocks. Currently supported code blocks: * yaml * bash * console * reStructuredText * Python * PowerShell Handling added for re-aligning code blocks with line numbers with labels. Signed-off-by: Kevin Putnam <kevin.putnam@intel.com> * Adds the following code block handlers: * Diff * C * json * spec * Perl * PHP * xml Signed-off-by: Kevin Putnam <kevin.putnam@intel.com>
This commit is contained in:
committed by
michael vincerra
parent
c811324028
commit
3fa6558b07
@@ -343,4 +343,131 @@ div#trademarks {
|
||||
content: '$ ';
|
||||
}
|
||||
|
||||
/*End support for code blocks with $ signs that aren't copied with content*/
|
||||
/*End support for code blocks with $ signs that aren't copied with content*/
|
||||
|
||||
/*Begin support for labeled code-blocks - need to add an entry for every type of code-block that needs to be labeled*/
|
||||
|
||||
div.highlight-powershell .highlight:before{
|
||||
background: #909090;
|
||||
color: white;
|
||||
content: " PowerShell ";
|
||||
font-family: SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",Courier,monospace;
|
||||
font-size: 14px;
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
div.highlight-python .highlight:before{
|
||||
background: #909090;
|
||||
color: white;
|
||||
content: " Python ";
|
||||
font-family: SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",Courier,monospace;
|
||||
font-size: 14px;
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
div.highlight-console .highlight:before{
|
||||
background: #909090;
|
||||
color: white;
|
||||
content: " Console ";
|
||||
font-family: SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",Courier,monospace;
|
||||
font-size: 14px;
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
div.highlight-rst, div.highlight-rest .highlight:before{
|
||||
background: #909090;
|
||||
color: white;
|
||||
content: " reStructuredText ";
|
||||
font-family: SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",Courier,monospace;
|
||||
font-size: 14px;
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
div.highlight-yaml .highlight:before{
|
||||
background: #909090;
|
||||
color: white;
|
||||
content: " yaml ";
|
||||
font-family: SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",Courier,monospace;
|
||||
font-size: 14px;
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
div.highlight-bash .highlight:before{
|
||||
background: #909090;
|
||||
color: white;
|
||||
content: " bash ";
|
||||
font-family: SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",Courier,monospace;
|
||||
font-size: 14px;
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
div.highlight-diff .highlight:before{
|
||||
background: #909090;
|
||||
color: white;
|
||||
content: " Diff ";
|
||||
font-family: SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",Courier,monospace;
|
||||
font-size: 14px;
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
div.highlight-c .highlight:before{
|
||||
background: #909090;
|
||||
color: white;
|
||||
content: " c ";
|
||||
font-family: SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",Courier,monospace;
|
||||
font-size: 14px;
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
div.highlight-json .highlight:before{
|
||||
background: #909090;
|
||||
color: white;
|
||||
content: " json ";
|
||||
font-family: SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",Courier,monospace;
|
||||
font-size: 14px;
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
div.highlight-spec .highlight:before{
|
||||
background: #909090;
|
||||
color: white;
|
||||
content: " spec ";
|
||||
font-family: SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",Courier,monospace;
|
||||
font-size: 14px;
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
div.highlight-perl .highlight:before{
|
||||
background: #909090;
|
||||
color: white;
|
||||
content: " Perl ";
|
||||
font-family: SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",Courier,monospace;
|
||||
font-size: 14px;
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
div.highlight-php .highlight:before{
|
||||
background: #909090;
|
||||
color: white;
|
||||
content: " php ";
|
||||
font-family: SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",Courier,monospace;
|
||||
font-size: 14px;
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
div.highlight-xml .highlight:before{
|
||||
background: #909090;
|
||||
color: white;
|
||||
content: " xml ";
|
||||
font-family: SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",Courier,monospace;
|
||||
font-size: 14px;
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
div.linenodiv:before { /*add extra new line to make sure code and line numbers align*/
|
||||
content: '\00000a';
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
/*End support for labeled code-blocks*/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user