-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
199 lines (198 loc) · 8.04 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>ItsDanny's Smart Mirror</title>
<script>
//Enter the information for your smart mirror here
const user_firstname = "Firstname";
const user_lastname = "Lastname";
const user_gender = "male"; //Switch between male and female, or if you want to use non-gendered language then put null here
const user_lan = "NL"; //NL = dutch, EN = english
const user_temp = "C"; //C for Celsius or F for Fahrenheit
//This is the configuration for your Weather information endpoint
const weather_url = "https://localhost:3001";
const weather_apikey = "12345678910"
const weather_points_amount = 5;
//This is the configuration for your Weather information endpoint
const calender_url = "https://localhost:3002";
const calender_apikey = "23456789101"
const calender_points_amount = 2;
//This is the configuration for your Weather information endpoint
const notes_url = "https://localhost:3003";
const notes_apikey = "34567891011"
const notes_points_amount = 2;
</script>
<script src="src/js/main.js"></script>
<link href="src/css/main.css" rel="stylesheet">
<!-- Import the fontawesome icon pack-->
<script src="https://kit.fontawesome.com/64093786fd.js" crossorigin="anonymous"></script>
</head>
<body>
<!--This container will hold the current date and time for the smart-mirror-->
<div class="container" id="con-datetime">
<h1 id="welcome-message"></h1>
<div class="sub-container" id="sub-con-datetime">
<h2 id="date"></h2>
<h1 id="time"></h1>
</div>
</div>
<!--This container will hold the current weather and the weather later in the day for the smart-mirror-->
<div class="container" id="con-weather">
<h1 id="weather-header"></h1>
<table class="table-weather">
<tr>
<td class="weather-box">
<div class="container-weather">
<table class="table-weather">
<tr>
<th><i class="fa-solid fa-cloud"></i></th>
</tr>
<tr>
<td>24°C</td>
</tr>
<tr>
<td>Bewolkt</td>
</tr>
</table>
</div>
</td>
<td class="weather-box">
<div class="container-weather">
<table class="table-weather">
<tr>
<th><i class="fa-solid fa-cloud"></i></th>
</tr>
<tr>
<td>24°C</td>
</tr>
<tr>
<td>Bewolkt</td>
</tr>
</table>
</div>
</td>
<td class="weather-box">
<div class="container-weather">
<table class="table-weather">
<tr>
<th><i class="fa-solid fa-cloud"></i></th>
</tr>
<tr>
<td>24°C</td>
</tr>
<tr>
<td>Bewolkt</td>
</tr>
</table>
</div>
</td>
<td class="weather-box">
<div class="container-weather">
<table class="table-weather">
<tr>
<th><i class="fa-solid fa-cloud"></i></th>
</tr>
<tr>
<td>25°C</td>
</tr>
<tr>
<td>Bewolkt</td>
</tr>
</table>
</div>
</td>
<td class="weather-box">
<div class="container-weather">
<table class="table-weather">
<tr>
<th><i class="fa-solid fa-cloud-rain"></i></th>
</tr>
<tr>
<td>25°C</td>
</tr>
<tr>
<td>Gedeeltelijk<br>Bewolkt</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</div>
<!-- This container contains agenda items which we will sync from Apples agenda API-->
<div class="container" id="con-agenda">
<h1 id="agenda-header"></h1>
<div id="agenda-container">
<div class="agenda-row">
<table>
<tr>
<th class="agenda-row-header">IJsje halen</th>
</tr>
<tr>
<td class="agenda-row-time">Vrijdag, 16:00 t/m 23:59</td>
</tr>
<tr>
<td class="agenda-row-location">Rotterdam Centrum</td>
</tr>
</table>
</div>
<div class="agenda-row">
<table>
<tr>
<th class="agenda-row-header">Een test agenda punt</th>
</tr>
<tr>
<td class="agenda-row-time">Zaterdag, 16:00 t/m 23:59</td>
</tr>
<tr>
<td class="agenda-row-location">Home - Van Alkemadelaan 15</td>
</tr>
</table>
</div>
</div>
</div>
<div class="container" id="con-notes">
<h1 id="notes-header"></h1>
<div id="notes-container">
<div class="notes-row">
<table>
<tr>
<th class="notes-row-header">Zeg hallo tegen Mick</th>
</tr>
<tr>
<td class="notes-row-text">Hi, Mick!<br>Als je dit ziet betekent dat<br>het interface werkt zoals het hoort!</td>
</tr>
</table>
</div>
<div class="notes-row">
<table>
<tr>
<th class="notes-row-header">Afmaken fysieke spiegel en Siri koppeling</th>
</tr>
<tr>
<td class="notes-row-text">1. Bedrading solderen van de geintegreerde LED stips<br>2. Het scherm vast maken aan de spiegel<br>3. Siri koppeling afmaken voor het aansturen van de LED strips</td>
</tr>
</table>
</div>
</div>
</div>
<!-- Run the Javascript functions when the page is fully loaded-->
<script>
// Start the welcome message function
get_welcome_message(user_firstname, user_lastname, user_gender, user_lan);
// Start the date function
get_date(user_lan);
// Start the clock function
clock();
// Start Weather Information Retrieval
get_weather(weather_url, weather_apikey, weather_points_amount, user_temp, user_lan);
// Start Calender points Retrieval
get_calender(calender_url, calender_apikey, calender_points_amount, user_lan);
// Start Notes retrieval
get_notes(notes_url, notes_apikey, notes_points_amount, user_lan);
// Set the correct header texts for the selected language
InterfaceLan(user_lan);
</script>
</body>
</html>