Switch to Ametrine

This commit is contained in:
root 2025-03-04 04:23:12 +01:00
parent 8d2b031b5a
commit 53353f0a94
76 changed files with 6164 additions and 2645 deletions

View file

@ -10,18 +10,27 @@ document.addEventListener("DOMContentLoaded", function () {
title.innerHTML = lang;
// Copy button icon
let icon = document.createElement("i");
icon.classList.add("icon");
let iconCopy = document.createElement("i");
iconCopy.classList.add("ph-bold", "ph-copy");
let iconCheck = document.createElement("i");
iconCheck.classList.add("ph-bold", "ph-check-square-offset");
// Copy button
let button = document.createElement("button");
let copyCodeText = document.getElementById("copy-code-text").textContent;
button.setAttribute("title", copyCodeText)
button.appendChild(icon);
button.setAttribute("title", copyCodeText);
button.appendChild(iconCopy);
button.appendChild(iconCheck);
// Code block header
let header = document.createElement("div");
header.classList.add("header");
if (block.classList.contains("z-code")) {
header.classList.add("z-code");
}
header.appendChild(title);
header.appendChild(button);
@ -35,7 +44,7 @@ document.addEventListener("DOMContentLoaded", function () {
container.appendChild(block);
button.addEventListener("click", async () => {
await copyCode(block, header, button); // Pass the button here
await copyCode(block, header, button);
});
}
});