Skip to content

Commit be1cfc6

Browse files
Show a message that this site requires JavaScript (#2989)
* Show a message that this site requires JavaScript Adds a noscript tag that displays a message that this site requires JavaScript to run. The easiest way to test this locally is to use Chrome since it can disable JavaScript per tab instead of globally. Open the dev console and click the gear icon and check "Disable "JavaScript" in the Debugger section. I skipped adding a test since it is a static change and playwright requires js to run. resolves #2928 * fill in noscript message more and style it * Turns out we do actually have the CSS in prod * forgot the external-link class --------- Co-authored-by: David Crespo <david-crespo@users.noreply.github.com>
1 parent b1fba78 commit be1cfc6

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

index.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,13 @@
2020
</head>
2121
<body>
2222
<div id="root"></div>
23+
<noscript>
24+
<div class="min-h-screen grid place-content-center">
25+
<p class="max-w-lg p-8 text-center text-balance">
26+
This site requires JavaScript. If you don't want to enable JavaScript, see the <a href="https://docs.oxide.computer/" class="external-link" target="_blank" rel="noopener noreferrer">Oxide docs</a> to learn about accessing the API through the CLI or SDKs.
27+
</p>
28+
</div>
29+
</noscript>
2330
<script type="module" src="./app/main.tsx"></script>
2431
</body>
2532
</html>

0 commit comments

Comments
 (0)