Skip to content

Commit 4ffa134

Browse files
committed
perf: add header links in optimized order
1 parent 82bf4ca commit 4ffa134

File tree

1 file changed

+44
-90
lines changed

1 file changed

+44
-90
lines changed

index.html

Lines changed: 44 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -1,122 +1,76 @@
11
<!DOCTYPE html>
2-
<html>
2+
<html lang="en">
33

44
<head>
5-
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6-
<title>
7-
Music Blocks
8-
</title>
9-
5+
<meta charset="UTF-8">
6+
<meta name="viewport"
7+
content="width=device-width, height=device-height, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
108
<meta name="description"
119
content="Learn to code through music with Music Blocks. Arrange colorful blocks to create everything from simple melodies to interactive games.">
12-
<meta name="viewport"
13-
content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height" />
14-
15-
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" />
16-
<!-- <link href="https://fonts.googleapis.com/css2?family=PT+Mono&display=swap" rel="stylesheet"> -->
10+
<meta name="mobile-web-app-capable" content="yes">
11+
<meta name="theme-color" content="#2196F3">
12+
<title>Music Blocks</title>
1713

18-
<link rel="stylesheet" href="css/activities.css" />
19-
<link rel="stylesheet" href="dist/css/style.css" />
20-
<link rel="stylesheet" href="dist/css/keyboard.css" />
21-
<link rel="stylesheet" href="dist/css/windows.css" />
14+
<!-- Icons & PWA -->
15+
<link rel="icon" sizes="192x192" href="favicon.ico">
16+
<link rel="apple-touch-icon" href="/activity/activity-icon-color-512.png">
17+
<link rel="manifest" href="android_chrome_manifest.json">
2218

23-
<noscript>
24-
JavaScript is required to view this page.
25-
</noscript>
19+
<!-- Stylesheets -->
20+
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
21+
<link rel="stylesheet" href="fonts/material-icons.css">
22+
<link rel="stylesheet" href="css/activities.css">
23+
<link rel="stylesheet" href="dist/css/style.css">
24+
<link rel="stylesheet" href="dist/css/keyboard.css">
25+
<link rel="stylesheet" href="dist/css/windows.css">
26+
<link rel="stylesheet" href="lib/materialize-iso.css">
27+
<link rel="stylesheet" href="css/darkmode.css">
2628

27-
<!-- <script src="js/utils/detectIE.js"></script> -->
29+
<!-- Localization -->
30+
<link rel="prefetch" type="application/l10n" href="./localization.ini">
2831

29-
<!-- <script src="sounds/samples/manifest.js"></script> -->
32+
<noscript>JavaScript is required to view this page.</noscript>
3033

31-
<!-- <script src="lib/mespeak.js"></script> -->
34+
<!-- Critical JavaScript (Inline) -->
35+
<script>
36+
let canvas, stage, lang;
37+
function init() {
38+
canvas = document.getElementById("canvas");
39+
stage = new createjs.Stage(canvas);
40+
stage.update();
41+
}
3242

33-
<script src="lib/reqwest.js" defer></script>
43+
if ("serviceWorker" in navigator) {
44+
navigator.serviceWorker.register("/sw.js").then(reg => {
45+
console.debug("[PWA Builder] Service worker registered for scope:", reg.scope);
46+
});
47+
}
3448

35-
<!-- <script src="lib/jquery-3.7.1.js"></script> -->
36-
<script src="lib/jquery-2.1.4.min.js"></script>
49+
document.addEventListener("DOMContentLoaded", () => {
50+
doSearch();
51+
});
52+
</script>
3753

54+
<!-- JavaScript Libraries (Deferred) -->
55+
<script src="lib/reqwest.js" defer></script>
56+
<script src="lib/jquery-2.1.4.min.js" defer></script>
3857
<script src="lib/jquery-ui.js" defer></script>
39-
4058
<script src="lib/materialize.min.js" defer></script>
41-
4259
<script src="lib/webL10n.js" defer></script>
43-
4460
<script src="lib/Tone.js" defer></script>
45-
4661
<script src="lib/midi.js" defer></script>
47-
4862
<script src="lib/jquery.ruler.js" defer></script>
49-
5063
<script src="lib/modernizr-2.6.2.min.js" defer></script>
51-
5264
<script src="lib/raphael.min.js" defer></script>
53-
5465
<script src="lib/wheelnav.js" defer></script>
55-
5666
<script src="lib/abc.min.js" defer></script>
57-
5867
<script src="lib/codejar/codejar.min.js" defer></script>
59-
6068
<script src="lib/codejar/highlight.pack.js" defer></script>
61-
6269
<script src="lib/astring.min.js" defer></script>
63-
64-
<link rel="prefetch" type="application/l10n" href="./localization.ini" />
65-
66-
<script data-main="js/loader" src="lib/require.js" defer></script>
67-
68-
<link rel="apple-touch-icon" href="/activity/activity-icon-color-512.png">
69-
<link rel="manifest" href="android_chrome_manifest.json" />
70-
<meta name="mobile-web-app-capable" content="yes" />
71-
<link rel="icon" sizes="192x192" href="favicon.ico" />
72-
<meta id="theme-color" name="theme-color" content="#2196F3" />
73-
74-
<link type="text/css" href="fonts/material-icons.css" rel="stylesheet" />
75-
<link rel="stylesheet" href="lib/materialize-iso.css" />
76-
<link rel="stylesheet" href="css/darkmode.css" />
77-
7870
<script src="lib/easeljs.min.js" defer></script>
79-
8071
<script src="lib/tweenjs.min.js" defer></script>
72+
<script data-main="js/loader" src="lib/require.js" defer></script>
8173

82-
<!-- <script src="js/widgets/musickeyboard.js"></script> -->
83-
84-
<!-- <script src="lib/movieclip-0.7.1.min.js"></script> -->
85-
86-
<script>
87-
let canvas, stage, lang;
88-
function init() {
89-
canvas = document.getElementById("canvas");
90-
stage = new createjs.Stage(canvas);
91-
stage.update();
92-
// createjs.Ticker.addEventListener("tick", stage);
93-
}
94-
</script>
95-
96-
<script>
97-
if ("serviceWorker" in navigator) {
98-
if (navigator.serviceWorker.controller) {
99-
console.debug(
100-
"[PWA Builder] active service worker found, no need to register"
101-
);
102-
} else {
103-
// Register the service worker
104-
navigator.serviceWorker
105-
.register("/sw.js")
106-
.then(function (reg) {
107-
console.debug(
108-
"[PWA Builder] Service worker has been registered for scope: " +
109-
reg.scope
110-
);
111-
});
112-
}
113-
}
114-
</script>
115-
<script type="text/javascript">
116-
$(document).ready(function () {
117-
doSearch();
118-
});
119-
</script>
12074
</head>
12175

12276
<!-- #96D3F3-->

0 commit comments

Comments
 (0)