-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebsite.html
232 lines (200 loc) · 6.31 KB
/
website.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
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>The Chemists</title>
<link rel="icon" href="https://i.ibb.co/C9MKmqr/download.jpg" type="image/jpg"> <!--Displays our logo-->
<!--The following css code is to alter the look and colour of the website to make it more professional and colour code the outputs -->
<style>
:root {
--primary-color: #007bff;
--hover-color: #0056b3;
--error-color: #ff4136;
--error-hover-color: #c2302a;
--background-color: #f4f4f4;
--text-color: #333;
--button-font-weight: bold;
--button-text-transform: uppercase;
}
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
margin: 0;
padding: 0;
background-color: var(--background-color);
color: var(--text-color);
}
.header {
display: flex;
justify-content: center;
text-align: center;
align-items: center;
padding: 20px;
background-color: #fff;
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.group-members, .results {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 10px;
justify-items: center;
align-items: center;
width: 90%;
max-width: 600px;
margin: 20px auto;
padding: 10px;
background-color: #fff;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
border-radius: 8px;
}
.process-indicator {
display: grid;
grid-template-columns: repeat(4, auto);
gap: 15px;
justify-items: center;
padding: 20px;
}
.process-unit {
display: flex;
flex-direction: column;
align-items: center;
}
.process-circle {
width: 30px;
height: 30px;
border: 2px solid var(--primary-color);
border-radius: 50%;
background-color: #fff;
display: flex;
justify-content: center;
align-items: center;
transition: transform 0.3s ease;
}
.process-circle:hover {
transform: scale(1.1);
}
.process-text {
margin-top: 8px;
color: var(--primary-color);
font-size: 0.8em;
text-align: center;
}
.button, .emergency-stop {
padding: 15px 30px;
border: none;
border-radius: 5px;
cursor: pointer;
font-weight: var(--button-font-weight);
text-transform: var(--button-text-transform);
transition: background-color 0.3s ease;
display: block;
margin: 10px auto;
}
.button {
background-color: var(--primary-color);
color: white;
}
.button:hover {
background-color: var(--hover-color);
}
.emergency-stop {
background-color: var(--error-color);
color: white;
}
.emergency-stop:hover {
background-color: var(--error-hover-color);
}
.results {
grid-template-columns: 1fr;
text-align: center;
}
</style>
</head>
<body>
<div class="header">
<h1 style="font-size: 1.2em; padding: 10px;"> Project Title
</h1>
</div>
<div class="group-members"> <!--This is a div class to add our names to the website-->
<div>Rohann</div>
<div>Rohan</div>
<div>Animish</div>
</div>
<div class="process-indicator"> <!--This HTML code is to display progress circles displaying our current stage of chromatography -->
<div class="process-unit">
<div class="process-circle" id="sat" style="background-color: yellow;"></div>
<span class="process-text" >Saturation</span>
</div>
<div class="process-unit">
<div class="process-circle" id="spray" ></div>
<span class="process-text">Spray</span>
</div>
<div class="process-unit">
<div class="process-circle" id="scan"></div>
<span class="process-text" >Scan</span>
</div>
<div class="process-unit">
<div class="process-circle" id="error" ></div>
<span class="process-text" >Error/Completion</span>
</div>
</div>
<div class="button-container"> <!-- Here is the code for each of the buttons to start each step-->
<div class="start-button-container" style="display:flex; justify-content:center; ">
<button class="button" style="margin-left: 500px;" onclick="startSpray()">Start Spray</button>
<button class="button" style="margin-right: 500px;"onclick="startScan()">Start Scan</button>
</div>
<button class="emergency-stop" onclick="emergencyStop()">Emergency Stop</button>
</div>
<div class="results">
<p class="result-text">""" + Results + """</p>
</div> <!--This is the code to display our results. It will be linked to the micropython code to display the appropriate result-->
<script>
// This code will create dynamic changes to the website based on button clicks. This first function is the code for the button start spraying
function startSpray() {
var element = document.getElementById('sat');
element.style.backgroundColor = 'green';
var element = document.getElementById('spray');
element.style.backgroundColor = 'yellow';
var element = document.getElementById('scan');
element.style.backgroundColor = 'white';
}//Helper
function completion(){
var element = document.getElementById('scan');
element.style.backgroundColor = 'green';
}
// Starts the second scan function. Contains timed elements.
function startScan() {
var element = document.getElementById('sat');
element.style.backgroundColor = 'green';
var element = document.getElementById('spray');
element.style.backgroundColor = 'green';
var element = document.getElementById('scan');
element.style.backgroundColor = 'yellow';
setTimeout(completion, 3000);
var element = document.getElementByClassName('results-text').innerText;
}
// This code will stop all processes and all the circles shall turn red. The code to end the process will be filled in later.
function emergencyStop() {
var element = document.getElementById('sat');
element.style.backgroundColor = 'red';
var element = document.getElementById('spray');
element.style.backgroundColor = 'red';
var element = document.getElementById('scan');
element.style.backgroundColor = 'red';
var element = document.getElementById('error');
element.style.backgroundColor = 'red';
}
// In progress
// function completion(element){
// function green(){
// var element = document.getElementById('error');
// element.style.backgroundColor = 'green';
// }
// var resulted=data.
// if (element!==resulted){
// setTimeout(green,10000)
// }
// }
</script>
</body>
</html>