|
9 | 9 | const wrapper = document.createElement('div');
|
10 | 10 |
|
11 | 11 | if (block.parentElement.classList.contains("expand-content")) {
|
12 |
| - wrapper.style = 'position:absolute;top:10px;right:20px;z-index:1;display:flex;align-items:center;gap:6px;'; |
| 12 | + wrapper.style = 'position:absolute;top:24px;right:20px;z-index:1;display:flex;align-items:center;gap:6px;'; |
13 | 13 | } else {
|
14 |
| - wrapper.style = 'position:absolute;top:10px;right:10px;z-index:1;display:flex;align-items:center;gap:6px;'; |
| 14 | + wrapper.style = 'position:absolute;top:24px;right:10px;z-index:1;display:flex;align-items:center;gap:6px;'; |
15 | 15 | }
|
16 | 16 |
|
17 | 17 | // Check if this is a YAML embed with download functionality
|
|
20 | 20 |
|
21 | 21 | // Create the copy button
|
22 | 22 | const button = document.createElement('button');
|
| 23 | + button.className = 'clipboard-button text-neutral-400 hover:text-slate-100 bg-slate-600 relative h-8 w-8 p-1 rounded rounded-mx'; |
| 24 | + button.title = 'Copy to clipboard'; |
23 | 25 | button.innerHTML = `
|
24 |
| - <button class="clipboard-button text-neutral-400 hover:text-slate-100 bg-slate-600 relative h-7 w-7 p-1 rounded rounded-mx" title="Copy to clipboard"> |
25 |
| - <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" fill="currentColor"> |
26 |
| - <path d="M9 43.95q-1.2 0-2.1-.9-.9-.9-.9-2.1V10.8h3v30.15h23.7v3Zm6-6q-1.2 0-2.1-.9-.9-.9-.9-2.1v-28q0-1.2.9-2.1.9-.9 2.1-.9h22q1.2 0 2.1.9.9.9.9 2.1v28q0 1.2-.9 2.1-.9.9-2.1.9Zm0-3h22v-28H15v28Zm0 0v-28 28Z"></path> |
27 |
| - </svg> |
28 |
| - `; |
| 26 | + <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" fill="currentColor"> |
| 27 | + <path d="M9 43.95q-1.2 0-2.1-.9-.9-.9-.9-2.1V10.8h3v30.15h23.7v3Zm6-6q-1.2 0-2.1-.9-.9-.9-.9-2.1v-28q0-1.2.9-2.1.9-.9 2.1-.9h22q1.2 0 2.1.9.9.9.9 2.1v28q0 1.2-.9 2.1-.9.9-2.1.9Zm0-3h22v-28H15v28Zm0 0v-28 28Z"></path> |
| 28 | + </svg> |
| 29 | + `; |
29 | 30 |
|
30 | 31 | // Create the tooltip container
|
31 | 32 | const tooltipContainer = document.createElement('div');
|
|
58 | 59 |
|
59 | 60 | // Append copy button
|
60 | 61 | wrapper.appendChild(button);
|
61 |
| - wrapper.appendChild(tooltipContainer); |
62 | 62 |
|
63 | 63 | // Add download button if this is a YAML embed
|
64 | 64 | if (downloadFilename) {
|
65 | 65 | const downloadButton = document.createElement('button');
|
66 |
| - downloadButton.className = 'download-yaml-btn text-neutral-400 hover:text-slate-100 bg-slate-600 h-7 w-7 p-1 rounded rounded-mx'; |
| 66 | + downloadButton.className = 'download-yaml-btn text-neutral-400 hover:text-slate-100 bg-slate-600 h-8 w-8 p-1 rounded rounded-mx'; |
67 | 67 | downloadButton.title = 'Download YAML file';
|
68 | 68 | downloadButton.innerHTML = `
|
69 |
| - <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="currentColor"> |
| 69 | + <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"> |
70 | 70 | <path d="M12 16l-6-6h4V4h4v6h4l-6 6zm-6 2h12v2H6v-2z"/>
|
71 | 71 | </svg>
|
72 | 72 | `;
|
|
0 commit comments