Skip to content
This repository was archived by the owner on Sep 29, 2025. It is now read-only.

Commit f5aa813

Browse files
committed
Extra credit
1 parent 40a1597 commit f5aa813

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

src/pages/refactor.tsx

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ import {
1111
UlLi,
1212
ForegroundHighlight,
1313
A,
14-
Code,
15-
Hr
14+
Code
1615
} from 'src/components/ContentTags'
1716
import * as snippets from 'src/lib/snippets'
1817
import TwitterLink from 'src/components/TwitterLink'
@@ -26,6 +25,7 @@ import InternalLink from 'src/components/InternalLink'
2625
import { articlesData } from 'src/lib/articles'
2726
import { baseUrl } from 'src/lib/meta'
2827
import { SourceAvailableText } from 'src/components/GitHubButton'
28+
import RunButtonText from 'src/components/RunButtonText'
2929

3030
const techniques = [
3131
{
@@ -303,9 +303,18 @@ const Page = () => (
303303
<Code>letter-spacing</Code> to fit more characters.
304304
</UlLi>
305305
</Ul>
306-
<Hr />
307306
<P>
308-
<strong>Why is this necessary?</strong>{' '}
307+
<strong>Extra Credit:</strong>{' '}
308+
<Highlight>
309+
It’d be ideal if you can easily <strong>run (or test)</strong>{' '}
310+
code examples on mobile.
311+
</Highlight>{' '}
312+
My tutorials support this—you can run code by pressing{' '}
313+
<RunButtonText /> on mobile or desktop.
314+
</P>
315+
<CodeBlock snippet={snippets.lplh} result="3" />
316+
<P>
317+
<strong>Now, why is mobile reading experience important?</strong>{' '}
309318
<Highlight>
310319
Because many people <em>actually</em> read coding tutorials on
311320
their phone.
@@ -455,7 +464,6 @@ const Page = () => (
455464
be solved by generics…without using generics. And fail. Then, I
456465
use generics to successfully solve the problem.
457466
</P>
458-
<Hr />
459467
<P>
460468
In a way, this is similar to{' '}
461469
<strong>test driven development (TDD)</strong>. In TDD, you write

0 commit comments

Comments
 (0)