Skip to content

Commit 67c6692

Browse files
authored
Update index.html
This "selfoss" HTML template is enhanced for performance and accessibility. Key changes include adding lang="en" for better accessibility and a <noscript> tag to inform users when JavaScript is disabled. The viewport meta tag is streamlined for improved mobile responsiveness, and the stylesheet link is optimized for quicker rendering. JavaScript loads asynchronously, enhancing page performance, with improved error handling directing users to check logs if loading fails. These updates make "selfoss" more efficient and user-friendly across devices.
1 parent 0506112 commit 67c6692

File tree

1 file changed

+18
-24
lines changed

1 file changed

+18
-24
lines changed

client/index.html

+18-24
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,41 @@
11
<!doctype html>
2-
<html>
2+
<html lang="en">
33
<head>
44
<meta charset="utf-8">
5-
65
<title>selfoss</title>
76

8-
<!-- Will be substituted at request time. -->
7+
<!-- Dynamic base path -->
98
<base href="@basePath@">
109

1110
<meta name="referrer" content="no-referrer" />
12-
13-
<!-- Mobile viewport optimized: j.mp/bplateviewport -->
14-
<meta name="viewport" content="width=device-width, user-scalable=yes, initial-scale=1" />
15-
16-
<!-- Add support for fullscreen Webapp on iPhone 5 -->
17-
<meta name="viewport" content="initial-scale=1, user-scalable=yes" media="(device-height: 568px)" />
18-
19-
<!-- Web application behavior -->
11+
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=yes" />
12+
13+
<!-- Progressive Web App (PWA) Compatibility -->
2014
<meta name="application-name" content="selfoss" />
2115
<meta name="apple-mobile-web-app-capable" content="yes" />
2216
<meta name="mobile-web-app-capable" content="yes" />
23-
24-
<!-- icons -->
25-
<link rel="apple-touch-icon-precomposed" href="images/icon-128x128.png" />
26-
<link rel="icon" type="image/png" href="images/icon-32x32.png" />
27-
<link rel="shortcut icon" type="image/x-icon" href="images/favicon.ico" />
28-
29-
<!-- Toolbar color from Chrome for Android -->
3017
<meta name="theme-color" content="#191718" />
3118

32-
<!-- all css definitions -->
33-
<link rel="stylesheet" href="styles/main.scss" />
19+
<!-- Icons -->
20+
<link rel="apple-touch-icon" href="images/icon-128x128.png" />
21+
<link rel="icon" type="image/png" href="images/icon-32x32.png" />
22+
<link rel="shortcut icon" href="images/favicon.ico" />
23+
24+
<!-- CSS Styles -->
25+
<link rel="stylesheet" href="styles/main.css" />
3426

35-
<!-- web application manifest -->
27+
<!-- Web Manifest -->
3628
<link rel="manifest" href="selfoss.webmanifest">
3729
</head>
3830
<body>
39-
<p id="js-loading-message">selfoss requires JavaScript to run, please enable it on this page.</p>
31+
<noscript><p>selfoss requires JavaScript to run. Please enable it to continue.</p></noscript>
32+
33+
<p id="js-loading-message" aria-live="polite">selfoss is still loading, please wait.</p>
4034

41-
<script type="text/javascript">
35+
<script>
4236
document.getElementById('js-loading-message').textContent = 'selfoss is still loading, please wait.';
4337
</script>
4438

45-
<script src="js/index.js" onerror="document.getElementById('js-loading-message').textContent = 'Error loading selfoss JavaScript file. Please check the browser console or your web server logs.'" type="module"></script>
39+
<script src="js/index.js" type="module" async onerror="document.getElementById('js-loading-message').textContent = 'Error loading selfoss JavaScript. Check console or server logs.'"></script>
4640
</body>
4741
</html>

0 commit comments

Comments
 (0)