Update index.html
Browse files- index.html +20 -7
index.html
CHANGED
@@ -303,13 +303,13 @@ footer {
|
|
303 |
<h1>LuminAI API Client</h1>
|
304 |
</header>
|
305 |
<div class="container">
|
306 |
-
<div class="toggle-switch">
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
<div class="main">
|
314 |
<h2>Introduction</h2>
|
315 |
<p>This document provides a simple JavaScript client for interacting with the LuminAI API. The client allows you to send requests with various parameters and receive results from the API.</p>
|
@@ -458,6 +458,19 @@ themeSwitch.addEventListener('change', () => {
|
|
458 |
console.error('Failed to copy: ', err);
|
459 |
});
|
460 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
461 |
</script>
|
462 |
</body>
|
463 |
</html>
|
|
|
303 |
<h1>LuminAI API Client</h1>
|
304 |
</header>
|
305 |
<div class="container">
|
306 |
+
<div class="toggle-switch" style="position: absolute; top: 10px; right: 10px;">
|
307 |
+
<input type="checkbox" id="theme-switch">
|
308 |
+
<label for="theme-switch">
|
309 |
+
<div class="sun"></div>
|
310 |
+
<div class="moon"></div>
|
311 |
+
</label>
|
312 |
+
</div>
|
313 |
<div class="main">
|
314 |
<h2>Introduction</h2>
|
315 |
<p>This document provides a simple JavaScript client for interacting with the LuminAI API. The client allows you to send requests with various parameters and receive results from the API.</p>
|
|
|
458 |
console.error('Failed to copy: ', err);
|
459 |
});
|
460 |
}
|
461 |
+
|
462 |
+
window.onscroll = function() {scrollFunction()};
|
463 |
+
|
464 |
+
function scrollFunction() {
|
465 |
+
if (document.body.scrollTop > 50 || document.documentElement.scrollTop > 50) {
|
466 |
+
document.querySelector("header").style.padding = "10px 0";
|
467 |
+
document.querySelector("header h1").style.fontSize = "2em";
|
468 |
+
} else {
|
469 |
+
document.querySelector("header").style.padding = "40px 0";
|
470 |
+
document.querySelector("header h1").style.fontSize = "2.5em";
|
471 |
+
}
|
472 |
+
}
|
473 |
+
|
474 |
</script>
|
475 |
</body>
|
476 |
</html>
|