Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 30 additions & 3 deletions apps/demo/index.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,39 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="theme-color" media="(prefers-color-scheme: light)" content="<%- themeColorLight %>">
<meta name="theme-color" media="(prefers-color-scheme: dark)" content="<%- themeColorDark %>">
<meta
name="theme-color"
media="(prefers-color-scheme: light)"
content="<%- themeColorLight %>"
/>
<meta
name="theme-color"
media="(prefers-color-scheme: dark)"
content="<%- themeColorDark %>"
/>
<title><%- title %></title>
<script>
(function (l) {
if (l.search[1] === "/") {
var decoded = l.search
.slice(1)
.split("&")
.map(function (s) {
return s.replace(/~and~/g, "&");
})
.join("?");

window.history.replaceState(
null,
null,
l.pathname.slice(0, -1) + decoded + l.hash
);
}
})(window.location);
</script>
</head>
<body>
<div id="root"></div>
Expand Down
33 changes: 33 additions & 0 deletions apps/demo/public/404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<title>Redirecting...</title>
<script>
var pathSegmentsToKeep = 1;
var l = window.location;

l.replace(
l.protocol +
"//" +
l.hostname +
(l.port ? ":" + l.port : "") +
l.pathname
.split("/")
.slice(0, 1 + pathSegmentsToKeep)
.join("/") +
"/?/" +
l.pathname
.slice(1)
.split("/")
.slice(pathSegmentsToKeep)
.join("/")
.replace(/&/g, "~and~") +
(l.search ? "&" + l.search.slice(1).replace(/&/g, "~and~") : "") +
l.hash
);
</script>
</head>

<body></body>
</html>