Skip to content

Commit c9e22c1

Browse files
fix code section + buttons
1 parent 557952c commit c9e22c1

File tree

2 files changed

+23
-15
lines changed

2 files changed

+23
-15
lines changed

index.html

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ <h2 id="navigate_description" tabindex="0" data-edit="true">
214214
<br />
215215
<button
216216
class="download_button"
217-
onclick="keyDown({key:2, code: 'Digit2'})"
217+
onclick="keyDown({key:'2', code: 'Digit2'})"
218218
tabindex="0"
219219
>
220220
Next section →
@@ -237,7 +237,7 @@ <h2 id="navigate_description" tabindex="0" data-edit="true">
237237
<br />
238238
<button
239239
class="download_button"
240-
onclick="keyDown({key:3, code: 'Digit3'})"
240+
onclick="keyDown({key:'3', code: 'Digit3'})"
241241
tabindex="0"
242242
>
243243
Next section →
@@ -331,7 +331,7 @@ <h2 id="navigate_description" tabindex="0" data-edit="true">
331331
<br />
332332
<button
333333
class="download_button"
334-
onclick="keyDown({key:4, code:'Digit4'})"
334+
onclick="keyDown({key:'4', code:'Digit4'})"
335335
tabindex="0"
336336
>
337337
Next section →
@@ -452,7 +452,7 @@ <h2 id="navigate_description" tabindex="0" data-edit="true">
452452
<br />
453453
<button
454454
class="download_button"
455-
onclick="keyDown({key:5, code:'Digit5'})"
455+
onclick="keyDown({key:'5', code:'Digit5'})"
456456
tabindex="0"
457457
>
458458
Next section →
@@ -483,7 +483,7 @@ <h2 id="navigate_description" tabindex="0" data-edit="true">
483483
<br />
484484
<button
485485
class="download_button"
486-
onclick="keyDown({key:6, code:'Digit6'})"
486+
onclick="keyDown({key:'6', code:'Digit6'})"
487487
tabindex="0"
488488
>
489489
Next section →
@@ -522,7 +522,7 @@ <h2 tabindex="0" data-edit="true">Play a game: ‘Guess the Character’</h2>
522522
<br />
523523
<button
524524
class="download_button"
525-
onclick="keyDown({key:7, code:'Digit7'})"
525+
onclick="keyDown({key:'7', code:'Digit7'})"
526526
tabindex="0"
527527
>
528528
Next section →
@@ -612,7 +612,7 @@ <h2>Choose download alternate characters</h2>
612612
<button
613613
class="download_button"
614614
tabindex="0"
615-
onclick="keyDown({key:8, code:'Digit8'})"
615+
onclick="keyDown({key:'8', code:'Digit8'})"
616616
>
617617
08 Install</button
618618
>.
@@ -624,7 +624,7 @@ <h2>Choose download alternate characters</h2>
624624
<br />
625625
<button
626626
class="download_button"
627-
onclick="keyDown({key:8, code:'Digit8'})"
627+
onclick="keyDown({key:'8', code:'Digit8'})"
628628
tabindex="0"
629629
>
630630
Next section →
@@ -654,7 +654,7 @@ <h2>Download CommitMono.zip:</h2>
654654
<p>
655655
<button
656656
class="download_button"
657-
onclick="keyDown({key:7, code:'Digit7'})"
657+
onclick="keyDown({key:'7', code:'Digit7'})"
658658
tabindex="0"
659659
>
660660
Customize download
@@ -738,7 +738,11 @@ <h2>Activate Commit Mono in your editor.</h2>
738738
</div>
739739
<br />
740740
<br />
741-
<button class="download_button" onclick="keyDown({key:9, code:'Digit9'})" tabindex="0">
741+
<button
742+
class="download_button"
743+
onclick="keyDown({key:'9', code:'Digit9'})"
744+
tabindex="0"
745+
>
742746
Next section →
743747
</button>
744748
</section>
@@ -867,7 +871,7 @@ <h2>Activate Commit Mono in your editor.</h2>
867871
<button
868872
class="download_button"
869873
tabindex="0"
870-
onclick="keyDown({key:7, code:'Digit7'})"
874+
onclick="keyDown({key:'7', code:'Digit7'})"
871875
>
872876
07 Customize</button
873877
>. However, that variable font does not contain custom settings. You
@@ -876,7 +880,7 @@ <h2>Activate Commit Mono in your editor.</h2>
876880
<button
877881
class="download_button"
878882
tabindex="0"
879-
onclick="keyDown({key:9, code:'Digit9'})"
883+
onclick="keyDown({key:'9', code:'Digit9'})"
880884
>
881885
09 Docs
882886
</button>
@@ -952,7 +956,7 @@ <h2 tabindex="0" data-edit="true">Currently supported languages</h2>
952956
<br />
953957
<button
954958
class="download_button"
955-
onclick="keyDown({key:0, code:'Digit0'})"
959+
onclick="keyDown({key:'0', code:'Digit0'})"
956960
tabindex="0"
957961
>
958962
Next section →
@@ -1162,7 +1166,11 @@ <h2>Programs used</h2>
11621166
</div>
11631167
<br />
11641168
<br />
1165-
<button class="download_button" onclick="keyDown({key:1, code:'Digit1'})" tabindex="0">
1169+
<button
1170+
class="download_button"
1171+
onclick="keyDown({key:'1', code:'Digit1'})"
1172+
tabindex="0"
1173+
>
11661174
← First section
11671175
</button>
11681176
</section>

src/js/nav.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ function keyDown(e) {
194194
document.querySelector("body").style.fontFeatureSettings = "'ss01', 'ss03', 'ss04', 'ss05' 0"
195195
}
196196

197-
if (e.key.toString().includes("Arrow")) {
197+
if (e.key.includes("Arrow")) {
198198
simulateTab(e)
199199
}
200200
} else if (e.key == "Escape" && insideTextField) {

0 commit comments

Comments
 (0)