VictoriaMetrics/docs/assets/css/clipboard.css
Roman Khavronenko 75f12bfe78
add option to add Copy button for code snippets (#1433)
To add a Copy button wrap code snippet with the following element:
```
<div class="with-copy" markdown="1">

<your-code-snippet>

</div>
```

See the changes to `Kubernetes monitoring with VictoriaMetrics Single` for details.
2021-07-06 08:23:39 +03:00

23 lines
No EOL
491 B
CSS

/* modification for button copy */
.btn-copy {
position: absolute;
color: #FFF;
background: rgba(0, 0, 0, .15);
border: 0;
padding: 2px 10px;
cursor: pointer;
right: 0px;
top: 0px;
}
.btn-copy:hover {
background: rgba(0, 0, 0, .25);
}
/* shift snippet syntax type label if Copy button is enabled */
.with-copy div.highlighter-rouge:after {
right: 50px !important;
}
.markdown-body .highlight pre, .markdown-body pre {
padding: 20px !important;
}