feat: copy button
This commit is contained in:
1 parent
da99471ca5
commit
ed2c47aab2
4 files changed
+91
-25
No files matched your search
+8
-19
@@ -33,18 +33,6 @@ h1 {
|
||||
font-size: 2rem;
|
||||
}
|
||||
|
||||
.steps-container {
|
||||
counter-reset: step;
|
||||
}
|
||||
|
||||
.steps-container .relative {
|
||||
counter-increment: step;
|
||||
}
|
||||
|
||||
.steps-container .relative div:first-child::before {
|
||||
content: counter(step);
|
||||
}
|
||||
|
||||
/* Shiki Code-Blöcke stylen */
|
||||
pre {
|
||||
padding: 1rem;
|
||||
@@ -94,6 +82,7 @@ figure[data-rehype-pretty-code-figure] code {
|
||||
font-family: var(--font-mono, monospace);
|
||||
}
|
||||
|
||||
/* Container für den Code-Block */
|
||||
/* Container für den Code-Block */
|
||||
figure[data-rehype-pretty-code-figure] {
|
||||
position: relative;
|
||||
@@ -101,22 +90,22 @@ figure[data-rehype-pretty-code-figure] {
|
||||
margin-bottom: 1.5rem;
|
||||
border-radius: 0.75rem;
|
||||
overflow: hidden;
|
||||
border: 1px solid #27272a; /* Tailwind zinc-800 */
|
||||
border: 1px solid #27272a;
|
||||
background-color: #0d1117;
|
||||
}
|
||||
|
||||
/* Eventuelle leere Pseudo-Elemente der Figure deaktivieren */
|
||||
/* Leeres Pseudo-Element der Figure deaktivieren */
|
||||
figure[data-rehype-pretty-code-figure]::before {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/* Das Sprach-Badge ganz nach links rücken */
|
||||
/* Sprach-Badge links oben */
|
||||
figure[data-rehype-pretty-code-figure] pre[data-language]::before {
|
||||
content: attr(data-language);
|
||||
display: block !important;
|
||||
position: absolute;
|
||||
top: 0.6rem;
|
||||
left: 0.6rem; /* <-- Auf 0.5rem (oder 0.4rem) verringert für noch weiter links */
|
||||
left: 0.5rem;
|
||||
font-family: var(--font-mono, ui-monospace, monospace);
|
||||
font-size: 0.68rem;
|
||||
font-weight: 600;
|
||||
@@ -128,14 +117,14 @@ figure[data-rehype-pretty-code-figure] pre[data-language]::before {
|
||||
padding: 0.15rem 0.5rem;
|
||||
border-radius: 0.375rem;
|
||||
pointer-events: none;
|
||||
z-index: 20;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
/* Platz oben für das Badge schaffen */
|
||||
/* Platz oben im Code-Block */
|
||||
figure[data-rehype-pretty-code-figure] pre {
|
||||
margin: 0 !important;
|
||||
padding: 1rem !important;
|
||||
padding-top: 2.4rem !important; /* Genügend Abstand nach oben */
|
||||
padding-top: 2.6rem !important; /* Platz für Badge & Button */
|
||||
background-color: transparent !important;
|
||||
overflow-x: auto;
|
||||
font-size: 0.875rem;
|
||||
|
||||
Reference in new issue
Block a user