Spaces:
Sleeping
Sleeping
Slow hero typing loop timing
Browse files
app.py
CHANGED
|
@@ -764,9 +764,10 @@ INDEX_HTML = r"""<!DOCTYPE html>
|
|
| 764 |
const highlight = 'short clips';
|
| 765 |
const highlightStart = text.indexOf(highlight);
|
| 766 |
const highlightEnd = highlightStart + highlight.length;
|
| 767 |
-
const typeMs =
|
| 768 |
-
const eraseMs =
|
| 769 |
-
const
|
|
|
|
| 770 |
let index = 0;
|
| 771 |
let deleting = false;
|
| 772 |
|
|
@@ -797,7 +798,7 @@ INDEX_HTML = r"""<!DOCTYPE html>
|
|
| 797 |
render(index);
|
| 798 |
if (index === 0) {
|
| 799 |
deleting = false;
|
| 800 |
-
setTimeout(step,
|
| 801 |
return;
|
| 802 |
}
|
| 803 |
} else {
|
|
@@ -805,7 +806,7 @@ INDEX_HTML = r"""<!DOCTYPE html>
|
|
| 805 |
render(index);
|
| 806 |
if (index === text.length) {
|
| 807 |
deleting = true;
|
| 808 |
-
setTimeout(step,
|
| 809 |
return;
|
| 810 |
}
|
| 811 |
}
|
|
@@ -813,7 +814,7 @@ INDEX_HTML = r"""<!DOCTYPE html>
|
|
| 813 |
}
|
| 814 |
|
| 815 |
render(index);
|
| 816 |
-
setTimeout(step,
|
| 817 |
}
|
| 818 |
|
| 819 |
startHeroTyping();
|
|
|
|
| 764 |
const highlight = 'short clips';
|
| 765 |
const highlightStart = text.indexOf(highlight);
|
| 766 |
const highlightEnd = highlightStart + highlight.length;
|
| 767 |
+
const typeMs = 3500;
|
| 768 |
+
const eraseMs = 3500;
|
| 769 |
+
const emptyHoldMs = 800;
|
| 770 |
+
const fullHoldMs = 4000;
|
| 771 |
let index = 0;
|
| 772 |
let deleting = false;
|
| 773 |
|
|
|
|
| 798 |
render(index);
|
| 799 |
if (index === 0) {
|
| 800 |
deleting = false;
|
| 801 |
+
setTimeout(step, emptyHoldMs);
|
| 802 |
return;
|
| 803 |
}
|
| 804 |
} else {
|
|
|
|
| 806 |
render(index);
|
| 807 |
if (index === text.length) {
|
| 808 |
deleting = true;
|
| 809 |
+
setTimeout(step, fullHoldMs);
|
| 810 |
return;
|
| 811 |
}
|
| 812 |
}
|
|
|
|
| 814 |
}
|
| 815 |
|
| 816 |
render(index);
|
| 817 |
+
setTimeout(step, emptyHoldMs);
|
| 818 |
}
|
| 819 |
|
| 820 |
startHeroTyping();
|