version 1 with webshell and docs
This commit is contained in:
16
src/docs.ts
Normal file
16
src/docs.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import './docs.css';
|
||||
|
||||
const copyBtn = document.getElementById('copyBtn') as HTMLButtonElement;
|
||||
const command = 'ssh portfolio@keshavanand.net';
|
||||
|
||||
if (copyBtn) {
|
||||
copyBtn.addEventListener('click', async () => {
|
||||
try {
|
||||
await navigator.clipboard.writeText(command);
|
||||
copyBtn.classList.add('copied');
|
||||
setTimeout(() => copyBtn.classList.remove('copied'), 2000);
|
||||
} catch (err) {
|
||||
console.error('Failed to copy:', err);
|
||||
}
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user