Skip to content

Commit 80a82a0

Browse files
committed
fix: typewriter display
1 parent 36b078b commit 80a82a0

File tree

2 files changed

+28
-35
lines changed

2 files changed

+28
-35
lines changed

Diff for: src/routes/+layout.svelte

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script>
2-
import Typewriter from "svelte-typewriter";
2+
import { concurrent } from "svelte-typewriter";
33
import Header from "./Header.svelte";
44
import "./styles.css";
55
</script>
@@ -13,10 +13,10 @@
1313

1414
<footer>
1515
<p>
16-
visit <Typewriter element="span"
16+
visit <span use:concurrent={{ interval: 15 }}
1717
><a href="https://docs.yieldlang.com" target="_blank"
1818
>docs.yieldlang.com</a
19-
></Typewriter
19+
></span
2020
> to learn YieldLang
2121
</p>
2222
</footer>

Diff for: src/routes/about/+page.svelte

+25-32
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script lang="ts">
2-
import Typewriter from "svelte-typewriter";
2+
import { concurrent } from "svelte-typewriter";
33
</script>
44

55
<svelte:head>
@@ -8,11 +8,9 @@
88
</svelte:head>
99

1010
<div class="text-column">
11-
<Typewriter interval={60}>
12-
<h1>
13-
<span>About the</span> <code>YieldLang</code>
14-
</h1>
15-
</Typewriter>
11+
<h1 use:concurrent={{ interval: 60 }} style="min-height: 1.5em">
12+
<span>About the</span> <code>YieldLang</code>
13+
</h1>
1614

1715
<p>
1816
<code>YieldLang</code> is a
@@ -30,32 +28,27 @@
3028
terminal:
3129
</p>
3230

33-
<Typewriter interval={60}>
34-
<pre style="user-select: all; white-space: break-spaces;"><code
35-
style="margin-right: 0.5em; user-select: none;">$</code
36-
><span class="pip">pip</span> <span class="install">install</span
37-
> <span>yieldlang</span></pre>
38-
</Typewriter>
39-
<Typewriter interval={8}>
40-
<ul>
41-
<li>🧠 Based on a coroutine generator and sampler architecture</li>
42-
<li>
43-
🤖 Stream-sends characters and parses the context above into a
44-
syntax tree
45-
</li>
46-
<li>
47-
🦾 Build formal grammars with classes, methods, and combinators
48-
</li>
49-
</ul>
50-
</Typewriter>
51-
<Typewriter interval={15}>
52-
<p>
53-
<span>More information on the GitHub home page:</span>
54-
<a href="https://github.com/YieldLang" target="_blank"
55-
><b>github.com/YieldLang</b></a
56-
>
57-
</p>
58-
</Typewriter>
31+
<pre
32+
style="user-select: all; white-space: break-spaces; min-height: 1em"
33+
use:concurrent={{ interval: 60 }}><code
34+
style="margin-right: 0.5em; user-select: none;">$</code
35+
><span class="pip">pip</span> <span class="install">install</span> <span
36+
>yieldlang</span
37+
></pre>
38+
<ul use:concurrent={{ interval: 7 }} style="min-height: 1em">
39+
<li>🧠 Based on a coroutine generator and sampler architecture</li>
40+
<li>
41+
🤖 Stream-sends characters and parses the context above into a
42+
syntax tree
43+
</li>
44+
<li>🦾 Build formal grammars with classes, methods, and combinators</li>
45+
</ul>
46+
<p use:concurrent={{ interval: 15 }} style="min-height: 1em">
47+
<span>More information on the GitHub home page:</span>
48+
<a href="https://github.com/YieldLang" target="_blank"
49+
><b>github.com/YieldLang</b></a
50+
>
51+
</p>
5952
</div>
6053

6154
<style>

0 commit comments

Comments
 (0)