grg commited on
Commit
f083205
β€’
1 Parent(s): ece8924

Increase image sizes

Browse files
Files changed (1) hide show
  1. web_demo/templates/index.html +26 -8
web_demo/templates/index.html CHANGED
@@ -55,8 +55,8 @@
55
  }
56
 
57
  .svg-container {
58
- width: 60%; /* Adjust to desired width */
59
- height: 30%; /* Adjust to desired width */
60
  margin-left: 5px;
61
  margin-right: 5px;
62
  margin-bottom: 5px;
@@ -64,8 +64,6 @@
64
  padding-top: 10px;
65
  padding-left: 30px;
66
  padding-right: 30px;
67
- overflow-x: auto; /* Show scrollbars when necessary */
68
- overflow-y: auto; /* Show scrollbars when necessary */
69
  border: 5px solid #ccc; /* Optional: just to visualize the container's boundaries */
70
  border-radius: 10px; /* uniform roundness */
71
  box-shadow: 3px 3px 5px #888888; /* horizontal offset | vertical offset | blur radius | color */
@@ -103,9 +101,15 @@
103
  }
104
 
105
  #envImage {
106
- max-width: 90%; /* or whatever size you prefer */
 
 
 
 
 
107
  }
108
 
 
109
  .bubble {
110
  margin-left: 20px; /* space between the image and the bubble */
111
  position: relative;
@@ -113,8 +117,9 @@
113
  border-radius: 10px;
114
  padding: 10px;
115
  width: max-content;
116
- min-width: 300px; /* adjust if necessary */
117
- max-width: 300px; /* adjust if necessary */
 
118
  margin-bottom: 20px;
119
  }
120
 
@@ -293,8 +298,21 @@
293
  })
294
  .then(response => response.json())
295
  .then(data => {
 
296
  let bubble = document.getElementById('caretakerBubble');
297
- if(data.bubble_text) {
 
 
 
 
 
 
 
 
 
 
 
 
298
  let formattedText = data.bubble_text.replace(/\n/g, '<br>');
299
  bubble.innerHTML = formattedText;
300
  bubble.style.display = 'block';
 
55
  }
56
 
57
  .svg-container {
58
+ width: 60%;
59
+ max-height: 300px;
60
  margin-left: 5px;
61
  margin-right: 5px;
62
  margin-bottom: 5px;
 
64
  padding-top: 10px;
65
  padding-left: 30px;
66
  padding-right: 30px;
 
 
67
  border: 5px solid #ccc; /* Optional: just to visualize the container's boundaries */
68
  border-radius: 10px; /* uniform roundness */
69
  box-shadow: 3px 3px 5px #888888; /* horizontal offset | vertical offset | blur radius | color */
 
101
  }
102
 
103
  #envImage {
104
+ width: 100%; /* Make image responsive */
105
+ min-width: 500px;
106
+ height: auto; /* Maintain aspect ratio */
107
+ display: block; /* Remove default image inline behaviors */
108
+ margin-left: auto; /* Center the image horizontally if needed */
109
+ margin-right: auto; /* Center the image horizontally if needed */
110
  }
111
 
112
+
113
  .bubble {
114
  margin-left: 20px; /* space between the image and the bubble */
115
  position: relative;
 
117
  border-radius: 10px;
118
  padding: 10px;
119
  width: max-content;
120
+ width: 100%; /* Make image responsive */
121
+ height: auto; /* Maintain aspect ratio */
122
+ min-width: 500px;
123
  margin-bottom: 20px;
124
  }
125
 
 
298
  })
299
  .then(response => response.json())
300
  .then(data => {
301
+ // Add this to handle the caretaker's utterance
302
  let bubble = document.getElementById('caretakerBubble');
303
+
304
+ // Check for success
305
+ if (data.done) {
306
+ if (data.success) {
307
+ bubble.innerHTML = '<br><div style="text-align: center; color: green;">SUCCESS!</div><br>' +
308
+ '<div style="text-align: center; color: gray; font-style: italic; font-size: smaller;">(press Enter to continue)</div><br>';
309
+ bubble.style.display = 'block';
310
+ } else {
311
+ bubble.innerHTML = '<br><div style="text-align: center; color: red;">FAILURE!</div><br>' +
312
+ '<div style="text-align: center; color: gray; font-style: italic; font-size: smaller;">(press Enter to continue)</div><br>';
313
+ bubble.style.display = 'block';
314
+ }
315
+ } else if (data.bubble_text) {
316
  let formattedText = data.bubble_text.replace(/\n/g, '<br>');
317
  bubble.innerHTML = formattedText;
318
  bubble.style.display = 'block';