Update index.html
Browse files- index.html +31 -17
index.html
CHANGED
@@ -215,13 +215,13 @@
|
|
215 |
|
216 |
.toggle-switch .sun {
|
217 |
left: 2px;
|
218 |
-
background: url('https://
|
219 |
background-size: cover;
|
220 |
}
|
221 |
|
222 |
.toggle-switch .moon {
|
223 |
right: 2px;
|
224 |
-
background: url('https://
|
225 |
background-size: cover;
|
226 |
}
|
227 |
|
@@ -248,6 +248,22 @@
|
|
248 |
.button:active {
|
249 |
background-color: #004080;
|
250 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
251 |
</style>
|
252 |
</head>
|
253 |
<body>
|
@@ -384,21 +400,19 @@ lumin("query", "username", "logic", true)
|
|
384 |
fetchStats();
|
385 |
|
386 |
function copyToClipboard(button) {
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
}
|
401 |
-
|
402 |
|
403 |
</script>
|
404 |
</body>
|
|
|
215 |
|
216 |
.toggle-switch .sun {
|
217 |
left: 2px;
|
218 |
+
background: url('https://upload.wikimedia.org/wikipedia/commons/e/e1/Full_Sun_Clipart.svg') no-repeat center;
|
219 |
background-size: cover;
|
220 |
}
|
221 |
|
222 |
.toggle-switch .moon {
|
223 |
right: 2px;
|
224 |
+
background: url('https://upload.wikimedia.org/wikipedia/commons/3/3a/Moon_clipart.svg') no-repeat center;
|
225 |
background-size: cover;
|
226 |
}
|
227 |
|
|
|
248 |
.button:active {
|
249 |
background-color: #004080;
|
250 |
}
|
251 |
+
|
252 |
+
/* Added styles for copy button animation */
|
253 |
+
.copy-btn img {
|
254 |
+
width: 24px;
|
255 |
+
height: 24px;
|
256 |
+
transition: transform 0.3s ease-in-out;
|
257 |
+
}
|
258 |
+
|
259 |
+
.copy-btn:hover img {
|
260 |
+
transform: rotate(360deg);
|
261 |
+
}
|
262 |
+
|
263 |
+
/* Added styles for code block copy button hover effect */
|
264 |
+
.copy-btn:hover {
|
265 |
+
background-color: #4a90e2;
|
266 |
+
}
|
267 |
</style>
|
268 |
</head>
|
269 |
<body>
|
|
|
400 |
fetchStats();
|
401 |
|
402 |
function copyToClipboard(button) {
|
403 |
+
const codeBlock = button.nextElementSibling.innerText;
|
404 |
+
navigator.clipboard.writeText(codeBlock).then(() => {
|
405 |
+
button.querySelector('img').src = 'https://cdn.iconscout.com/icon/free/png-256/check-1781599-1518574.png';
|
406 |
+
button.style.transform = 'scale(1.2)'; // Add a scale transform
|
407 |
+
button.style.transition = 'transform 0.3s ease'; // Add a smooth transition
|
408 |
+
setTimeout(() => {
|
409 |
+
button.querySelector('img').src = 'https://cdn.iconscout.com/icon/free/png-256/copy-1781607-1518582.png';
|
410 |
+
button.style.transform = 'scale(1)'; // Reset the transform
|
411 |
+
}, 2000);
|
412 |
+
}).catch(err => {
|
413 |
+
console.error('Failed to copy: ', err);
|
414 |
+
});
|
415 |
+
}
|
|
|
|
|
416 |
|
417 |
</script>
|
418 |
</body>
|