Spaces:
Running
Running
Forward to https://gathering-hill-ebook-trim.trycloudflare.com
Browse files- index.html +19 -6
index.html
CHANGED
|
@@ -4,7 +4,6 @@
|
|
| 4 |
<meta charset="utf-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1">
|
| 6 |
<title>CleanProof</title>
|
| 7 |
-
<meta http-equiv="refresh" content="0; url=https://accent-would-wanting-county.trycloudflare.com">
|
| 8 |
<style>
|
| 9 |
body { font-family: system-ui, sans-serif; background: #f8fafc; color: #1b2430; margin: 0;
|
| 10 |
min-height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center; }
|
|
@@ -13,15 +12,29 @@
|
|
| 13 |
a.button { display: inline-block; margin-top: 16px; background: #0f6e5c; color: #fff; padding: 12px 20px;
|
| 14 |
border-radius: 12px; text-decoration: none; font-weight: 600; }
|
| 15 |
p.note { color: #64748b; font-size: 14px; }
|
|
|
|
|
|
|
| 16 |
</style>
|
| 17 |
</head>
|
| 18 |
<body>
|
| 19 |
-
<div class="card">
|
| 20 |
<h1>CleanProof</h1>
|
| 21 |
-
<p>Opening the live
|
| 22 |
-
<a class="button" href="https://accent-would-wanting-county.trycloudflare.com" target="_top">Open CleanProof</a>
|
| 23 |
-
<p class="note">If it does not open, the demo laptop is offline right now.</p>
|
| 24 |
</div>
|
| 25 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
</body>
|
| 27 |
</html>
|
|
|
|
| 4 |
<meta charset="utf-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1">
|
| 6 |
<title>CleanProof</title>
|
|
|
|
| 7 |
<style>
|
| 8 |
body { font-family: system-ui, sans-serif; background: #f8fafc; color: #1b2430; margin: 0;
|
| 9 |
min-height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center; }
|
|
|
|
| 12 |
a.button { display: inline-block; margin-top: 16px; background: #0f6e5c; color: #fff; padding: 12px 20px;
|
| 13 |
border-radius: 12px; text-decoration: none; font-weight: 600; }
|
| 14 |
p.note { color: #64748b; font-size: 14px; }
|
| 15 |
+
#offline { display: none; max-width: 1100px; margin: 16px; }
|
| 16 |
+
#offline img { width: 100%; border: 1px solid #e2e8f0; border-radius: 12px; }
|
| 17 |
</style>
|
| 18 |
</head>
|
| 19 |
<body>
|
| 20 |
+
<div class="card" id="loading">
|
| 21 |
<h1>CleanProof</h1>
|
| 22 |
+
<p>Opening the live dashboard...</p>
|
|
|
|
|
|
|
| 23 |
</div>
|
| 24 |
+
<div id="offline">
|
| 25 |
+
<h1>CleanProof dashboard</h1>
|
| 26 |
+
<p class="note">The live demo is offline right now, so this is a saved snapshot of the dashboard.
|
| 27 |
+
<a href="">Try again</a></p>
|
| 28 |
+
<img src="dashboard.png" alt="CleanProof accountability dashboard">
|
| 29 |
+
</div>
|
| 30 |
+
<script>
|
| 31 |
+
// Open the live dashboard only if the demo laptop answers; otherwise show the snapshot
|
| 32 |
+
const live = "https://gathering-hill-ebook-trim.trycloudflare.com";
|
| 33 |
+
const go = () => { try { window.top.location.replace(live + "/dashboard"); } catch (e) { location.replace(live + "/dashboard"); } };
|
| 34 |
+
const offline = () => { document.getElementById("loading").style.display = "none";
|
| 35 |
+
document.getElementById("offline").style.display = "block"; };
|
| 36 |
+
fetch(live + "/api/dashboard/stats", { cache: "no-store", signal: AbortSignal.timeout(10000) })
|
| 37 |
+
.then(r => r.ok ? go() : offline()).catch(offline);
|
| 38 |
+
</script>
|
| 39 |
</body>
|
| 40 |
</html>
|