Copy btn on code blocks, tweaked code block styling

This commit is contained in:
2023-07-09 22:28:26 +02:00
parent 0f123651fb
commit a43f2463e2
5 changed files with 75 additions and 68 deletions

View File

@@ -1,6 +1,6 @@
// This assumes that you're using Rouge; if not, update the selector
// const codeBlocks = document.querySelectorAll('.code-header + .highlighter-rouge');
const codeBlocks = document.querySelectorAll('.highlight');
const codeBlocks = document.querySelectorAll('div.highlight');
const copyCodeButtons = document.querySelectorAll('.copy-code-button');
codeBlocks.forEach((codeBlock) => {