Skip to content

Commit b58aede

Browse files
committed
Clean up
1 parent 56fdc30 commit b58aede

10 files changed

Lines changed: 808 additions & 332 deletions

StatuspageHTML/index.html

Lines changed: 6 additions & 6 deletions
Large diffs are not rendered by default.

StatuspageHTML/preact/index.html

Lines changed: 59 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -3,64 +3,77 @@
33
<head>
44
<meta charset="utf-8">
55

6-
<meta name="author" content="rtsfred3">
7-
<meta name="application-name" content="(Unofficial) Cloudflare Status | Preact">
8-
<meta name="theme-color" content="#339966">
9-
<meta name="description" content="Testing page for new features or ideas in Cloudflare Status.">
10-
<meta name="keywords" content="CloudflareStatus, Cloudflare Status, Cloudflare, Status, Mini Version">
6+
<!-- <meta name="author" content="rtsfred3"> -->
7+
<!-- <meta name="application-name" content="(Unofficial) Cloudflare Status | Preact"> -->
8+
<!-- <meta name="theme-color" content="#339966"> -->
9+
<!-- <meta name="description" content="Testing page for new features or ideas in Cloudflare Status."> -->
10+
<!-- <meta name="keywords" content="CloudflareStatus, Cloudflare Status, Cloudflare, Status, Mini Version"> -->
1111

12-
<meta property="og:site_name" content="(Unofficial) Cloudflare Status">
13-
<meta property="og:title" content="(Unofficial) Cloudflare Status | Preact">
14-
<meta property="og:description" content="Testing page for new features or ideas in Cloudflare Status.">
15-
<meta property="og:image" content="https://spstat.us/img/status/lowres/min/status-min-good.png">
16-
<meta property="og:type" content="website">
17-
<meta property="og:locale" content="en_US">
18-
<meta property="og:url" content="https://spstat.us/preact/">
12+
<!-- <meta property="og:site_name" content="(Unofficial) Cloudflare Status"> -->
13+
<!-- <meta property="og:title" content="(Unofficial) Cloudflare Status | Preact"> -->
14+
<!-- <meta property="og:description" content="Testing page for new features or ideas in Cloudflare Status."> -->
15+
<!-- <meta property="og:image" content="https://spstat.us/img/status/lowres/min/status-min-good.png"> -->
16+
<!-- <meta property="og:type" content="website"> -->
17+
<!-- <meta property="og:locale" content="en_US"> -->
18+
<!-- <meta property="og:url" content="https://spstat.us/preact/"> -->
1919

20-
<meta name="twitter:card" content="summary">
21-
<meta name="twitter:title" content="(Unofficial) Cloudflare Status | Preact">
22-
<meta name="twitter:description" content="Testing page for new features or ideas in Cloudflare Status.">
23-
<meta name="twitter:image:src" content="https://spstat.us/img/status/lowres/min/status-min-good.png">
20+
<!-- <meta name="twitter:card" content="summary"> -->
21+
<!-- <meta name="twitter:title" content="(Unofficial) Cloudflare Status | Preact"> -->
22+
<!-- <meta name="twitter:description" content="Testing page for new features or ideas in Cloudflare Status."> -->
23+
<!-- <meta name="twitter:image:src" content="https://spstat.us/img/status/lowres/min/status-min-good.png"> -->
2424

25-
<meta name="mobile-web-app-capable" content="yes">
26-
<meta name="apple-mobile-web-app-title" content="(Unofficial) Cloudflare Status | Preact">
27-
<meta name="apple-mobile-web-app-capable" content="yes">
28-
<meta name="apple-mobile-web-app-status-bar-style" content="#339966">
29-
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" />
30-
<meta name="HandheldFriendly" content="true" />
25+
<!-- <meta name="mobile-web-app-capable" content="yes"> -->
26+
<!-- <meta name="apple-mobile-web-app-title" content="(Unofficial) Cloudflare Status | Preact"> -->
27+
<!-- <meta name="apple-mobile-web-app-capable" content="yes"> -->
28+
<!-- <meta name="apple-mobile-web-app-status-bar-style" content="#339966"> -->
29+
<!-- <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" /> -->
30+
<!-- <meta name="HandheldFriendly" content="true" /> -->
3131

32-
<link rel="canonical" href="https://spstat.us/preact/" />
33-
34-
<!-- <link rel="stylesheet" href="../styling/main.min.css"> -->
32+
<title>(Unofficial) Statuspage Status</title>
3533

36-
<!-- <link rel="modulepreload" href="https://esm.sh/stable/preact@10.20.2/es2022/preact.mjs"> -->
37-
<!-- <link rel="modulepreload" href="../../modules/Statuspage.esm.min.js"> -->
38-
<!-- <link rel="modulepreload" href="https://spstat.us/{{versioxn}}/modules/Statuspage.esm.min.js"> -->
39-
40-
<link rel="preload" href="../../styling/main.min.css" as="style" onload="this.rel='stylesheet'">
41-
<!-- <link rel="preload" href="https://spstat.us/{{version}}/styling/main.min.css" as="style" onload="this.rel='stylesheet'"> -->
34+
<link rel="canonical" href="https://spstat.us/preact/" />
4235

43-
<title>(Unofficial) Cloudflare Status | Preact</title>
36+
<style>
37+
:root{--good:#339966;--none:var(--good);--minor:#DBAB09;--major:#E25D10;--critical:#DC3545;--maintenance:#0366D6;--loading:#4F93BD;--unavailable:var(--loading);--error:#646464;--font:var(--error);--good-text:"good";--none-text:var(--good-text);--minor-text:"minor";--major-text:"major";--critical-text:"critical";--maintenance-text:"maintenance";--loading-text:"loading";--unavailable-text:"unavailable";--error-text:"error"}body{margin:0;padding:0;font-family:arial}.fullScreen,.statuspage-status:has(.fullScreen),:has(.fullScreen),[fullScreen],statuspage-error{height:100vh}.statuspage-status:not(.fullScreen),statuspage-status{height:240px}.statuspage-status,statuspage-error,statuspage-status{width:100vw;text-align:center;justify-content:center;align-items:center;display:block;display:flex;font-size:48pt}statuspage-error::before{content:var(--error-text);text-transform:uppercase;font-weight:700;color:#fff}.statuspage-status[data-status]::before,statuspage-status[data-status]::before{content:attr(data-status);text-transform:uppercase;font-weight:700;color:#fff}.statuspage-status[data-status=good]::before,.statuspage-status[data-status=none]::before,statuspage-status[data-status=good]::before,statuspage-status[data-status=none]::before{content:var(--good-text)}@media only screen and (min-width:2048px) and (min-height:1080px){.statuspage-status,statuspage-status{font-size:12em}}@media only screen and (min-width:2100px) and (min-height:1100px){.statuspage-status,statuspage-status{font-size:16em}}@media only screen and (min-width:3000px) and (min-height:2000px){.statuspage-status,statuspage-status{font-size:16em}}[data-status=good],[data-status=none]{background-color:var(--none)}[data-status=minor]{background-color:var(--minor)}[data-status=major]{background-color:var(--major)}[data-status=critical]{background-color:var(--critical)}[data-status=maintenance]{background-color:var(--maintenance);font-weight:500}[data-status=loading],[data-status=unavailable]{background-color:var(--loading)}[data-status=error],statuspage-error{background-color:var(--error)}@media only screen and (min-width:351px) and (max-width:450px){[data-status=maintenance]{font-size:36pt}}@media only screen and (min-width:251px) and (max-width:350px){[data-status=maintenance]{font-size:30pt}}@media only screen and (min-width:151px) and (max-width:250px){[data-status=maintenance]{font-size:20pt}}
38+
</style>
4439
</head>
4540
<body>
46-
<script type="module">
47-
const url = 'https://www.cloudflarestatus.com/api/v2/summary.json';
48-
const json = await (await fetch(url)).json();
41+
<script type="importmap">
42+
{
43+
"imports": {
44+
"Compression.esm.js": "../../modules/Compression.min.esm.js",
45+
"StatuspageDictionary.esm.js": "../../modules/StatuspageDictionary.esm.js",
46+
"StatuspageStaticHTML.esm.js": "../../modules/StatuspageStaticHTML.esm.js",
47+
"StatuspageWebComponents.esm.js": "../../modules/StatuspageWebComponents.esm.js",
48+
"StatuspageHTMLElements.esm.js": "../../modules/StatuspageHTMLElements.esm.js",
49+
"github.amp.css": "../../styling/github.amp.min.css",
50+
"preact.mjs": "https://esm.sh/stable/preact@10.20.2/es2022/preact.mjs"
51+
}
52+
}
53+
</script>
54+
55+
<!-- <script type="importmap">
56+
{
57+
"imports": {
58+
"Compression.esm.js": "https://cdn.jsdelivr.net/gh/rtsfred3/GithubStatusJS@v0.2.76/modules/Compression.min.esm.js",
59+
"StatuspageDictionary.esm.js": "https://cdn.jsdelivr.net/gh/rtsfred3/GithubStatusJS@v0.2.76/modules/StatuspageDictionary.min.esm.js",
60+
"StatuspageStaticHTML.esm.js": "https://cdn.jsdelivr.net/gh/rtsfred3/GithubStatusJS@v0.2.76/modules/StatuspageStaticHTML.min.esm.js"
61+
}
62+
}
63+
</script> -->
4964

50-
// import Compression from 'https://cdn.jsdelivr.net/gh/rtsfred3/GithubStatusJS@v0.2.76/modules/Compression.esm.js';
65+
<!-- <script type="module">
66+
import { createElement, render } from 'preact.mjs';
5167
52-
import StatuspageDictionary from 'https://cdn.jsdelivr.net/gh/rtsfred3/GithubStatusJS@v0.2.76/modules/StatuspageDictionary.esm.js';
53-
import StatuspageWebComponents from 'https://cdn.jsdelivr.net/gh/rtsfred3/GithubStatusJS@v0.2.76/modules/StatuspageWebComponents.esm.js';
68+
import StatuspageDictionary from 'StatuspageDictionary.esm.js';
69+
import StatuspageStaticHTML from 'StatuspageStaticHTML.esm.js';
70+
import StatuspageWebComponents from 'StatuspageWebComponents.esm.js';
5471
55-
// import StatuspageDictionary from '../../modules/StatuspageDictionary.esm.js';
56-
// import StatuspageWebComponents from '../../modules/StatuspageWebComponents.esm.js';
72+
// document.createElement(StatuspageDictionary.HTMLTags.StatuspageStatus)
5773
58-
var statusIndicator = 'status' in json && 'indicator' in json.status
59-
? json.status.indicator
60-
: StatuspageDictionary.StatusEnums.error;
74+
var vdom = createElement(StatuspageDictionary.HTMLTags.StatuspageStatus, { 'data-url': 'https://www.cloudflarestatus.com/' }, '');
75+
</script> -->
6176

62-
var statusToHtml = StatuspageWebComponents.Status.toHTML(statusIndicator, true);
63-
document.body.appendChild(statusToHtml);
64-
</script>
77+
<script type="module" src="../../modules/StatuspagePreact.esm.js"></script>
6578
</body>
6679
</html>

0 commit comments

Comments
 (0)