<!doctype html>
|
<html lang="en">
|
<head>
|
<meta charset="utf-8">
|
<title>Sample System Info</title>
|
<style>
|
html, body {
|
margin: 0;
|
width: 100%;
|
height: 100%;
|
background: transparent;
|
color: #edf5ef;
|
font-family: "Segoe UI", sans-serif;
|
}
|
|
body {
|
box-sizing: border-box;
|
padding: 18px 20px;
|
background: rgba(26, 44, 38, 0.82);
|
border-radius: 8px;
|
}
|
|
h1 {
|
margin: 0 0 12px;
|
font-size: 17px;
|
font-weight: 650;
|
letter-spacing: 0;
|
}
|
|
dl {
|
display: grid;
|
grid-template-columns: 86px 1fr;
|
gap: 7px 12px;
|
margin: 0;
|
font-size: 13px;
|
}
|
|
dt {
|
color: rgba(237, 245, 239, 0.68);
|
}
|
|
dd {
|
margin: 0;
|
font-variant-numeric: tabular-nums;
|
overflow: hidden;
|
text-overflow: ellipsis;
|
white-space: nowrap;
|
}
|
</style>
|
</head>
|
<body>
|
<h1>System Info</h1>
|
<dl>
|
<dt>Time</dt><dd id="time">--</dd>
|
<dt>Viewport</dt><dd id="viewport">--</dd>
|
<dt>Runtime</dt><dd id="runtime">Moli Desktop sample</dd>
|
</dl>
|
<script>
|
const time = document.getElementById("time");
|
const viewport = document.getElementById("viewport");
|
|
const render = () => {
|
time.textContent = new Date().toLocaleTimeString([], { hour12: false });
|
viewport.textContent = `${window.innerWidth} x ${window.innerHeight}`;
|
};
|
|
window.addEventListener("resize", render);
|
render();
|
setInterval(render, 5000);
|
</script>
|
</body>
|
</html>
|