Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion assets/copy-code.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,6 @@ document
}, 1200);
})
});
pre.appendChild(button);
const container = pre.closest('div.highlighter-rouge') || pre;
container.appendChild(button);
});
10 changes: 5 additions & 5 deletions assets/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ article > ul {
div.highlighter-rouge {
font-family: Courier, monospace;
background: #fff;
@apply p-2 shadow block;
@apply p-2 shadow block relative;
@apply text-xs p-2 mb-4 mt-4 pl-4 pt-4;
@apply rounded-xl;
@apply border-2 border-gray-700 dark:border-slate-200;
Expand All @@ -57,10 +57,10 @@ code.highlighter-rouge {
@apply bg-gray-200 dark:bg-slate-600;
}

pre.highlight > button {
@apply inline-block absolute top-1 right-1 h-8 ;
div.highlighter-rouge > button {
@apply inline-block absolute bottom-1 right-1 h-8;
@apply cursor-pointer box-border;
@apply mx-4 px-2;
@apply px-2;
@apply uppercase text-center;
@apply opacity-50 hover:opacity-100;
@apply rounded-xl border-2;
Expand All @@ -71,5 +71,5 @@ pre.highlight > button {
}

pre.highlight {
@apply relative min-h-12;
@apply min-h-12;
}
2 changes: 1 addition & 1 deletion dist/style.85d6c0d198753c92aa37.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.