Skip to content

Commit c811716

Browse files
committed
Deploying to gh-pages from @ e2b5d11 🚀
0 parents  commit c811716

File tree

382 files changed

+994
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

382 files changed

+994
-0
lines changed

404.html

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<title>Redirecting</title>
7+
</head>
8+
<body>
9+
<script>
10+
// Find the subroute root from the current URL. Just the pattern components/pr-preview/pr-<PR_NUMBER>
11+
const parts = window.location.pathname.split('/');
12+
let realUrl;
13+
if (parts[2] === 'pr-preview') {
14+
realUrl = '/' + parts.slice(1, 4).join('/') + '/';
15+
} else {
16+
// If not a PR preview, redirect to the main page
17+
realUrl = '/' + parts.slice(1, 2).join('/');
18+
}
19+
// Manually fetch the index.html file from the correct subroute
20+
fetch(realUrl)
21+
.then(response => {
22+
if (!response.ok) {
23+
throw new Error('Network response was not ok');
24+
}
25+
return response.text();
26+
})
27+
.then(html => {
28+
// Set the current document's HTML to the fetched content
29+
document.documentElement.innerHTML = html;
30+
// After setting , run scripts manually
31+
document.documentElement.querySelectorAll('script').forEach(oldScript => {
32+
const newScript = document.createElement('script');
33+
// copy over all attributes (e.g. src, type, async, etc.)
34+
for (const { name, value } of oldScript.attributes) {
35+
newScript.setAttribute(name, value);
36+
}
37+
// copy inline code or fallback to src-based loading
38+
newScript.textContent = oldScript.textContent;
39+
// replace the old <script> so the browser will actually execute it
40+
oldScript.replaceWith(newScript);
41+
});
42+
43+
})
44+
.catch(error => {
45+
console.error('There was a problem with the fetch operation:', error);
46+
});
47+
</script>
48+
</body>
49+
</html>

assets/demo-dxh7d118559e1a8a78b.css

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
6.87 KB
Binary file not shown.
Lines changed: 65 additions & 0 deletions
Loading

assets/dx-components-theme-dxh559d6032ee78b5fa.css

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

assets/focus-trap-dxh172025a6d317728c.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading

assets/hero-dxh7613ac22c5a1b7.css

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

assets/language-select-dxhacb882167965dd11.css

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

0 commit comments

Comments
 (0)