-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
89 lines (64 loc) · 3.39 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
<link rel="stylesheet" href="CSS/style.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.1/css/all.min.css">
<link rel="icon" type="image/x-icon" href="Content/lamp.png">
<link rel=”stylesheet” href=”htpps://pyscript.net/alpha/pyscript.css” />
<title>Lampica</title>
</head>
<body onload="MQTTConnect()">
<div class="color-switcher">
<div class="switcher-btn">
<i class="fas fa-cog"></i>
</div>
<h3>odaberi boju</h3>
<div class="theme-buttons-container">
<span class="theme-buttons" data-color="#fff" style="background: #fff ;" id="white"></span>
<span class="theme-buttons" data-color="#ff0000" style="background: red ;" id="red"></span>
<span class="theme-buttons" data-color="#00ff00" style="background: green ;" id="green"></span>
<span class="theme-buttons" data-color="#0000ff" style="background: blue ;" id="blue"></span>
<span class="theme-buttons" data-color="#ffff00" style="background: #ffff00 ;" id="yellow"></span>
<span class="theme-buttons" data-color="#ff00ff" style="background: #ff00ff ;" id="purple"></span>
<span class="theme-buttons" data-color="#00ffff" style="background: #00ffff ;" id="cyan"></span>
<!--<span class="theme-buttons" id="rgb">
<img src="Content/rgbv2.png" alt="">
</span> -->
</div>
</div>
<!-- On/Off Lampica -->
<div class="container">
<h1>Lampica
<br>
<label class="switch" for="klizac">
<input id="klizac" type="checkbox" style="text-align:center;" name="klizac">
<span class="slider round"></span>
</label>
<!--<input type="range" id="dimming" name="dimming" min="25" max="100" value="0" step="25"> -->
</h1>
</div>
<!-- Chart -->
<div class="chart" id="chart">
<h1 id="potrosnja">Dnevna potrošnja</h1>
<canvas id="myChart"></canvas>
<p id="izrPotrosnja" class="izrPotrosnja">Ukupna potrošnja lampice: x Wh</p>
</div>
<!-- JavaScript za klizac i promjenu boja -->
<script src="JavaScript/main.js"></script>
<!-- JavaScript za chart -->
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<script src="JavaScript/graf.js" type="text/javascript"></script>
<!-- JavaScript za mqqt -->
<script src="JavaScript/mqtt_publish.js" type="text/javascript"></script>
<!-- <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/paho-mqtt/1.0.1/mqttws31.js"></script> -->
<!-- vjerojatno ne treba ali nek bude tu, za mosquitto
<script type="text/javascript" src="https://test.mosquitto.org/sys/d3/d3.js"></script>
<script type="text/javascript" src="https://test.mosquitto.org/sys/d3/d3.layout.js"></script>
<script type="text/javascript" src="https://test.mosquitto.org/sys/mqttws31.js"></script>
<script type="text/javascript" src="https://test.mosquitto.org/sys/topic-tree.js"></script>
-->
</body>
</html>