fix: lint

This commit is contained in:
George Cushen committed 2025-12-03 21:01:08 +00:00
1 parent 630d1fd6f5
commit 301b29448a
7 files changed
+47 -19

No files matched your search

@@ -14,7 +14,7 @@
/* Responsive height adjustments for mobile */
@media (max-width: 768px) {
height: 240px !important;
height: 240px;
min-height: 240px;
}
}
@@ -110,7 +110,7 @@
/* Print styles - show cover but optimize */
@media print {
.article-cover {
max-height: 200px !important;
max-height: 200px;
page-break-after: avoid;
}
@@ -125,12 +125,12 @@
.article-cover,
.article-cover *,
.article-cover-icon {
animation: none !important;
transition: none !important;
animation: none;
transition: none;
}
.article-cover.parallax img {
transform: none !important;
transform: none;
}
}
@@ -98,6 +98,6 @@
.prose code:not(:where(pre *))::before,
.prose code:not(:where(pre *))::after {
content: none !important;
content: none;
}
}
@@ -61,9 +61,9 @@ async function copyCodeToClipboard(button, codeWrapper) {
} catch (err) {
const errorMessage = err instanceof Error ? err.message : "Unknown error";
console.error("Failed to copy:", errorMessage);
button.innerHTML = i18n["copyFailed"] || "Failed";
button.innerHTML = i18n.copyFailed || "Failed";
setTimeout(() => {
button.innerHTML = i18n["copy"];
button.innerHTML = i18n.copy;
}, NOTIFICATION_DURATION);
throw err; // Re-throw for potential error boundary handling
}
@@ -74,12 +74,12 @@ async function copyCodeToClipboard(button, codeWrapper) {
* @param {HTMLElement} copyBtn - The copy button element
*/
function copiedNotification(copyBtn) {
copyBtn.innerHTML = i18n["copied"];
copyBtn.innerHTML = i18n.copied;
copyBtn.disabled = true;
copyBtn.classList.add("copied");
setTimeout(() => {
copyBtn.innerHTML = i18n["copy"];
copyBtn.innerHTML = i18n.copy;
copyBtn.disabled = false;
copyBtn.classList.remove("copied");
}, NOTIFICATION_DURATION);
@@ -92,8 +92,8 @@ function copiedNotification(copyBtn) {
function createCopyButton() {
const copyBtn = document.createElement("button");
copyBtn.classList.add("copy-button");
copyBtn.innerHTML = i18n["copy"];
copyBtn.setAttribute("aria-label", i18n["copyLabel"] || "Copy code to clipboard");
copyBtn.innerHTML = i18n.copy;
copyBtn.setAttribute("aria-label", i18n.copyLabel || "Copy code to clipboard");
copyBtn.setAttribute("type", "button"); // Explicit button type
return copyBtn;
}
@@ -1,6 +1,6 @@
function getCssVar(name) {
const value = getComputedStyle(document.documentElement).getPropertyValue(name).trim();
return value ? "rgb(" + value + ")" : null;
return value ? `rgb(${value})` : null;
}
window.mermaid.initialize({
+2 -2
View File
@@ -3,9 +3,9 @@
const applyScrollPadding = () => {
const header = document.querySelector(".page-header");
const position = header.getBoundingClientRect();
document.documentElement.style.scrollPaddingTop = position.height.toString() + "px";
document.documentElement.style.scrollPaddingTop = `${position.height.toString()}px`;
const r = document.querySelector(":root");
r.style.setProperty("--navbar-height", position.height.toString() + "px");
r.style.setProperty("--navbar-height", `${position.height.toString()}px`);
};
window.addEventListener("DOMContentLoaded", () => {