Spaces:
Sleeping
Sleeping
Update templates/menu_page.html
Browse files- templates/menu_page.html +12 -2
templates/menu_page.html
CHANGED
@@ -91,8 +91,8 @@
|
|
91 |
<div class="container" id="welcome-container">
|
92 |
<h1>Welcome to the Biryani Hub Menu</h1>
|
93 |
<div class="menu-option">
|
94 |
-
<button
|
95 |
-
<button
|
96 |
</div>
|
97 |
</div>
|
98 |
|
@@ -186,6 +186,7 @@
|
|
186 |
cartItemsContainer.appendChild(div);
|
187 |
});
|
188 |
cartContainer.style.display = 'block';
|
|
|
189 |
}
|
190 |
|
191 |
// Function to place the final order
|
@@ -199,6 +200,15 @@
|
|
199 |
}
|
200 |
}
|
201 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
202 |
// Voice Recognition for adding items and viewing cart
|
203 |
const recognition = new (window.SpeechRecognition || window.webkitSpeechRecognition)();
|
204 |
recognition.lang = 'en-US';
|
|
|
91 |
<div class="container" id="welcome-container">
|
92 |
<h1>Welcome to the Biryani Hub Menu</h1>
|
93 |
<div class="menu-option">
|
94 |
+
<button onclick="showMenu('veg')">Vegetarian Menu</button>
|
95 |
+
<button onclick="showMenu('nonVeg')">Non-Vegetarian Menu</button>
|
96 |
</div>
|
97 |
</div>
|
98 |
|
|
|
186 |
cartItemsContainer.appendChild(div);
|
187 |
});
|
188 |
cartContainer.style.display = 'block';
|
189 |
+
speakCartItems(); // Speak out the items in the cart
|
190 |
}
|
191 |
|
192 |
// Function to place the final order
|
|
|
200 |
}
|
201 |
}
|
202 |
|
203 |
+
// Speak out the items in the cart
|
204 |
+
function speakCartItems() {
|
205 |
+
let cartText = "Your cart contains: ";
|
206 |
+
cart.forEach(item => {
|
207 |
+
cartText += `${item.quantity} of ${item.name}, `;
|
208 |
+
});
|
209 |
+
speak(cartText, () => {});
|
210 |
+
}
|
211 |
+
|
212 |
// Voice Recognition for adding items and viewing cart
|
213 |
const recognition = new (window.SpeechRecognition || window.webkitSpeechRecognition)();
|
214 |
recognition.lang = 'en-US';
|