Update & Fix

- update deps.
- splash support dark bg
- fix parse cpu temp
This commit is contained in:
Junyuan Feng
2022-05-04 19:44:13 +08:00
parent 52b82af52c
commit 2a0cc5ca30
27 changed files with 189 additions and 74 deletions

View File

@@ -29,6 +29,8 @@
<title>ServerBox</title>
<link rel="manifest" href="manifest.json">
<link rel="stylesheet" type="text/css" href="splash/style.css">
<script src="splash/splash.js"></script>
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport"/>
</head>
<body style="position: fixed; inset: 0px; overflow: hidden; padding: 0px; margin: 0px; user-select: none; touch-action: none; font: 14px sans-serif; color: red;">
<!-- This script installs service_worker.js to provide PWA functionality to
@@ -99,9 +101,9 @@
}
</script>
<picture id="splash">
<source srcset="splash/img/light-1x.png 1x, splash/img/light-2x.png 2x, splash/img/light-3x.png 3x, splash/img/light-4x.png 4x" media="(prefers-color-scheme: light) or (prefers-color-scheme: no-preference)">
<source srcset="splash/img/light-1x.png 1x, splash/img/light-2x.png 2x, splash/img/light-3x.png 3x, splash/img/light-4x.png 4x" media="(prefers-color-scheme: light)">
<source srcset="splash/img/dark-1x.png 1x, splash/img/dark-2x.png 2x, splash/img/dark-3x.png 3x, splash/img/dark-4x.png 4x" media="(prefers-color-scheme: dark)">
<img class="center" src="splash/img/light-1x.png" />
<img class="center" aria-hidden="true" src="splash/img/light-1x.png" alt=""/>
</picture>
</body>
</html>

7
web/splash/splash.js Normal file
View File

@@ -0,0 +1,7 @@
function removeSplashFromWeb() {
const elem = document.getElementById("splash");
if (elem) {
elem.remove();
}
document.body.style.background = "transparent";
}

View File

@@ -1,4 +1,4 @@
body, html {
body {
margin:0;
height:100%;
background: #ffffff;
@@ -36,7 +36,7 @@ body, html {
body {
margin:0;
height:100%;
background: #ffffff;
background: #042a49;
background-size: 100% 100%;
}