(feat) copy code content
Signed-off-by: Gato <cedric@goutailler-olivier.fr>
This commit is contained in:
@@ -455,6 +455,29 @@ body {
|
||||
.content pre:not(.syntax-highlighting) { background: #f4f4f7; }
|
||||
.content pre code { background: none; padding: 0; font-weight: 400; font-size: 13px; border: none; border-radius: 0; color: inherit; }
|
||||
|
||||
/* ── Bouton « copier » des blocs de code ── */
|
||||
.content .code-block { position: relative; }
|
||||
.content .code-block .copy-code-btn {
|
||||
position: absolute;
|
||||
top: 24px;
|
||||
right: 12px;
|
||||
padding: 4px 10px;
|
||||
font-family: inherit;
|
||||
font-size: 12px;
|
||||
line-height: 1.2;
|
||||
color: #c0c5ce;
|
||||
background: rgba(255, 255, 255, 0.08);
|
||||
border: 1px solid rgba(255, 255, 255, 0.18);
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
opacity: 0;
|
||||
transition: opacity 0.15s ease, background 0.15s ease;
|
||||
}
|
||||
.content .code-block:hover .copy-code-btn,
|
||||
.content .code-block .copy-code-btn:focus-visible { opacity: 1; }
|
||||
.content .code-block .copy-code-btn:hover { background: rgba(255, 255, 255, 0.18); }
|
||||
.content .code-block .copy-code-btn.copied { color: #a3be8c; border-color: rgba(163, 190, 140, 0.5); }
|
||||
|
||||
/* ── Coloration syntaxique (base16-ocean.dark) ── */
|
||||
.syntax-highlighting {
|
||||
color: #c0c5ce;
|
||||
|
||||
Reference in New Issue
Block a user