Start animation on button click

This commit is contained in:
Thomas Smith 2023-02-03 19:25:03 -05:00
parent 3d8b1246b5
commit 30489e0a3a

View file

@ -289,6 +289,12 @@
<div class="traffic-light"></div>
<div class="traffic-light"></div>
</div>
<div class="flex p-2" style="border-bottom: 1px solid gray;">
<div class="flex pt-2 pb-2 ps-4 pe-2" style="width: 100%; border: 1px solid #949494; border-radius: 5px;">
<code id="copy-text" class="white">sh <(curl tea.xyz)</code>
<button class="hbtn hb-fill-right" id="start-btn">Run Demo</button>
</div>
</div>
<div class="terminal-content p-xl-5 p-lg-5 p-md-5 p-sm-2 p-3">
<code id="terminal-output-2"></code>
</div>
@ -301,7 +307,7 @@
const commands2 = [
{ input: "$ node --eval 'console.log(\"Hello World!\")'", output: `command not found: node<br><span class="dark-gray">#Node is not installed, thus command is not found :/ ...</span><br>` },
{ input: "$ sh <(curl tea.xyz) --yes", output: `installing ~/.tea...<br><table class="teal">
<thead>
<thead>
<tr>
<th>% Total</th>
<th>% Received</th>
@ -312,8 +318,8 @@
<th>Time</th>
<th>Current</th>
</tr>
</thead>
<tbody>
</thead>
<tbody>
<tr>
<td>100</td>
<td>13306</td>
@ -327,9 +333,9 @@
<tr>
<td colspan="8">k, we installed <mark>/Users/userName/.tea/tea.xyz/v0.21.0/bin/tea</mark></td>
</tr>
</tbody>
</table>
` },
</tbody>
</table>
` },
{ input: "$ node --eval 'console.log(\"Hello World!\")'", output: `tea: installing nodejs.org^19<br><span class="dark-gray">#tea magically installs needed dependencies...</span>` },
{ input: "", output: `Hello World! &#128526;<br><span class="dark-gray">#and tah-dah!</span>` },
];
@ -356,7 +362,7 @@
setTimeout(typeCommand2, 100);
}
typeCommand2();
document.querySelector("#start-btn").addEventListener("click", typeCommand2);
</script>
<div class="divider">