Skip to content

Commit 557952c

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

File tree

4 files changed

+81
-28
lines changed

4 files changed

+81
-28
lines changed

index.html

Lines changed: 64 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -967,7 +967,13 @@ <h2>Thank you</h2>
967967
<ul>
968968
<li tabindex="0">Hakim Mazouz for motivation to pursue the project.</li>
969969
<li tabindex="0">
970-
<a href="https://mads.fyi/li" target="_blank" tabindex="0">Mads Brodt</a>
970+
<a
971+
href="https://mads.fyi/li"
972+
target="_blank"
973+
tabindex="0"
974+
class="download_button"
975+
>Mads Brodt</a
976+
>
971977
and Philip Johansen for beta testing and interview.
972978
</li>
973979
<li tabindex="0">Beta testers for great feedback and testing.</li>
@@ -982,18 +988,27 @@ <h2>Inspiration</h2>
982988
href="https://klim.co.nz/collections/untitled/"
983989
target="_blank"
984990
tabindex="0"
991+
class="download_button"
985992
>Untitled Collection</a
986993
>
987994
by Klim Type Foundry for so much inspiration.
988995
</li>
989996
<li>
990-
<a href="https://sampleprograms.io/" target="_blank" tabindex="0"
997+
<a
998+
href="https://sampleprograms.io/"
999+
target="_blank"
1000+
tabindex="0"
1001+
class="download_button"
9911002
>sampleprograms.io</a
9921003
>
9931004
for code examples.
9941005
</li>
9951006
<li>
996-
<a href="https://opentype.js.org/" target="_blank" tabindex="0"
1007+
<a
1008+
href="https://opentype.js.org/"
1009+
target="_blank"
1010+
tabindex="0"
1011+
class="download_button"
9971012
>opentype.js</a
9981013
>
9991014
for generating fonts on the web.
@@ -1003,22 +1018,35 @@ <h2>Inspiration</h2>
10031018
href="https://gildas-lormeau.github.io/zip.js/"
10041019
target="_blank"
10051020
tabindex="0"
1021+
class="download_button"
10061022
>zip.js</a
10071023
>
10081024
for zipping files on the web.
10091025
</li>
10101026
<li>
1011-
<a href="https://opentypecookbook.com/" target="_blank" tabindex="0"
1027+
<a
1028+
href="https://opentypecookbook.com/"
1029+
target="_blank"
1030+
tabindex="0"
1031+
class="download_button"
10121032
>OpenType Cookbook</a
10131033
>
10141034
for all things OpenType Features.
10151035
</li>
10161036
<li>
1017-
<a href="https://github.com/tonsky/FiraCode/" target="_blank" tabindex="0"
1037+
<a
1038+
href="https://github.com/tonsky/FiraCode/"
1039+
target="_blank"
1040+
tabindex="0"
1041+
class="download_button"
10181042
>Fira Code</a
10191043
>
10201044
and
1021-
<a href="https://www.jetbrains.com/lp/mono/" target="_blank" tabindex="0"
1045+
<a
1046+
href="https://www.jetbrains.com/lp/mono/"
1047+
target="_blank"
1048+
tabindex="0"
1049+
class="download_button"
10221050
>JetBrains Mono</a
10231051
>
10241052
for being a huge inspiration and go-to for best practices.
@@ -1028,17 +1056,29 @@ <h2>Inspiration</h2>
10281056
<h2>Programming font ressources</h2>
10291057
<ul>
10301058
<li>
1031-
<a href="https://www.programmingfonts.org/" target="_blank" tabindex="0"
1059+
<a
1060+
href="https://www.programmingfonts.org/"
1061+
target="_blank"
1062+
tabindex="0"
1063+
class="download_button"
10321064
>ProgrammingFonts.org</a
10331065
>: Test drive a huge variety of programming fonts.
10341066
</li>
10351067
<li>
1036-
<a href="https://www.codingfont.com/" target="_blank" tabindex="0"
1068+
<a
1069+
href="https://www.codingfont.com/"
1070+
target="_blank"
1071+
tabindex="0"
1072+
class="download_button"
10371073
>CodingFont.com</a
10381074
>: Tournament style test of programming font preference.
10391075
</li>
10401076
<li>
1041-
<a href="https://realpython.com/coding-font/" target="_blank" tabindex="0"
1077+
<a
1078+
href="https://realpython.com/coding-font/"
1079+
target="_blank"
1080+
tabindex="0"
1081+
class="download_button"
10421082
>Article on coding fonts</a
10431083
>
10441084
from Real Python.
@@ -1051,6 +1091,7 @@ <h2>Programming font ressources</h2>
10511091
href="https://github.com/tonsky/FiraCode"
10521092
target="_blank"
10531093
tabindex="0"
1094+
class="download_button"
10541095
>Fira Code</a
10551096
>
10561097
</li>
@@ -1059,11 +1100,16 @@ <h2>Programming font ressources</h2>
10591100
href="https://www.jetbrains.com/lp/mono/"
10601101
target="_blank"
10611102
tabindex="0"
1103+
class="download_button"
10621104
>JetBrains Mono</a
10631105
>
10641106
</li>
10651107
<li>
1066-
<a href="https://www.nerdfonts.com/" target="_blank" tabindex="0"
1108+
<a
1109+
href="https://www.nerdfonts.com/"
1110+
target="_blank"
1111+
tabindex="0"
1112+
class="download_button"
10671113
>Nerd Fonts</a
10681114
>
10691115
</li>
@@ -1072,6 +1118,7 @@ <h2>Programming font ressources</h2>
10721118
href="https://github.com/microsoft/cascadia-code"
10731119
target="_blank"
10741120
tabindex="0"
1121+
class="download_button"
10751122
>Cascadia Mono</a
10761123
>
10771124
</li>
@@ -1080,6 +1127,7 @@ <h2>Programming font ressources</h2>
10801127
href="https://fonts.google.com/specimen/Source+Code+Pro"
10811128
target="_blank"
10821129
tabindex="0"
1130+
class="download_button"
10831131
>Source Code Pro</a
10841132
>
10851133
</li>
@@ -1088,11 +1136,16 @@ <h2>Programming font ressources</h2>
10881136
href="https://developer.apple.com/fonts/"
10891137
target="_blank"
10901138
tabindex="0"
1139+
class="download_button"
10911140
>SF Mono</a
10921141
>
10931142
</li>
10941143
<li>
1095-
<a href="https://github.com/IBM/plex" target="_blank" tabindex="0"
1144+
<a
1145+
href="https://github.com/IBM/plex"
1146+
target="_blank"
1147+
tabindex="0"
1148+
class="download_button"
10961149
>IBM Plex Mono</a
10971150
>
10981151
</li>

src/js/code_section.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,18 +41,18 @@ function buildCode() {
4141
let commitMonoFont
4242
async function updateCodeFont() {
4343
// console.log("updateCodeFont")
44-
// opentype
45-
// .load(
46-
// `/src/fonts/CommitMono${versionOfCommitMono}-${websiteData.weight}${
47-
// websiteData.italic ? "Italic" : "Regular"
48-
// }.otf`
49-
// )
50-
// .then((font) => {
51-
// // // console.log(font)
52-
// commitMonoFont = font
53-
// updateCode(null, codeForm)
54-
// })
55-
// .catch((err) => console.log(err))
44+
opentype
45+
.load(
46+
`/src/fonts/CommitMono${versionOfCommitMono}-${websiteData.weight}${
47+
websiteData.italic ? "Italic" : "Regular"
48+
}.otf`
49+
)
50+
.then((font) => {
51+
// // console.log(font)
52+
commitMonoFont = font
53+
updateCode(null, codeForm)
54+
})
55+
.catch((err) => console.log(err))
5656
// opentype
5757
// .load("src/fonts/CommitMonoV134-500Regular.otf")
5858
// .then((font) => {

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.includes("Arrow")) {
197+
if (e.key.toString().includes("Arrow")) {
198198
simulateTab(e)
199199
}
200200
} else if (e.key == "Escape" && insideTextField) {

src/js/website_data.js

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)