feat: Add initial HTML, CSS, and JavaScript for ZDTT Terminal interface

This commit is contained in:
2025-11-12 22:03:06 -05:00
parent 2e67031175
commit 4cb5559b40
3 changed files with 0 additions and 0 deletions

35
script.js Normal file
View File

@@ -0,0 +1,35 @@
document.addEventListener('DOMContentLoaded', () => {
const navToggle = document.querySelector('.nav__toggle');
const navLinks = document.querySelector('.nav__links');
const yearEl = document.getElementById('year');
if (yearEl) {
yearEl.textContent = new Date().getFullYear();
}
if (navToggle && navLinks) {
navToggle.addEventListener('click', () => {
navLinks.classList.toggle('is-open');
});
}
document.querySelectorAll('[data-copy]').forEach((button) => {
button.addEventListener('click', () => {
const target = document.querySelector(button.dataset.copy);
if (!target) {
return;
}
navigator.clipboard?.writeText(target.textContent.trim()).then(() => {
button.textContent = 'Copied!';
setTimeout(() => {
button.textContent = 'Copy Install Command';
}, 1800);
}).catch(() => {
button.textContent = 'Unable to copy';
setTimeout(() => {
button.textContent = 'Copy Install Command';
}, 1800);
});
});
});
});