mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2025-12-06 09:59:28 +00:00
contrib/html: add a class for code...
... and make sure the notification generator does not suffer strange styles.
This commit is contained in:
parent
94514a7c75
commit
ea9e843ae9
2 changed files with 4 additions and 2 deletions
|
|
@ -14,7 +14,7 @@ markdown -f toc,idanchor "${1}" | sed \
|
||||||
-e 's/href="\([-_\./[:alnum:]]*\)\.md\(#[-[:alnum:]]*\)\?"/href="\1.html\2"/g' \
|
-e 's/href="\([-_\./[:alnum:]]*\)\.md\(#[-[:alnum:]]*\)\?"/href="\1.html\2"/g' \
|
||||||
-e '/<h[1234] /s| id="\(.*\)">| id="\L\1">|' \
|
-e '/<h[1234] /s| id="\(.*\)">| id="\L\1">|' \
|
||||||
-e '/<h[1234] /s|-2[1789cd]-||g' -e '/<h[1234] /s|--26-amp-3b-||g' \
|
-e '/<h[1234] /s|-2[1789cd]-||g' -e '/<h[1234] /s|--26-amp-3b-||g' \
|
||||||
-e '/^<pre>/s|pre|pre onclick="CopyToClipboard(this)"|g' \
|
-e '/^<pre>/s|pre|pre class="code" onclick="CopyToClipboard(this)"|g' \
|
||||||
-e '/The above link may be broken on code hosting sites/s|blockquote|blockquote style="display: none;"|'
|
-e '/The above link may be broken on code hosting sites/s|blockquote|blockquote style="display: none;"|'
|
||||||
|
|
||||||
sed \
|
sed \
|
||||||
|
|
|
||||||
|
|
@ -58,6 +58,8 @@ p.hint {
|
||||||
pre {
|
pre {
|
||||||
font-family: fira-mono, monospace;
|
font-family: fira-mono, monospace;
|
||||||
white-space: pre-wrap;
|
white-space: pre-wrap;
|
||||||
|
}
|
||||||
|
pre.code {
|
||||||
background-color: #f8f8f8;
|
background-color: #f8f8f8;
|
||||||
border: 1px solid #ccc;
|
border: 1px solid #ccc;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
|
|
@ -69,7 +71,7 @@ pre code {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
border: 0;
|
border: 0;
|
||||||
}
|
}
|
||||||
pre::before {
|
pre.code::before {
|
||||||
content: "📋 Copy!";
|
content: "📋 Copy!";
|
||||||
float: right;
|
float: right;
|
||||||
border: 1px solid #ccc;
|
border: 1px solid #ccc;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue