diff options
| -rw-r--r-- | .gitignore | 2 | ||||
| -rw-r--r-- | site/index.html | 19 | ||||
| -rw-r--r-- | site/script.js | 16 | ||||
| -rw-r--r-- | site/style.css | 23 |
4 files changed, 59 insertions, 1 deletions
@@ -137,7 +137,7 @@ venv.bak/ .ropeproject
# mkdocs documentation
-/site
+# /site
# mypy
.mypy_cache/
diff --git a/site/index.html b/site/index.html new file mode 100644 index 0000000..42e9fe2 --- /dev/null +++ b/site/index.html @@ -0,0 +1,19 @@ +<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <title>SafeDisp</title>
+ <link rel="stylesheet" href="styles.css">
+</head>
+<body>
+ <div class="container">
+ <h1>SafeDisp</h1>
+ <div class="readings">
+ <p>Temperature: <span id="temperature">--</span> °C</p>
+ <p>Humidity: <span id="humidity">--</span> %</p>
+ </div>
+ </div>
+ <script src="script.js"></script>
+</body>
+</html>
diff --git a/site/script.js b/site/script.js new file mode 100644 index 0000000..2bbf801 --- /dev/null +++ b/site/script.js @@ -0,0 +1,16 @@ +function fluctuateTemperature() {
+ return Math.floor(Math.random() * (25 - 20 + 1)) + 20;
+}
+
+function fluctuateHumidity() {
+ return Math.floor(Math.random() * (45 - 40 + 1)) + 40;
+}
+
+function updateReadings() {
+ const temperature = fluctuateTemperature();
+ const humidity = fluctuateHumidity();
+ document.getElementById('temperature').textContent = temperature;
+ document.getElementById('humidity').textContent = humidity;
+}
+
+setInterval(updateReadings, 1000); // Update readings every second
diff --git a/site/style.css b/site/style.css new file mode 100644 index 0000000..5aa03a1 --- /dev/null +++ b/site/style.css @@ -0,0 +1,23 @@ +body, html {
+ margin: 0;
+ padding: 0;
+ font-family: Arial, sans-serif;
+}
+
+.container {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ height: 100vh;
+ background-color: #f0f0f0;
+}
+
+h1 {
+ color: #333;
+}
+
+.readings p {
+ color: #555;
+ font-size: 20px;
+}
|
