Spaces:
Running
Running
Upload 3 files
Browse files- index.html +1 -0
- script.js +6 -1
index.html
CHANGED
|
@@ -55,6 +55,7 @@
|
|
| 55 |
<a href="#interactive-demo" class="nav-dot"
|
| 56 |
data-tooltip="Try It"></a>
|
| 57 |
<a href="#text-handling" class="nav-dot" data-tooltip="Text handling"></a>
|
|
|
|
| 58 |
<a href="#features" class="nav-dot" data-tooltip="Features"></a>
|
| 59 |
<a href="#languages" class="nav-dot" data-tooltip="Programming languages"></a>
|
| 60 |
<a href="#research" class="nav-dot" data-tooltip="Research"></a>
|
|
|
|
| 55 |
<a href="#interactive-demo" class="nav-dot"
|
| 56 |
data-tooltip="Try It"></a>
|
| 57 |
<a href="#text-handling" class="nav-dot" data-tooltip="Text handling"></a>
|
| 58 |
+
<a href="#built-with" class="nav-dot" data-tooltip="Built with Supertonic"></a>
|
| 59 |
<a href="#features" class="nav-dot" data-tooltip="Features"></a>
|
| 60 |
<a href="#languages" class="nav-dot" data-tooltip="Programming languages"></a>
|
| 61 |
<a href="#research" class="nav-dot" data-tooltip="Research"></a>
|
script.js
CHANGED
|
@@ -517,8 +517,13 @@ document.addEventListener('DOMContentLoaded', () => {
|
|
| 517 |
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
|
| 518 |
anchor.addEventListener('click', function (e) {
|
| 519 |
e.preventDefault();
|
| 520 |
-
const
|
|
|
|
| 521 |
if (target) {
|
|
|
|
|
|
|
|
|
|
|
|
|
| 522 |
target.scrollIntoView({
|
| 523 |
behavior: 'smooth',
|
| 524 |
block: 'start'
|
|
|
|
| 517 |
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
|
| 518 |
anchor.addEventListener('click', function (e) {
|
| 519 |
e.preventDefault();
|
| 520 |
+
const href = this.getAttribute('href');
|
| 521 |
+
const target = document.querySelector(href);
|
| 522 |
if (target) {
|
| 523 |
+
// Update URL with anchor
|
| 524 |
+
if (history.pushState) {
|
| 525 |
+
history.pushState(null, null, href);
|
| 526 |
+
}
|
| 527 |
target.scrollIntoView({
|
| 528 |
behavior: 'smooth',
|
| 529 |
block: 'start'
|