Skip to content

Commit b089652

Browse files
committed
apply suggestions from comments on adityatelange#345
1 parent 390d4d1 commit b089652

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

assets/css/common/main.css

+6-3
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,18 @@ div.highlight {
5252
display: none;
5353
position: absolute;
5454
top: 4px;
55-
right: 16px;
56-
color: var(--secondary);
55+
right: 4px;
56+
color: rgba(255, 255, 255, 0.8);
57+
background: rgba(78, 78, 78, 0.8);
58+
border-radius: var(--radius);
59+
padding: 0 5px;
60+
font-size: 14px;
5761
}
5862

5963
div.highlight:hover .copy-code {
6064
display: block;
6165
}
6266

6367
.copy-code:hover {
64-
cursor: pointer;
6568
text-decoration: underline;
6669
}

layouts/partials/footer.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,9 @@
102102
document.querySelectorAll('pre > code').forEach((codeblock) => {
103103
const container = codeblock.parentNode.parentNode;
104104

105-
const copybutton = document.createElement('div');
105+
const copybutton = document.createElement('button');
106106
copybutton.classList.add('copy-code');
107-
copybutton.innerHTML = 'copy';
107+
copybutton.innerText = 'copy';
108108

109109
function copyingDone() {
110110
copybutton.innerText = 'copied!';

0 commit comments

Comments
 (0)