-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathui.html
More file actions
480 lines (418 loc) · 12.4 KB
/
ui.html
File metadata and controls
480 lines (418 loc) · 12.4 KB
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
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Sentiment AI</title>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@100;400;700&display=swap" rel="stylesheet">
<style>
body {
font-family: Inter, sans-serif;
margin: 0;
padding: 0;
display: flex;
flex-direction: column;
align-items: center;
background-color: #ffffff;
color: #000000;
width: 100%;
height: 100%;
}
h1 {
align-self: flex-start; /* Overrides the center alignment from the body */
font-size: 24px;
padding-left: 3px;
color:#333;
margin-top: 0px;
margin-bottom: 0; /* Remove bottom margin */
font-weight: 300;
text-align: left;
}
h2 {
align-self: flex-start; /* Overrides the center alignment from the body */
font-size: 24px;
padding-left: 3px;
margin-top: 1px;
margin-bottom: 12px;
text-align: left;
font-weight: 800;
}
h3 {
align-self: flex-start; /* Overrides the center alignment from the body */
font-size: 30px;
word-spacing: -5%;
margin: 3px 0 2px 0; /* Remove top margin */
padding: 0px;
text-align: left;
font-weight: 600;
}
.caption {
align-self: flex-start; /* Overrides the center alignment from the body */
font-size: 12px;
color: #8e8e8e;
font-weight: 500;
text-align: left; /* Ensure text is left-aligned */
margin: 0px 0px 20px 0px;
}
.container {
flex-direction: column;
width: 90%;
justify-content: flex-start; /* Align content from top vertically */
}
.page {
display: none;
width: 100%;
height: 100%;
flex-direction: column;
align-items: center;
justify-content: flex-start; /* Align content from top vertically */
}
.page.active {
display: flex;
}
textarea {
background-color: #f5f5f5; /* Set background color to grey */
font-family: 'Inter', sans-serif;
width: 100%;
height: 200px;
margin-top: 15px;
margin-bottom: 10px;
padding: 17px;
border: none; /* Remove border */
border-radius: 20px;
font-size: 14px;
resize: none;
}
.slider-container {
display: flex;
flex-direction: column;
align-items: flex-start;
width: 100%;
margin: 10px 0;
}
.slider-container label {
margin-bottom: 5px;
font-size: 14px;
}
.slider-container input {
width: 100%;
}
.switch {
display: flex;
justify-content: center;
width: 97%;
border-radius: 20px;
}
.switch button {
flex: 1;
border: 0px solid #ddd;
background-color: #f5f5f5;
padding: 10px 0;
cursor: pointer;
font-size: 14px;
border-radius: 20px;
}
.switch button.active {
background-color: #ffffff;
color: #000000;
}
button#generate {
background-color: #000;
color: #fff;
padding: 15px;
border: none;
border-radius: 30px;
font-size: 16px;
cursor: pointer;
width: 100%;
margin: 20px 0;
}
.back-icon {
width: 30px; /* Adjust the size of the icon */
height: auto;
cursor: pointer;
transition: transform 0.2s ease; /* Add a hover effect */
align-self: flex-start; /* Align the icon to the left */
margin: 10px 0px;
}
.back-icon:hover {
transform: scale(1.1); /* Slightly enlarge the icon on hover */
}
.profile-icon {
width: 30px; /* Adjust the size of the icon */
height: auto;
margin: 10px 20px 5px 0px;
align-self: flex-end; /* Align the icon to the right */
}
.profile-icon:hover {
transform: scale(1.1); /* Slightly enlarge the icon on hover */
}
.emotion-container {
background-color: #eeeeee; /* Light grey background for the container */
padding: 25px 25px;
width: 300px;
}
.emotion-row {
display: flex;
align-items: center;
margin-bottom: 10px;
}
.emotion-row:last-child {
margin-bottom: 0;
}
.emotion-label {
flex: 1;
font-weight: bold;
color: #000000;
margin-right: 10px;
}
.emotion-bar {
flex: 2;
height: 20px;
border-radius: 5px;
}
/* Custom colors for each bar */
.curiosity {
background-color: #000000; /* Black */
width: 100%;
}
.admiration {
background-color: #888888; /* Dark grey */
width: 80%;
}
.delight {
background-color: #cccccc; /* Light grey */
width: 60%;
}
.confused {
background-color: #ffffff; /* White */
width: 40%;
border: 1px solid #dddddd; /* Add border for visibility */
}
.content-container {
text-align: left; /* Ensure text inside is left-aligned */
width: 100%; /* Make sure the container spans the full width */
}
.card-container {
display: grid;
grid-template-columns: repeat(2, 1fr); /* 2 cards per row */
gap: 20px; /* Space between cards */
padding: 20px;
}
.card {
background-color: #f9f9f9; /* Light gray */
border-radius: 15px;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
text-align: center;
width: 140px;
height: 140px;
}
.card .icon {
font-size: 40px; /* Size of the icon */
margin-bottom: 10px;
}
.card .title {
font-size: 16px;
font-weight: bold;
color: #333; /* Dark text */
}
.recording-item {
display: flex;
align-items: center;
padding: 10px 0px 5px 5px;
border-bottom: 1px solid #f0f0f0;
}
.recording-info {
padding-top: 10px;
}
.mainText{
font-family: 'Inter', sans-serif;
font-weight: 500;
font-size: 20px;
color: #333; /* Dark text */
}
.badge {
background-color: #f0f0f0;
color: #000;
font-size: 14px;
padding: 2px 8px;
border-radius: 15px;
font-weight: bold;
}
</style>
</head>
<body>
<!-- New Recording Page -->
<div id="new-recording-page" class="page active">
<img src="icon/profile.png" alt="profile" class="profile-icon">
<div class="container">
<h1>Welcome to</h1>
<h2>Sentiment.Figma</h2>
<div class="switch" style="background-color: #f5f5f5; border-radius: 20px; padding: 5px;">
<button class="active" id="new">New</button>
<button id="old">Past</button>
</div>
<textarea id="feedback" placeholder="Type in the feedback during the meeting"></textarea>
<div class="slider-container">
<label for="entropy">Entropy</label>
<input id="entropy" type="range" min="0" max="1" step="0.1">
</div>
<div class="slider-container">
<label for="temperature">Temperature</label>
<input id="temperature" type="range" min="0" max="1" step="0.1">
</div>
<button id="generate">GENERATE</button>
</div>
</div>
<!-- Past Recordings Page -->
<div id="past-recordings-page" class="page">
<img src="icon/profile.png" alt="profile" class="profile-icon">
<div class="container">
<h1>Welcome to</h1>
<h2>Sentiment.Figma</h2>
<div class="switch" style="background-color: #f5f5f5; border-radius: 20px; padding: 5px;">
<button id="new">New</button>
<button class="active" id="old">Past</button>
</div>
<div class="recording-item">
<div class="recording-info">
<div class="recording-title">
<span class="mainText">New recording10</span>
<span class="badge">Jerry</span>
</div>
<div class="caption">Oct 30th, 2024</div>
</div>
</div>
</div>
</div>
<!-- Analysis Page -->
<div id="analysis-page" class="page">
<div class="container">
<img id="back-to-home" src="icon/back.png" alt="Back" class="back-icon">
<h3>New Recording</h3>
<p class="caption">Recorded on</p>
</div>
<div class="emotion-container">
<div class="emotion-row">
<div class="emotion-label">Curiosity</div>
<div class="emotion-bar curiosity"></div>
</div>
<div class="emotion-row">
<div class="emotion-label">Admiration</div>
<div class="emotion-bar admiration"></div>
</div>
<div class="emotion-row">
<div class="emotion-label">Delight</div>
<div class="emotion-bar delight"></div>
</div>
<div class="emotion-row">
<div class="emotion-label">Confused</div>
<div class="emotion-bar confused"></div>
</div>
</div>
<div class="card-container">
<!-- Card 1 -->
<div class="card">
<div class="icon">
🎨 <!-- Replace with an actual icon -->
</div>
<div class="title">Color Sensing</div>
</div>
<!-- Card 2 -->
<div class="card">
<div class="icon">
ℹ️ <!-- Replace with an actual icon -->
</div>
<div class="title">Information Architecture</div>
</div>
<!-- Card 3 -->
<div class="card">
<div class="icon">
🎨 <!-- Replace with an actual icon -->
</div>
<div class="title">Responsiveness</div>
</div>
<!-- Card 4 -->
<div class="card">
<div class="icon">
ℹ️ <!-- Replace with an actual icon -->
</div>
<div class="title">Information Architecture</div>
</div>
</div>
</div>
<!--Profile Page-->
<div id="profile-page" class="page">
<img id="back-to-home" src="icon/back.png" alt="Back" class="back-icon">
<div class="container">
<h3>Saved Client</h3>
</div>
</div>
<!--Detailed Analysis-->
<div id="detailed-analysis-page" class="page">
<img id="back-to-home" src="icon/back.png" alt="Back" class="back-icon">
<div class="container">
<h3>Saved Client</h3>
</div>
</div>
<script>
// Array to store feedback and timestamp data
const recordings = [];
document.getElementById('generate').onclick = () => {
const feedback = document.getElementById('feedback').value;
const entropy = document.getElementById('entropy').value;
const temperature = document.getElementById('temperature').value;
if (feedback === '') {
alert('Please enter feedback before generating.');
return;
}
// Capture the current date and time
const timestamp = new Date().toLocaleString();
// Save the feedback and timestamp
recordings.push({ feedback, entropy, temperature, timestamp });
// Optional: Log the data for debugging
console.log(recordings);
// Send data to the plugin backend (if needed)
parent.postMessage(
{ pluginMessage: { type: 'generate', feedback, entropy, temperature, timestamp } },
'*'
);
// Switch to the New Recording Page
document.getElementById('analysis-page').classList.add('active');
document.getElementById('new-recording-page').classList.remove('active');
document.getElementById('past-recordings-page').classList.remove('active');
// Update the caption with the timestamp
const captionElement = document.querySelector('.caption');
captionElement.textContent = `Recorded on ${timestamp}`;
};
// Switch to Past Recordings Page
document.getElementById('old').onclick = () => {
document.getElementById('new-recording-page').classList.remove('active');
document.getElementById('past-recordings-page').classList.add('active');
};
// not working
// Switch to Home Page Page
document.getElementById('new').onclick = () => {
parent.postMessage({ pluginMessage: { type: 'switch-to-home' } }, '*');
document.getElementById('past-recordings-page').classList.remove('active');
document.getElementById('new-recording-page').classList.add('active');
};
//not working
document.querySelector('.profile-icon').onclick = () => {
document.querySelectorAll('.page').forEach(page => page.classList.remove('active'));
document.getElementById('profile-page').classList.add('active');
};
// Go back to previous page
document.querySelectorAll('#back-to-home').forEach(button => {
button.onclick = () => {
document.querySelectorAll('.page').forEach(page => page.classList.remove('active'));
const lastVisitedPage = document.querySelector('.page.active');
lastVisitedPage.classList.add('active');
};
});
</script>
</body>
</html>